Jump to content

Any debugging resources besides SciTE?


 Share

Recommended Posts

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

  • Moderators

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. :D

M23

P.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.

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...