Unit name change
James Sentman
james at sentman.com
Tue Sep 29 10:21:12 EDT 2015
Do you mean in scripts? All references in other objects like the web remote interfaces and such already use the uniqueID instead of the name, but scripts do not.
Some years ago I experimented with “tokenizing” all the scripts. Upon saving I went through and changed all the found unit names and changed them to the unit ID numbers and updated all my accessors to accept ID numbers as well as names. Then whenever you edited a script it would translate them back to the unit names.
This worked great in short term testing, but made things much more confusing in longer term testing because we can store unit names in so many ways, applescript lists and unit properties and such that it made things very confusing under certain circumstances so I never enabled it as a released feature. Though the accessors all still accept unit ID’s as well as names as I imagined that might be useful someday.
At the time there was no way to delineate that something in a text field holding a script was anything special as far as a token rather than a string. What I really wanted was what I can do now by inserting blocks of what apple calls “tags” into a text stream. I could look back into that and see if I can now make it happen in a reasonable straightforward way. I really liked the idea of it, but applescript just aren’t accessible enough to make sure it never did unexpected things.
Or I could do some improvements on the find dialog and make it a find/replace dialog.
I will add those things to my list of stuff to research, but none of it is going to help you today I’m afraid.
> On Sep 29, 2015, at 9:46 AM, Chuck <xtension4osx at mac.com> wrote:
>
> James and Michael,
>
> I am in the process of renaming items and it is a real pain.
>
> If I change the name of a unit from A to B I have to find every occurrence of A and manually change it to B. This is tedious and time consuming.
>
> Would it be possible to incorporate some sort of link that would allow all occurrences of A to be changed to B if it was changed in the Master List? Kind of like what we have now for the differences in Vera versus XTension. Even having a “replace with” in the find feature would be a big bonus.
>
> This really would be a real time saver if for some reason the names are changed.
>
Thanks,
James
James Sentman http://sentman.com http://MacHomeAutomation.com
More information about the XTensionList
mailing list