Note that there are some explanatory texts on larger screens.

plurals
  1. POApplescript will run as script but not application
    primarykey
    data
    text
    <p>I recently installed Warcraft3:TFT on my Mac using Wine because the Mac version doen't <em>support</em> Lion. I wrote a script using Applescript to run the terminal command for Wine and then disable my hot corners so I wouldn't have any issues with navigating the screen.</p> <p>I wrote the script and it runs fine through Applescript (Compile > Run). The real problem comes in when trying save the script as an application. I save it as an application and then try to run the application (named "Warcraft III - The Frozen Throne") and get this error:</p> <p><img src="https://i.stack.imgur.com/XOHP2.png" alt="error message on script app execution"></p> <p>Here is the script itself:</p> <pre><code>set settings1 to {"-", "Desktop", "Start Screen Saver", "Mission Control"} set settings2 to {"-", "-", "-", "-"} tell application "Terminal" do script "/opt/local/bin/wine ~/.wine/drive_c/Program\\ Files/Warcraft\\ III/war3.exe" end tell tell application "System Preferences" reveal pane id "com.apple.preference.expose" activate tell application "System Events" tell window "Mission Control" of process "System Preferences" click button "Hot Corners…" tell sheet 1 tell group 1 set theSettings to settings2 set functionKeys to false repeat with k from 1 to 4 set theValue to item k of theSettings tell pop up button k if value is not theValue then click click menu item theValue of menu 1 end if end tell end repeat end tell click button "OK" end tell end tell end tell quit end tell display alert "Done playing?" buttons {"Yes"} set response to button returned of the result if response is "Yes" then --Start return to normal settings tell application "System Preferences" reveal pane id "com.apple.preference.expose" activate tell application "System Events" tell window "Mission Control" of process "System Preferences" click button "Hot Corners…" tell sheet 1 tell group 1 set theSettings to settings1 set functionKeys to true repeat with k from 1 to 4 set theValue to item k of theSettings tell pop up button k if value is not theValue then click click menu item theValue of menu 1 end if end tell end repeat end tell click button "OK" end tell end tell end tell quit end tell --End return to normal settings --quit X11 and terminal tell application "X11" quit end tell tell application "Terminal" quit end tell end if </code></pre> <p>This is the first time I have actually written in Applescript so there maybe some sort of error in it that I am not seeing. Thanks in advance for any advice or input!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload