EagleTG Posted October 20, 2005 Share Posted October 20, 2005 I've created the following for the scripts I write. It helps me tremendously when writing AutoIt scripts. There might be a better/easier way, not sure. Kind-of a newbie at AutoIt. #include <GUIConstants.au3> Dim $dbg GuiCreate ("Debug Window",500,75,0,0,"",$WS_EX_TOPMOST) GuiSetState (@SW_SHOW) Func Debug($dbg) GuiCtrlCreateLabel ($dbg & " ",10,10) ;Sleep(1000) EndFunc Debug ("Nothing to report") It creates a window, top-left of the screen. Anywhere in your script, you can use Debug("Text Here") and it will update that (always on-top) window to tell you where you are within your script. Just thought this might help someone. I'm also curious if there are any better ways that people have found of doing something similar? Basically, just to know exactly what your script is doing, etc. For example, if it's waiting for a window with a WinWaitActive and that window never shows up, if you put a Debug("Waiting for Window [window name here]"), it'll give you a checkpoint so you can see where the script got hung-up. The commented ;Sleep(1000) is a delay so you can see each step of lines that run by too quickly. Enjoy! Link to comment Share on other sites More sharing options...
w0uter Posted October 20, 2005 Share Posted October 20, 2005 consolewrite. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Developers Jos Posted October 20, 2005 Developers Share Posted October 20, 2005 consolewrite.ConsoleWrite() will only work when you shell your AutoIt script from it and your editor supports reading the output produced.Not everybody is using the SciTE4AutoIt3 setup.@EagleTG: You might want to have a look at SciTE4AutoIt3 and the Debug Scripts it includes. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
SlimShady Posted October 20, 2005 Share Posted October 20, 2005 See my version. Many dependent functions, I know. It's better this way.Debug.au3 Link to comment Share on other sites More sharing options...
EagleTG Posted October 20, 2005 Author Share Posted October 20, 2005 JdeB: SciTE4AutoIt3 looks totally awesome. I'm digging into that right now. I've got it installed, and am settling in. Thanks for that tip... I've been trolling the forums for a while, how did I EVER miss this?!! SlimShady: Thanks a million, yours looks awesome. Very nice... I never thought to use a Textbox so I could have a history... :doh!: Link to comment Share on other sites More sharing options...
trids Posted October 21, 2005 Share Posted October 21, 2005 Another alternative which i still use: a UDF by cyberslug called _Debug. Here's an example ..http://www.autoitscript.com/forum/index.ph...indpost&p=39290 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