Jump to content

Code Window

Recommended Posts

Guest steveam

In version 2.6 when you opened the task tray icon you were able to see where the script was. I am writing a script that is stopping, and I am having trouble identifing where in the code it's stopped. Where should I be looking?


Link to post
Share on other sites

Beware: TrayIconDebug does not work for NT.

And you may also find the _Debug() UDF by Cyberslug extremely useful...

Func _Debug($message)
;From Cyberslug, circa 2004-05-10
;Until AutoIt gets full debugging features, the following might help some people:
;   Example usage:
;   _Debug('#ds');open log window
;   ; start of script goes here...
;   _Debug("The value of some variable foo is:" & $foo)
;   _Debug("Another debug message")
;   ; end of script...
;   _Debug('#de');keep log window open until you close it
    $sAutoItWinGetTitle = AutoItWinGetTitle()
    If $message = "#ds" Then
        WinActivate( $sAutoItWinGetTitle )
        WinMove ( $sAutoItWinGetTitle, "", @DESKTOPWIDTH / 4, @DESKTOPHEIGHT / 4, @DESKTOPWIDTH / 2, @DESKTOPHEIGHT / 2 )
        WinSetState( $sAutoItWinGetTitle, "", @SW_SHOW )
    ElseIf $message = "#de" Then
        Local $previous = ControlGetText( $sAutoItWinGetTitle,"", "Edit1")
        ControlSetText ( $sAutoItWinGetTitle,"", "Edit1", $previous & $message & @CRLF)
        ControlSend( $sAutoItWinGetTitle,"", "Edit1", "^{END}")
Link to post
Share on other sites
Guest steveam

Thanks. This is what I was looking for.

There is an option you can enable.

It's called TrayIconDebug. If it's enabled you can see which line is currently executed. You see it when you hover over the tray icon.

Here's the code:

Opt("TrayIconDebug", 1)


Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...