traltixx Posted August 9, 2006 Posted August 9, 2006 Hi,Im rather new to AutoIt and am not sure if it has the capability to do what I want. What Im trying to do is wait for a certain window to come up, maximize it and set it as active so that I may use Send() to give commands. There are 2 problems here that Im facing:1) The full name of the window title is unknown except that it ends with a certain string (thus Im attempting to use WinWaitActive but cant seem to use wildcards or regular expressions).2) The window might possibly be minimized.Any ideas?Thanks!
Daniel W. Posted August 9, 2006 Posted August 9, 2006 Lookup: WinTitleMatchMode WinGetState WinSetState @SW_MAXIMIZE WinActivate WinActive --------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]
Bert Posted August 10, 2006 Posted August 10, 2006 (edited) Opt("WinTitleMatchMode", 2) ; use any part of the window name $wintitle = "use any part of the window title here" $wintext = "use any part of the window text here if needed" winwait($wintitle, $wintext) sleep(50) WinSetState($wintitle, $wintext, @SW_MAXIMIZE) sleep(200) WinActivate($wintitle, $wintext) sleep(50) send("what ever key you like") Edited August 10, 2006 by vollyman The Vollatran project My blog: http://www.vollysinterestingshit.com/
traltixx Posted August 10, 2006 Author Posted August 10, 2006 Thanks. Although running WinSetState without $wintext gives an error, but setting $wintext to "" seems to solve it (and i dont need to search for text anyway). Thanks alot guys
traltixx Posted August 10, 2006 Author Posted August 10, 2006 Also I noticed that AutoIt does not work when a windows machine is locked. Is this intended or hard to get around? Thanks again!
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