-
Hi Russ, I saw your youtube video how you pass parameters with a batch file on Windows.
You used the following script.start https://google.com/search?q=%1I want to do the same for Mac but I am stuck with the parameter part in Applescript
on run {location, parameters} tell application "Google Chrome" to activate open location "https://www.google.com/search?q={param1}" end runCan you help me out?
-
@Mike, this is how I did it:
russ@russmac ~ % cat google.sh open "https://google.com/search?q=$1"That's a bash script. If you want me to figure out how to do it with apple script let me know.
In a bash script, $1 is the first parameter.
-
@Russ Thank you. Just to clarify. cat google.sh is to call script?
This goes to the .sh file? > open "https://google.com/search?q=$1"
What do I enter in the TriggerCMD GUI Command Editor?
Sorry, I am a total noob when it comes to bash, I only know applescript.
-
@Russ all good, I had to do a chmod 700 of the .sh file to convert it to an Unix executable. and added #!/bin/bash to the script. Now it works beautifully!
-
@Mike, good, I'm glad you knew to do that. I forget to tell people to change the permissions on bash scripts to make them executable.
-
T tuicemen moved this topic from Instructions on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login