10-21-2005, 04:41 PM
I was wondering if there is a way to find all open programs? And Close the program and just leave QM running? :lol:
Thanks!
Thanks!
Find All Open Programs
|
10-21-2005, 04:41 PM
I was wondering if there is a way to find all open programs? And Close the program and just leave QM running? :lol:
Thanks!
10-21-2005, 06:38 PM
This code displays names of all non popup windows except QM. Uncomment last command to close these windows. Taskbar and other inportant explorer's windows are popup and therefore skipped by setting flag 4. This code requires one of latest QM versions.
10-21-2005, 07:36 PM
Wow thanks!
Also, I have this large macro that clean up files. Problem is, users think its not doing anything and they think its stuck pressing Pause/Break. Is there a way i could place a message at the beginning of the macro saying "PLEASE WAIT" and then the clean up codes, then turn off the message at the end of the macro?
10-21-2005, 07:38 PM
I am getting the error below when I copied, pasted and tried to compile the codes you provided. Am I doing something wrong?
>>>>>> expected 1 to 5 arguments, not 6. <<<<<<<<<<<<<
10-21-2005, 08:02 PM
You need newer QM version. Or, import the attached file and use function GetWindowList2 instead.
10-21-2005, 08:09 PM
We are getting really close, I can taste it.
How come it does not find Yahoo Messenger tho?
10-21-2005, 08:36 PM
It is difficult to determine what windows must be closed, because there are many windows that you maybe don't think that they are windows, eg desktop, taskbar, tooltips, owners of real windows, and hundreds of hidden windows. This code enumerates all visible nonpopup windows and popup windows that have caption (title bar).
10-21-2005, 09:35 PM
you are definitely the god of all gods!
have u thought about my other question? about the "PLEASE WAIT" message? thanks!
10-21-2005, 09:52 PM
Function PleaseWait:
\Dialog_Editor Create new function, name it PleaseWait, and paste this code. To paste, use menu Edit -> Other formats -> Paste escaped. Call this function at the beginning of the macro. If your QM version is older, remove opt waitmsg 2 and insert opt waitmsg 1 in the macro, before PleaseWait. Example: opt waitmsg 1 PleaseWait ...
10-21-2005, 10:00 PM
Ummm, am i suppose to remove the ";"
hock: its showing me error message on line: if(flags&2) txt=macro; else txt.getmacro(macro)
10-21-2005, 10:11 PM
NEVERMIND, I GOT IT
THANKS SO MUCH!
10-21-2005, 10:19 PM
Ummm, seems like the dialog box just flashed on screen and didnt stay.
10-22-2005, 10:16 AM
The dialog disappears when the macro ends.
This version of PleaseWait creates "always on top" dialog, which is not at screen center.
10-22-2005, 05:55 PM
Works Great!!!!
Is there a way to place it on the center of the screen? Or it wont work?
10-22-2005, 08:56 PM
You can open the dialog in the Dialog Editor and add DS_CENTER style. Or, just replace 0x10C00246 to 0x10C00A46.
10-30-2005, 07:23 PM
Hello Ginatars:
I have a little problem. I have multiple windows that have the same name and would like to move them to another part of the screen. I pretty much know what to do once I find all the windows, problem is, finding them :lol: For example, if I have 5 windows with the name "Find" how do I repeat functions on each window? Thanks Gabby
10-30-2005, 07:27 PM
What code you now use?
10-30-2005, 07:33 PM
10-30-2005, 08:23 PM
The attachment contains functions to enumerate certain windows. Download and import it. Then use this code.
04-23-2006, 03:34 AM
Hello Mr. Gintaras:
I am stuck in the middle of a project. I have to work ong 6 notepad windows, to be able to manipulate each document. Each document is saved as Insert1, Insert2, Insert3, etc. I used the function you gave to find the exact window name and it works great. The problem is, I don't know how to find a specific window without using the function over and over. I was hoping to run this function once and be able to assign the variable Doc1 to document Insert1, Doc2 to document Insert3, and so on. I hope you can help.
10-20-2006, 08:38 PM
Gintaras Wrote:The attachment contains functions to enumerate certain windows. Download and import it. Then use this code. Hi! I have been using this code for sometime now and had no problems whatsoever until I purchased a faster computer I am getting "cannot activate window" (on act h line) The problem disappears when I use spe 50, instead of spe. Is this a typical behavior? Both machines are set with the same run time options, just thought was weird. Thank you Denise
10-20-2006, 08:50 PM
Do you really need to activate different windows so frequently? I don't remember why there is act h, maybe it can be removed.
It is not typical behavior, but possible. I cannot say why it fails to activate in your case. Now I tried this code, and no errors (6 matching windows):
10-20-2006, 09:56 PM
Well, normally just 4 notepad windows, 3 of them I need to get text from, the 4th one is the compiled file.
I will try your suggestion and let you know. Thank you very much.
10-20-2006, 10:01 PM
Also try to check or uncheck Disable Windows Foreground Lock Feature in Options.
10-20-2006, 10:05 PM
Checked on both computers
10-26-2006, 11:54 PM
iv made a macro that hides the I.E that i have up and im trying to hide new ones as they pop up im not sure how i need to add the new window to the ARRAY so when i unhide then all the windows come back here is the code
thanks
10-27-2006, 08:41 AM
To add array element, I usually use this:
a[a.redim(-1)]=h a.redim(-1) resizes the array by 1 element and returns the index of the element. Or use this: int ni ni=a.redim(-1) a[ni]=h _____ win("" "" "IEXPLORE") will return hidden windows too. Use flag 0x400 if you need only visible windows. rep ,0.1 ,h=win("" "" "IEXPLORE" 0x400) ,if(h) ,,a[a.redim(-1)]=h ,,hid h Use ,hid- h; err
01-06-2007, 07:37 AM
is the a way to get only windows that are not visible with GetWindowList2?, i didnt see a flag for it.
MOZER
01-06-2007, 09:22 AM
01-06-2007, 10:28 AM
I KNOW ITS SOMETHING SMALL IM DOING WRONG, HERE IS THE CODE
str titles exe |
« Next Oldest | Next Newest »
|