External debugging with FastScripts

Something strange is happening when externally debugging with FastScripts:

  1. The open script (.scpt) is in Debug mode.
  2. I trigger the script via FastScripts.
    → Every instance of text gets replaced by rich text.

For example, this:

set a to "10" as text
set b to text 2 of a

…becomes this:

This can happen because of the poor design of Apple’s Text Suite. This defines the term rich text and gives it the same code as text (ctxt). You can see this in Mail’s dictionary, for example.

What application are you addressing?

In the meantime I found out it’s not limited to externally debugging with FastScripts, as previously stated.

I can reproduce the behavior simply by compiling code inside a FastScripts tell block. No matter if in debugging mode or not.

Just paste this and compile:

tell application "FastScripts" to set a to "" as text

So I guess it’s a FastScript problem. (?)

I just checked – FastScripts does use Apple’s Text Suite, defining rich text. It would be worth emailing Daniel about it.

Yes, I’ll do. Done. Thanks.

I’m sorry I’ve taken (just over) 3 years to act on this, but I wanted to let you know I finally put together a beta release with the fix in place, taking @ShaneStanley’s suggestion to simply remove the text suite from FastScripts’s own scripting definiton. If you are still using FastScripts and wish to give it a try, you can download the 2.0b3 version here:

https://red-sweater.com/fastscripts/FastScripts2.8b3.zip

Let me know if you try it, if it does the trick. I confirmed it in my copy of Script Debugger and it seemed to be fine.

Daniel

Thanks for notifying!

1 Like

Thanks, Daniel — and welcome!

1 Like

Many thanks, Daniel. And great to see you here, in the center of the AppleScript world.

Ray

1 Like

I should have joined a long time ago!