Jump to content

Prioritize actions in a workflow


Recommended Posts

Hi, I'm totally new to Alfred and to workflows. and also to scripting  :)

 

I bought Alfred to create shortcuts for setting some simple "work environments". that means to close unused apps, open needed apps, documents and webpages. It should be easy!

 

I've done some experiment and I've successfully created a workflow with a trigger and two actions. the first action is an Apple  script that quite some applications:

 

on alfred_script(q)

  tell application "Safari" to quit
  tell application "Google Chrome" to quit
  tell application "Mail" to quit
  tell application "Contacts" to quit
  tell application "Calendar" to quit
  tell application "Evernote" to quit
  tell application "Reminders" to quit
  tell application "Safari" to quit
  tell application "Notes" to quit
  tell application "Finder" to quit
end alfred_script
 
the second is an Open Url Action that open a web page on Chrome. The idea is to close all unused tabs on Chrome and open just the ones I need.
 
now the problem is that I'm not able to tell Alfred that as first it should execute the Apple Script, and after that it should reopen Chrome and load the web page. Any advice on this? 
 
Link to comment

RodgerWW, thankyou for the answer.

 

I understand that I don't have to use a workflow action to load the URL, instead I have to use a line in the script to load it.

 

but how do I load URL in the script? then, where i can find which commands I have to use in Applescript to interact with Chrome (or any other software)? can you point me to some beginner resource to apple scripting?

 

thank you

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...