This is my first post and I’m new to AppleScript. Searched this forum and Extensis Support without an answer.
GOAL: close the Suitcase window.
Upgraded to Extensis Suitcase X1 (11.0.4). Suitcase is a Startup item when I log into my account. It launches but the window stays open. (In previous version window flashed on screen and closed after Startup.) I would like to write a script that closes the Suitcase window after it launches (after I log into my account). I’m assuming I can make the script the second Startup item for my account. Wrote and ran the following:
tell application “Extensis Suitcase X1”
activate
close window
end tell
The window activates but doesn’t close. I get the following AppleScript Error:
“Extensis Suitcase X1 got an error: window doesn’t understand the close message.”
TIA for any help.
Model: Power Mac G5
AppleScript: 1.9.3
Browser: Safari 125.12
Operating System: Mac OS X (10.3.8)
NovaScocian, I tried the variation you suggested and got the following error:
“Extensis Suitcase X1 got an error: window 1 doesn’t understand the close message.”
Perhaps I need a more complicated script than this; one that asks for the window ID before asking to close it? I’ve tried many variations of identifying the window including putting quotes around the “1” and “window 1” and “Suitcase” (the name in the header), but I get the same error message. It seems Suitcase does not want to respond to a close message no matter what I ask it to close.
A “count window” in suitcase will report 0… So there is no opened window in Suitcase from an AppleScript point of view ! The main window is not a window… Bug from Extensis ?
Anyway I found a solution to hide Suitcase :
tell application "System Events"
set visible of process "Extensis Suitcase" to false
end tell
To launch and hide Suitcase X1 at startup save the folowing script as an application and put it in you account startup list (uncheck the “Launch at startup” check box in the Suitcase prefs)…
on run
tell application "Extensis Suitcase X1"
activate
end tell
tell application "System Events"
set visible of process "Extensis Suitcase" to false
end tell
quit
end run
But if Suitcase is a startup item under the “Startup Items” tab of the “Accounts” panel of “System Preferences”, checking the box in the left column of the Startup Items list will hide it at startup. No need of an AppleScript at all. (I don’t have Suitcase, but this certainly works for other applications).
Thanks, bapval. Ran it manually and the script works great. I’ll put in StartUp and see how it works there.
You’re right, NovaScotian. You’d think that checking the box in my account startup items would handle that, but it doesn’t. bapval’s script seems to do the trick. Maybe the next version of Suitcase or OS will take care of the problem.
Learning something new is always a joy. Thanks to both of you for your help.