keilamym Posted April 12, 2004 Share Posted April 12, 2004 ok i hate asking for help but i have to. i've used version 2 but 3 is a little different. is there a way to have autoit wait for a advanced window feature? i need to have it wait for a windows that has a "classname=IEFrame", and text of "setup.html" this is what i have so far ;begin script Sleep ( 20000 ) AutoItSetOption("WinTitleMatchMode", 4) $handle = WinGetHandle("classname=IEFrame", "setup.html") Send ( '{Tab}' ) Sleep ( 1000 ) Send ( '{ENTER}' ) ;end of script the script works but I would like to remove the sleep command and have it wait for the specified window to appear. i've tried "winwait $handle = WinGetHandle("classname=IEFrame", "setup.html") but maybe i'm doing something wrong. any help would be appreciated. thank you keilamym Link to comment Share on other sites More sharing options...
CyberSlug Posted April 12, 2004 Share Posted April 12, 2004 (edited) Try this: WinWait("handle=" & $handle) Send('{Tab}') ; and so on Edited April 12, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
keilamym Posted April 12, 2004 Author Share Posted April 12, 2004 ok i must be an idiot.. i'm assuming that $handle = WinGetHandle("classname=IEFrame", "setup.html") sets the variable and the WinWait("handle=" & $handle) is simply waiting for the varible (window) to appear. if this is the case, it just sits there... could i be doing something wrong? Link to comment Share on other sites More sharing options...
CyberSlug Posted April 12, 2004 Share Posted April 12, 2004 Hmm, is IEFrame the class of the entire window or just part of it? You might need to get the class of the entire window. I'm assuming you are still using AutoItSetOption("WinTitleMatchMode", 4) Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
keilamym Posted April 13, 2004 Author Share Posted April 13, 2004 this what the window says >>>>>>>>>>>>( Window Title )<<<<<<<<<<<<< IBM Lotus Sametime Installer for Secure Desktops - Microsoft Internet Explorer provided by 20th Century Fox ( classname=IEFrame ) >>>>>>>>>>>( Mouse Position )<<<<<<<<<<<< On Desktop: x: 358 y: 200 In Window: x: 256 y: 79 >>>>>>>>>>>>>( Pixel Color Under Mouse)<<<<<<<<<<<<< Dec: 0 Hex: 0x000000 >>>>>>>>>>>( Window Position )<<<<<<<<<<< left: 102 top: 121 width: 650 height: 429 >>>>>>>>( Last Control Under Mouse )<<<<<<< Class: WorkerW1 (hidden) Text: >>>>>>>>>( Status Bar Text )<<<<<<<< (1): Done (2): (3): (4): (5): My Computer >>>>>>>>>>>( Visible Window Text )<<<<<<<<< C:\Documents and Settings\Administrator\Local Settings\Temp\SISD\setup.html C:\Documents and Settings\Administrator\Local Settings\Temp\SISD\setup.html >>>>>>>>>>( Hidden Window Text )<<<<<<<<< Done Link to comment Share on other sites More sharing options...
keilamym Posted April 13, 2004 Author Share Posted April 13, 2004 (edited) CyberSlug, Is this what I should be trying? AutoItSetOption("WinTitleMatchMode", 4) $handle = WinGetHandle("classname=IEFrame", "setup.html") WinWait("handle=" & $handle) Send ( '{Tab}' ) etc. I've tried many variations but have not found the solution. If I cant get this working, I can send the script in a loop until the window appears. I would usually use the "goto" command but its not supported in version3. of I can place it in an adlib statement. Thanks in advance keilamym Edited April 13, 2004 by keilamym Link to comment Share on other sites More sharing options...
Valik Posted April 13, 2004 Share Posted April 13, 2004 You have a major logic error there. You can't get the handle to a window that doesn't exist and also you can't rely on waiting for a window handle, anyway, as they are assigned by Windows however it sees fit (Meaning, randomly). Try something like: AutoItSetOption("WinTitleMatchMode", 4) WinWait("classname=IEFrame", "setup.html") Send ( '{Tab}' ) Link to comment Share on other sites More sharing options...
CyberSlug Posted April 13, 2004 Share Posted April 13, 2004 You have a major logic error there. You can't get the handle to a window that doesn't exist and also you can't rely on waiting for a window handle, anyway, as they are assigned by Windows however it sees fit (Meaning, randomly).I must need more coffee Valik is quite right, so try his suggestion. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
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