mardi 10 mars 2015

Simple 3 line applescript - Error -128


I have a scenario where I'd like 2 separate applescripts.


The idea is super simple. 2 Applications, but only one runs at a time.


Example: Close application 1, launch application 2 (and vise versa)


Here are the 2 scripts I have:


A.) OpenSteam



tell application "Plex Home Theater" to quit
delay 5
tell application "Steam" to activate


B.) OpenPlex:



tell application "Steam" to quit
delay 5
tell application "Plex Home Theater" to activate


The script "OpenSteam" works perfectly fine. It does exactly what I want it to do. However, the same script in reverse (OpenPlex) does not seem to work.


Steam closes, but my script then gives me the following error *Note, Plex is not launched:



error "Steam got an error: User canceled." number -128


I have no idea what this means, and was hoping someone could help me out.


--


I got my initial information from here: http://ift.tt/1AewhC3 I have revised the example scripts to fit my needs.





Aucun commentaire:

Enregistrer un commentaire