I’m writing a program that uses the Console to log A LOT of information. As such, I have placed a checkbox that I want to “mute” the program when checked.
I found the “on log” command, but I can’t find a way to get it to work properly.
on log something
if VerboseMode = true then log something
The problem is that this makes the program go through an infinite loop, and I get a stack overflow error.
Is there a work-around? Am I missing something?
of course you get an infinite loop because the on log handler is called on and on, if VerboseMode is true.
A way to log conditionally is this handler
if VerboseMode then log msg
Yeah, that’s what I figured. It’s just a little extra work to type each time. [Super-lazy much?]
If you are using AppleScript Editor at least under Snow Leopard you can just hit esc, and get a list with completions for what you recently typed.
It would be very nice if each of you guys who use Script Debugger to send a mail to email@example.com and ask them
to please fix the scripts for using BBAutoComplete with ScriptDebugger 4.5