Jump to content

New Autoit 3 User


Recommended Posts

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

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

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

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 by keilamym
Link to comment
Share on other sites

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

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 :D 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...