Script Name Change

in Script development
Subscribe to Script Name Change 6 posts, 4 voices



Chris4 Scriptwright

Hey,

I've messed up my script by changing the name of it.

My script has an auto updater.

I'm new to scripting, I didn't realise that when I change the name it, it wouldn't replace the old one.

So now all my users have two scripts, one with the old name and one with the new.

So when I auto update it, it asks to install it twice.

Really messed that up :-/

Is there anything I can do?

Chris

 
jerone Scriptwright

Maybe you can add some check in your new script that looks if the old one excist (e.g. a variable) and add an alert to delete the old one.

 
Chris4 Scriptwright

Yeah that's a good idea. Wish I knew how to do that.

 
DavidJCobb Scriptwright

Can't access variables cross-sandbox-edly, but you can have the scripts store a guaranteed-to-be-unique variable in the unsafeWindow, then have them all check for it.

 
sizzlemctwizzle Scriptwright

I'd advise you to not change the name of the script anymore. Your script users will just have to realize they have two version of the same script installed. I changed my updater to not prompt the user to install the latest version if the names don't match. Since it's not too logical for my script to ask a user to install a script with a different name.

 
Chris4 Scriptwright

Ok, thanks. I'll update it to your new script.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel