Jump to content
Sign in to follow this  
jaberwacky

"Debug to MsgBox"

Recommended Posts

jaberwacky

Most likely a SciTE bug...

$a = 0
$b = 1

Put the cursor at the start of line 2, just before "$b" and hit Ctrl-Shift-d to insert a debug MsgBox().

$a = 0
$b = 1
MsgBox(262144,'Debug line ~' & @ScriptLineNumber,'Selection:' & @lf & '
$b' & @lf & @lf & 'Return:' & @lf & 
$b) ;### Debug MSGBOX

Updated post to conform to PsaltyDS's sensible approach.

Edited by jaberwocky6669

Share this post


Link to post
Share on other sites
PsaltyDS

All you need is this to demo:

$a = 0
$b = 1

Put the cursor at the start of line 2, just before "$b" and hit Ctrl-Shift-d to insert a debug MsgBox().

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
trung0407

you might want to look at this http://www.autoitscript.com/forum/index.php?showtopic=21834

Share this post


Link to post
Share on other sites
jaberwacky

All you need is this to demo:

$a = 0
$b = 1

Put the cursor at the start of line 2, just before "$b" and hit Ctrl-Shift-d to insert a debug MsgBox().

;)

Yeah, that's a much better example. Lulz, when I was here earlier today I wasn't exactly ready for primetime.

Um, yeah, no Ok, yeah, well, I wouldn't use it for something so small. A couple of well placed print statements will do the trick.

Anyways, it isn't earth shattering just something to look out for if you use 'debug to msgbox'

Edited by jaberwocky6669

Share this post


Link to post
Share on other sites
Jos

Uploaded a updated AutoItTools.lua which removes any CR or LF characters from the debug statement.

Give it a try to see if that works for you too.

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
PsaltyDS

Worked for me. Output:

$a = 0
MsgBox(262144,'Debug line ~' & @ScriptLineNumber,'Selection:' & @lf & '$a' & @lf & @lf & 'Return:' & @lf & $a) ;### Debug MSGBOX
$b = 1
MsgBox(262144,'Debug line ~' & @ScriptLineNumber,'Selection:' & @lf & '$b' & @lf & @lf & 'Return:' & @lf & $b) ;### Debug MSGBOX

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
jaberwacky

Yup, works fer me!

Thanks once again Jos. I hope you didn't work too hard to fix that bug, oh lordy. Because, you know, the fate of mankind's future rested in the balance. ;)

Well gosh, since I'm on a roll. If you use Trace: Add trace lines. Save the file. And then Trace: Remove all trace lines it takes all of the blank lines with it too. I know I could just ctrl-z.

Edited by jaberwocky6669

Share this post


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
Sign in to follow this  

×