Heracles Posted April 10, 2006 Posted April 10, 2006 (edited) Hi! What I want my script to do: Nothing until a certain window appears Then click the right of two buttons Then do noting again, waiting for the same thing. using AU3info I gathered this info Press CTRL-ALT-F to pause the display. >>>>>>>>>>>> Window Details <<<<<<<<<<<<< Title: Testprog Class: #32770 Size: X: 449 Y: 460 W: 389 H: 119 >>>>>>>>>>> Mouse Details <<<<<<<<<<< Screen: X: 570 Y: 528 Cursor ID: 2 >>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<< RGB: Hex: 0xD4D0C8 Dec: 13947080 >>>>>>>>>>> Control Under Mouse <<<<<<<<<<< Size: Control ID: ClassNameNN: Text: >>>>>>>>>>> Status Bar Text <<<<<<<<<<< >>>>>>>>>>> Visible Window Text <<<<<<<<<<< &Yes &No Would you like to proceed? >>>>>>>>>>> Hidden Window Text <<<<<<<<<<< my first attempt looked something like this: #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) ; Change to OnEvent mode WinWaitActive ( "Testprog", ["&Yes &No"], [timeout] ) ControlClick ( "Testprog", "&Yes &No", controlID [, "right"] [, clicks]] ) but obviously missing a lot , can you please help me? Thanks Eric Edited April 10, 2006 by Heracles
Valuater Posted April 10, 2006 Posted April 10, 2006 per info Title: Testprog per your script WinWaitActive ( "YaTBoT v2.7.1" ????? any chance this is on-line?? 8)
Heracles Posted April 10, 2006 Author Posted April 10, 2006 Don´t know what you´re talking about Any help would be appreciated
Valuater Posted April 10, 2006 Posted April 10, 2006 (edited) this will help alothttp://www.autoitscript.com/forum/index.php?showtopic=21048#8) Edited April 10, 2006 by Valuater
Heracles Posted April 10, 2006 Author Posted April 10, 2006 A lot of nice tips there! Figured out a much easier approach: #include <GUIConstants.au3> $i = 0 Do WinWaitActive ("Testprog") send("{TAB}") send("{ENTER}") Until $i = 1 And it works like a charm! Thanks a lot!
Moderators SmOke_N Posted April 10, 2006 Moderators Posted April 10, 2006 A lot of nice tips there! Figured out a much easier approach: #include <GUIConstants.au3> $i = 0 Do WinWaitActive ("Testprog") send("{TAB}") send("{ENTER}") Until $i = 1 And it works like a charm! Thanks a lot!Your loop never stops... Might try this:HotKeySet('{ESC}', 'ExitNow') While 1 WinWaitActive('Testprog') Send('{Tab}') Send('{ENTER}') Sleep(10) WEnd Func ExitNow() Exit EndFuncThe Hotkey will let you press Esc to exit the script, so at least you have some control over it. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
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