Maybe someone can help me figure out why my Automator application keeps failing. I use Moom to arrange my application windows for when I'm working on my 1440x900 laptop or in clamshell mode with my 1440p display. Until now, my standard procedure when undocking/docking my computer was this:
It only takes like 15 seconds, but I figured why not integrate them into one application so I can set it and go, but it's not working.
In my attempted Application I have it set to quit all apps, launch the application "Open Resize Apps" and then run the Apple Script below to also open a new Finder window (which gets resized). That's when it just stops. I then use the second set of code below in an Apple Script to replicate Moom's keyboard shortcut.
What I don't understand is this: if I create an Automator application that only runs the "System Events" code it works fine. But if I plug in the systems event code as another Apple Script command in my big automator application that I'm trying to make, it doesn't work. Even when I use "Launch Application" to launch my "System Events" Automator application, it doesn't work. It just stops after it opens all of my resize apps.
Am I making sense? Could anyone offer any advice? Thanks!
EDIT: I attached screenshots of my not-working automator application.
[doublepost=1473212060][/doublepost]I just figured out something, one app that doesn't rearrange properly is Chrome and it gets ",," put in it's search bar. So perhaps the Moom keyboard short is failing when it reaches certain applications.
[doublepost=1473212499][/doublepost]Sorry, I fixed it. The key was to put in a "Pause" command for 4 seconds. Certain apps didn't have time to fully load I suppose. For instance, though the Mail window appeared, it wasn't resized. After passing for 4 seconds, it was resized with everything else. I guess the content needs to load as well.
- Launch created Automator Application "Quit All Applications" from Spotlight (does what name suggests)
- Launch created Automator "Open Resize Apps" from Spotlight (opens up the apps I want arranged"
- Type in global keyboard shortcut for Moom arrangement (shift-option-w)
- Launch "Quit All Applications" again
- Manually open iTunes and Mail
It only takes like 15 seconds, but I figured why not integrate them into one application so I can set it and go, but it's not working.
In my attempted Application I have it set to quit all apps, launch the application "Open Resize Apps" and then run the Apple Script below to also open a new Finder window (which gets resized). That's when it just stops. I then use the second set of code below in an Apple Script to replicate Moom's keyboard shortcut.
What I don't understand is this: if I create an Automator application that only runs the "System Events" code it works fine. But if I plug in the systems event code as another Apple Script command in my big automator application that I'm trying to make, it doesn't work. Even when I use "Launch Application" to launch my "System Events" Automator application, it doesn't work. It just stops after it opens all of my resize apps.
Am I making sense? Could anyone offer any advice? Thanks!
EDIT: I attached screenshots of my not-working automator application.
Code:
tell application "Finder"
activate
make new Finder window to home
end tell
Code:
tell application "System Events"
keystroke "„"
end tell
[doublepost=1473212499][/doublepost]Sorry, I fixed it. The key was to put in a "Pause" command for 4 seconds. Certain apps didn't have time to fully load I suppose. For instance, though the Mail window appeared, it wasn't resized. After passing for 4 seconds, it was resized with everything else. I guess the content needs to load as well.