After re-reading the Going Crazy with Macros series, I started playing around with a couple of macros that I had written and stored in the workspace table. I realized that I should be able to drop a text file version of the scripts into the Macros sub folder and simply my calls (from workspace.refsLink() to just refsLink()).
The first thing that I tried to do was just save the script as a text file. This worked as expected on a simple script. Cool! Emboldened, I tried it with a script that was a little more compex, containing a while loop and a couple if statements. Saving this script as a text file crashed Radio (8.0.5 on OS X). I am not sure what is causing the crash, but it occurs after the text file was written.
When I tried calling the complex script, I got a macro error roughly stating:
Could not find macro named "spamEncoder"
Looking at the text file, I noticed that I had some lines commented out as well as an inline comment. Somehow I figured that the could be causing the problems, so I removed them. And it worked!
So if you want to take existing scripts and convert them to text file macros. First remove all of the comments and then save them as a text file in the Macros sub folder. You may crash Radio in the process, but after you restart, you macros should be available.
10:30:14 PM
|