meatsack Posted January 27, 2010 Share Posted January 27, 2010 Are there any debugging resources besides SciTE? I just can't figure out how to debug step by step like you can in VB using SciTE. I have read through the tutorials FAQ's, Tutorials, wiki and all the linked resources cited from autoitscript.com What I am trying to do is run my script line 1, then line 2, etc to see where it hangs or seems to have a problem. Any help would be appreciated. Here is the code I am looking at. The following script hangs and the last step it executes seems to be sending the "windows" or (start button) key as it brings up the start selection, however I am generating several other prototype scripts that seem to hang when I try similar functions: Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("Fujitsu Menu","Fujitsu Tablet Contr") If Not WinActive("Fujitsu Menu","Fujitsu Tablet Contr") Then WinActivate("Fujitsu Menu","Fujitsu Tablet Contr") WinWaitActive("Fujitsu Menu","Fujitsu Tablet Contr") Send("{ESC}{LWINDOWN}{LWINUP}") WinWait("classname=Shell_TrayWnd","Running Applications") If Not WinActive("classname=Shell_TrayWnd","Running Applications") Then WinActivate("classname=Shell_TrayWnd","Running Applications") WinWaitActive("classname=Shell_TrayWnd","Running Applications") Send("{ESC}{TAB}{TAB}{TAB}{TAB}") WinWait("Program Manager","FolderView") If Not WinActive("Program Manager","FolderView") Then WinActivate("Program Manager","FolderView") WinWaitActive("Program Manager","FolderView") Send("2{ENTER}") WinWait("Todo Main - Microsoft Office OneNote","Writing Tools") If Not WinActive("Todo Main - Microsoft Office OneNote","Writing Tools") Then WinActivate("Todo Main - Microsoft Office OneNote","Writing Tools") WinWaitActive("Todo Main - Microsoft Office OneNote","Writing Tools") Send("{CTRLDOWN}d{CTRLUP}d{LWINDOWN}{LWINUP}") WinWait("classname=WorkerW","FolderView") If Not WinActive("classname=WorkerW","FolderView") Then WinActivate("classname=WorkerW","FolderView") WinWaitActive("classname=WorkerW","FolderView") Send("{LWINDOWN}{LWINUP}") WinWait("classname=Shell_TrayWnd","Running Applications") If Not WinActive("classname=Shell_TrayWnd","Running Applications") Then WinActivate("classname=Shell_TrayWnd","Running Applications") WinWaitActive("classname=Shell_TrayWnd","Running Applications") Send("{ESC}{TAB}{TAB}{TAB}{TAB}") WinWait("classname=WorkerW","FolderView") If Not WinActive("classname=WorkerW","FolderView") Then WinActivate("classname=WorkerW","FolderView") WinWaitActive("classname=WorkerW","FolderView") Send("dr{ENTER}") WinWait("resume2009 - Microsoft Word","MSO Generic Control ") If Not WinActive("resume2009 - Microsoft Word","MSO Generic Control ") Then WinActivate("resume2009 - Microsoft Word","MSO Generic Control ") WinWaitActive("resume2009 - Microsoft Word","MSO Generic Control ") Send("{LWINDOWN}{LWINUP}") WinWait("classname=Shell_TrayWnd","Running Applications") If Not WinActive("classname=Shell_TrayWnd","Running Applications") Then WinActivate("classname=Shell_TrayWnd","Running Applications") WinWaitActive("classname=Shell_TrayWnd","Running Applications") Send("{ESC}") Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 27, 2010 Moderators Share Posted January 27, 2010 meatsack,If you add this line to your script, you will be able to see the line where it is hanging by looking at the tooltip in the tray icon:Opt("TrayIconDebug", 1)There are a couple of step-by-step debuggers in the Examples section, but I believe that they do not work well with Vista/Win 7 because of UAC. If you have the full version of SciTE4AutoIt3, there are a number of debugging tools available to you there as well (automatic insertion/deletion of trace lines, ConsoleWrite, MsgBox commands, etc).I hope that helps. M23P.S. When you post code please use Code tags - it makes the thread much easier to read. Put [autoit ] before and [/autoit ] after your posted code (but omit the trailing space - it is only there so the tags display here). Or press the blue button just under the BOLD toolbar button. Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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