Objective
I want to be able to run the Applescript to open multiple applications using a shortcut. To do this, I would like to create a Service using Automator (I've done this for opening one application, the script opens multiple). After some research, I found that I need to make the script an action in Automator, using Xcode.
Progress
I have this Applescript app that does what I want:
--Insert apps to open here:
set multApp to {"Safari", "Mail"}
set noOfApplications to count of multApp
set itemNum to 1
repeat with counter from 1 to noOfApplications
openApp(item itemNum of multApp)
set itemNum to itemNum + 1
end repeat
on openApp(chosenApplication)
tell application chosenApplication to activate
end openApp
I am a beginner at all 3 (haven't touched Xcode)
What I've done in Xcode is: started on the main.xib (as per a tutorial) and have used Interface Builder (v. 3.2.6) to have 3 "pop up buttons" that I want to bind to Applications.
Questions
Is this the right method? Am I using Xcode correctly?
How to bind to an application? What input to "Controller Key", "Model Key Path" etc...
Is there a way to see the workings behind a current action (like "Launch Application")
Final Notes
This is more for learning than for actually using the script. So I know I can just add more "Launch Application" to the current Service. I want to know so I can make any Applescript app (script) into a Service... Wouldn't it be handy?
Sorry for my noob-ness (let me know if the question is unclear), and THANKS for any advice!
UPDATE: "Run Applescript" action will do the job, ignore Xcode (Thanks @regulus6633) and just make Service with that action.