I would like to pass the name of an application to an applescript and then perform some actions on it in the script. I've tried the following:
set app_name to item 1 of argv
tell application app_name to ...
This doesn't work. I've tried
set app_name to quoted form of item 1 of argv
which seems to append single quotes, (doesn't work) and,
set app_name to "\"" & item 1 of argv & "\""
that doesn't work either, even though the double quotes are appended.
however if I just write
tell application "Safari" to ...
the application launches. I'm new to Applescript and I'm not sure what's happening here.