K, I have a little function I wrote to save captured output text to a TextEdit document (it’s a gui wrapper for a shell script)
the snippet is
on saveOutput(theOutput)
set theReply to (button returned of (display dialog "Display Output?"))
if theReply is "Ok" then
display dialog "wtf"
(*tell application "TextEdit"
make document with properties {text:theOutput}
end tell*)
end if
end saveOutput
Ok, now the function is only called in an “on click theObject” block. And only occurs when a button is clicked. Fair enough.
I can verify that the code isn’t actually running…since the display dialog command never executes. However, if I uncomment the tell application “Finder” block when the program starts TextEdit is opened with a blank document.
Recomment the block, start the program…voila! No more TextEdit.
What gives?