spammeblind Posted June 18, 2007 Share Posted June 18, 2007 I have a script in which I have two IE windows, I have named them main and popup. I need to know that Main is the active window at the end of my loop. I initially started my script with WinGetHandle for Main, and ended it with WinActivate for Main. Intermittently I find that popup is the active window after the final WinActivate command. At this point I have two questions. Im still pretty new to Autoit, so I may find Im missing some questions. 1. Is there a definite way to verify that Main is my active window at the end of the loop. Currently Im considering closing popup before activating the Main window, but Im still running into problems with focus. 2. What commands can I use to debug the script? Im thinking about showing the handle for Main throughout the script to see when I loose the Main window. What command can I use to show the handle? Thanks, Spammeblind Link to comment Share on other sites More sharing options...
Uten Posted June 18, 2007 Share Posted June 18, 2007 1: WinActive in the help file 2: Search for +Assert +dbg Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
spammeblind Posted June 18, 2007 Author Share Posted June 18, 2007 1: WinActive in the help file 2: Search for +Assert +dbgI'm working with SciTE Version 1.73I found WinActive in Help, but there are No Topics found for the searches for +Assert +dbg, or searches or Assert dbg. Am I missunderstanding your post?Thank you,Spammeblind Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 18, 2007 Share Posted June 18, 2007 I'm working with SciTE Version 1.73I found WinActive in Help, but there are No Topics found for the searches for +Assert +dbg, or searches or Assert dbg. Am I missunderstanding your post?Thank you,SpammeblindI think he meant the AutoIt help file, usually at: C:\Program Files\AutoIt3\AutoIt3.chm Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Uten Posted June 18, 2007 Share Posted June 18, 2007 (edited) I'm working with SciTE Version 1.73 I found WinActive in Help, but there are No Topics found for the searches for +Assert +dbg, or searches or Assert dbg. Am I missunderstanding your post? Thank you, SpammeblindSearching the forum would probably be better.. Func dbg($msg, $line = @ScriptLineNumber, $err = @error, $ext = @extended) If Not @Compiled Then ConsoleWrite("(" & $line & ") := (" & $err & ")(" & $ext & ") " & $msg & @CRLF) EndIf EndFunc ;==>dbg Func Assert($bool, $msg = "", $line = @ScriptLineNumber, $err = @error, $ext = @extended) If Not $bool Then dbg("FAILURE: Assert failed :" & $msg, $line, $err, $ext) EndIf EndFuncoÝ÷ Ù&¦¦W®±¨jëh×6dbg("This is a test. Click on this line in scites output pan") Assert(0, "Click on this line to") Assert($hExpected == $hCurrent, "The window handel has changed!") EDIT: Saple usage Edited June 18, 2007 by Uten Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
tannerli Posted June 20, 2007 Share Posted June 20, 2007 I want to do something similar, but I don't have a clue which window could be active, is there Somethin like GetActiveWindow() which returns the handle/title of the active window? Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 20, 2007 Share Posted June 20, 2007 I want to do something similar, but I don't have a clue which window could be active, is there Somethin like GetActiveWindow() which returns the handle/title of the active window?WinGetHandle("", "") Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
tannerli Posted June 21, 2007 Share Posted June 21, 2007 WHY for heavens sake do i never find this stuff on my own?!? 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