How to do a variable rename?

I’m just trying out Script Debugger and it is certainly a step up from Script Editor! :slight_smile:

One feature I’m used to from other IDEs is simple refactoring, i.e. symbol renaming. For example is it possible to rename a variable in its definition and all its uses?

Thanks heaps!

We don’t offer any refactoring tools in Script Debugger. You’ll have to rely on Find & Replace for variable renaming.

Fair enough. I was just curious.

I’m using AppleScript’s variables renaming AppleScript since 2005.
This script detect AppleScript lexical coloring and rename variables only.

OK, I’ll bite. Where do we get this script?

(1)Donload zip archive and extract it
(2)Move script to /Library/Scripts/Script Editor Scripts
(3)Open some AppleScript with Script Editor
(4)Select script body to replace
(5)Display contextual menu by clicking mouse right button
(6)Select “:large_blue_circle:rep variable name within selection v2.21(e)” from contextual menu

This script is distributed as a part of my ebook’s supplement script (Piyomaru Script Assistant). This script runs till 7/6/2020.

I wrote this script in Mac OS X 10.3 or 10.4. This script depends on Script Editor’s function. So this script does not run with Script Debugger. I have a lot of helper script like this work with Script Editor.

Now, we have Cocoa skill to process AppleScript document. I think I can port these script to Script Debugger.

This script process AppleScript’s lexical element by color. So, you have to set Script Editor’s lexical color style settings by unique values.

Thanks for sharing. If you decide to port to to SD, please let us know. I would be very interested in that.

JMichaelTX, where do you think the suitable place to sell such a small softwares? I think (2) is the best place.

(1) Mac App Store : Regulations are not for script applications. Though I’m selling 100% AppleScript based (some little routine in Objective-C included), Mac App Store is not the suitable place because of its regulation is not for AppleScripts controlling other application.

(2) The online shop I’m selling my PDF based ebooks. This store is available to use PayPal, Credit Cards (VISA, mastercard). There is no regulation for distributing softwares.

(3)Other : I bought Shane’s books via