Ok, I am new here, and I’m not exactly the best at AppleScript, so lauph at me all you would like.
Alright, I have a video game called StarCraft. (It’s an old game by Blizzard; the people who made World of Warcraft)
In this video game, you are able to toggle the window from full-screen to half-screen. (Command + M)
But now, it appears to not be able to do that anymore, because of an update causing it to have full focus of the keyboard. (Can’t switch windows, because alt+tab does not work)
Now, I am a little fluent with AppleScript, and have learned that you can make hotkeys to execute specific commands. So, I figured, I’ll just write a simple AppleScript that will press the hotkeys to minimize from full-screen to half-screen. (Command + M)
So here is what I have so far. (Note, when I start the game, it will make a dialog popup asking options. To continue to the game, I just press “OK”, keystroke “Enter”, as shown in the image below)
tell application "Starcraft (Carbon)" activate end tell keystroke "enter" keystroke "command" keystroke "M"
I think you can guess what I am trying to do. Just tell StarCraft to start up and tell it to hit “Enter” or “OK” for me when the startup options popup (the image) and then keystroke the combination Command+M, causing it to go into half screen.
Can someone “debug” this script for me?
By the way, I’m running Mac OSX 10.4.8 on an MacBook (Intel Mac)