Bokkie Posted April 21, 2006 Share Posted April 21, 2006 (edited) In VB6 I can use a multiple statements on a line using a : like I tried in the snippet below which obviously does not compile in Scite. I've got a tricky set of loops to debug and for some reason Scite's debug to Msgbox does not work and produces compilation errors. Ideally I'd like to add the MsgBox to the end of the line so that I can at least see the main code clearly and it'll be easy to strip off the MsgBox calls later. Is there an equivalent syntax in AutoIT?$i = 1 : MsgBox(0, "", $i) $j = 2 : MsgBox(0, "", $j) exitEdit: I could write the following which obviously works but the first is 'cleaner' for my debugging purposes.$i = 1 MsgBox(0, "", $i) $j = 2 MsgBox(0, "", $j) exitEdit: Following is Scite's Ctrl-Shift-D rendition. Maybe I'm doing something wrong or misunderstanding it what it's meant to be used for? I have no idea what it's meant to produce but it looks a mess.$i = 1 $j = 2 exit MsgBox(262144,'Debug line ~3','Selection:' & @lf & '$i = 1 $j = 2 ' & @lf & @lf & 'Return:' & @lf & $i = 1 $j = 2 & @lf & @lf & '@Error:' & @lf & @Error);### Debug MSGBOX Edited April 21, 2006 by Peter Hamilton-Scott Link to comment Share on other sites More sharing options...
CyberSlug Posted April 21, 2006 Share Posted April 21, 2006 I've seen this mentioned before, but I cannot find the thread.If I recall correctly, AutoIt's lexer and/or parser relies on line endings pretty heavily, so there really is not any way to combine multiple commands like that on a single line.There are clever tricks such asIf MsgBox(0,"","one") And Msgbox(0,"","two") Then $x=0that let you call MsgBox on one line, but this hack is far from clear.Something that might help would be putting a certain identifier at the end of each debug line such as ;###Then you could a regular expression for .*###.# and replace with nothing.(Or you could doSearth > Find ### Mark AlSearch > Toggle bookmarksTools > Insert bookmarked lines) Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! 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