mrbig1479 Posted April 27, 2008 Share Posted April 27, 2008 Hey I am trying to Use control ID functions in my script. here is a copy paste from the Autoit window info when i hover the control i want to use >>>> Window <<<< Title: Magic Online 3.0 Class: WindowsForms10.window.8.app.0.378734a Position: 152, 115 Size: 720, 508 Style: 0x16010000 ExStyle: 0x000D0000 Handle: 0x001706D8 >>>> Control <<<< Class: WindowsForms10.STATIC.app.0.378734a Instance: 5 ClassnameNN: WindowsForms10.STATIC.app.0.378734a5 ID: 19990634 Text: Starting up... Position: 207, 330 Size: 330, 23 ControlClick Coords: 265, 9 Style: 0x5600000D ExStyle: 0x00000000 Handle: 0x0131086A >>>> Mouse <<<< Position: 624, 454 Cursor ID: 2 Color: 0x3A6EA5 >>>> StatusBar <<<< >>>> Visible Text <<<< Repair Launch Starting up... >>>> Hidden Text <<<< Now i want to click the "Launch" button inside that window (as soon as the "Starting up..." is done ) what i did was while 1 WinActivate("Magic Online 3.0", "") sleep (1000) ConsoleWrite ("waiting for MTGO to be ready") if ProcessExists("kicker.exe") Then while ControlFocus ("Magic Online 3.0","Starting up...",[Class: WindowsForms10.STATIC.app.0.378734a]) $handle= ControlGetHandle("Magic Online 3.0","Starting up...") consoleWrite ("The handle is "&" " &$handle) sleep (500) WEnd sleep (1000) ControlClick ( "Magic Online 3.0", "Launch",[Class: WindowsForms10.STATIC.app.0.378734a]) ExitLoop Else sleep (500) EndIf WEnd Not working ... I tried using the control ID - and i have no compiling errors there - but the function never works ( i guess because the ID is changing). With the above script i have a compiling error... what am i doing wrong ? Link to comment Share on other sites More sharing options...
ProgAndy Posted April 27, 2008 Share Posted April 27, 2008 You should use: [CLASSNN:WindowsForms10.STATIC.app.0.378734a5] And no spaces in it, beacuse they aren't ignored *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
mrbig1479 Posted April 27, 2008 Author Share Posted April 27, 2008 Yea that worked ( i Forgot the "" also ) thanks 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