I use an app (Hatari) which always opens its window in the middle of the screen, meaning I have to reposition it every time (I drag it to the top left corner). The app won't remember its screen position, nor is there an option for this in its preferences.
So I was thinking AppleScript or Automator would be of help here, but which one and how?
I'm on MacOS 10.14 (Mojave)
I was thinking of the script to be in the OSX Dock, and when clicked does the following:
1) open the specific app in question
2) position the window in the top left-hand corner
Update: I played around with the AppleScript Script editor app and have so far solved the first step (opening the app):
The next step is a little harder. I've tried various solutions found online, but none of them appear to work (and the error messages in Script Editor aren't very helpful or detailed):
I suspect one of them will work, but that my syntax and/or values are wrong.
So I was thinking AppleScript or Automator would be of help here, but which one and how?
I'm on MacOS 10.14 (Mojave)
I was thinking of the script to be in the OSX Dock, and when clicked does the following:
1) open the specific app in question
2) position the window in the top left-hand corner
Update: I played around with the AppleScript Script editor app and have so far solved the first step (opening the app):
Code:
tell application "Hatari"
activate
end tell
The next step is a little harder. I've tried various solutions found online, but none of them appear to work (and the error messages in Script Editor aren't very helpful or detailed):
Code:
set the position to {12, 22}
set position of application "Hatari" to {724, 11, 967, 647}
set bounds of front window to {300, 30, 1200, 900}
set position of front window to {1, 1}
set position to 120, 220
I suspect one of them will work, but that my syntax and/or values are wrong.
Last edited: