Tapeworm Posted April 14, 2008 Posted April 14, 2008 Basically what i want to do is to make a exe that waits for "run" or "my computer" window to be active, and then continues. Any one of them could be active, doesnt have to be both (dont think thats even possible anyways).I would imagine the script to look something like this:WinWaitActive("Run") or WinWaitActive("My Computer")the above doesnt work, so does anyone know how to do this in some way?
spudw2k Posted April 14, 2008 Posted April 14, 2008 (edited) does anyone know how to do this in some way? I believe WinWaitActive() can't be used like that, "winwaitactive() or winwaitactive()". I think the first one is waiting before the latter. WinWait performs a loop until the window is found. $found = 0 Do If WinExists("Run") or WinExists("My Computer") Then $found = 1 Sleep(1000) Until $found = 1 msgbox(0,"","done") Edited April 14, 2008 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
Tapeworm Posted April 14, 2008 Author Posted April 14, 2008 oh so simple! cant believe i didnt think of that thanks!!
spudw2k Posted April 14, 2008 Posted April 14, 2008 In case you don't know of it, you can use WinActivate() to "activate" (who'da thunk) a window. Also, keep in mind that "My Computer" will only work when "My Computer" is first opened. Once you navigate to another dir the Window name changes to the path. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
Tapeworm Posted April 14, 2008 Author Posted April 14, 2008 yeah, i used WinActive() in the script spudw2k posted. So it will standby until it becomes active ^^
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now