AutoHotkey Community

It is currently May 27th, 2012, 10:02 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: March 11th, 2008, 11:54 pm 
Offline

Joined: June 21st, 2007, 10:10 pm
Posts: 41
Location: 43.074233,-72.424707
a helpful function.
since we all know that when we are debuging a script that handles lots of numbers and such, and something manages to go spectacularly wrong, we fill the script with messageboxes to figure out where the error is occurring. introducing: debugmsgbox(...). in the beginning of your script, add this function. then somewhere in the autoexecute section, define a_debugmsgbox as 1 or 0. if its 0, msgboxes wont show. if its 1, they will.

Code:
debugmsgbox(title = "", text = "Press OK to Continue.", timeout = "")
{
  global a_debugmsgbox
  if not a_debugmsgbox
    return
  msgbox, 0, %title%, %text%, %timeout%
}

_________________
problems := bugs + errors + glitches
(problems != 0) ? code := debug(code) : celebrate()
--
humor for: 1. Programmers 2. Everyone


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: sks and 23 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group