- Joined
- Sep 29, 2008
- Messages
- 6
- Reaction score
- 0
I'm a new Applescript user who is trying to accomplish what I thought was something easy: Switch from one application to the one I was using immediately previously.
For example, if I have switched from Safari to Mail, and I want to switch back to Safari again. I want an Applescript to pay attention to which application I was previously in, and, when I activate the script, switch me back to the one I was just using. If I activate it again, I want to be switched to the other application I was in, because it's now the previous application.
Is there someway to accomplish what I want to do using AppleScript? I don't have enough experience in Applescript to figure out the script necessary to accomplish the task. I've searched the net without finding a script to dowhat seems like something people would need a lot, but...
My basic thought was to get the name of the current application, save it to a variable, switch to the previous application, which was stored in a different variable, swap the two variables. But I began having issues with what the 'current application' was, as far as Applescript was concerned, and swapping.
But there also seems to be a chicken-and-egg situation developing in getting the first pass through.
Or maybe that's not the way to tackle the problems.
Can anybody help?
Thanks.
/ Peter Morgan
For example, if I have switched from Safari to Mail, and I want to switch back to Safari again. I want an Applescript to pay attention to which application I was previously in, and, when I activate the script, switch me back to the one I was just using. If I activate it again, I want to be switched to the other application I was in, because it's now the previous application.
Is there someway to accomplish what I want to do using AppleScript? I don't have enough experience in Applescript to figure out the script necessary to accomplish the task. I've searched the net without finding a script to dowhat seems like something people would need a lot, but...
My basic thought was to get the name of the current application, save it to a variable, switch to the previous application, which was stored in a different variable, swap the two variables. But I began having issues with what the 'current application' was, as far as Applescript was concerned, and swapping.
But there also seems to be a chicken-and-egg situation developing in getting the first pass through.
Or maybe that's not the way to tackle the problems.
Can anybody help?
Thanks.
/ Peter Morgan