-
All replies
-
Helpful answers
-
Apr 5, 2011 4:19 PM in response to Torn Barbby Barney-15E,Tell is an Applescript directive.
It sounds like you are trying to enter an Applescript into the Terminal. Won't work (not entirely true).
Try the Applescript Editor instead.
What are you trying to script?
There is a better forum for Applescript under Mac OS X Technologies. -
Apr 5, 2011 4:33 PM in response to Barney-15Eby Torn Barb,Can I stick to this thread until I figure this out? Or unless a moderator moves my post?
I'm just playing with scripting right now. I started a few years ago on RedHat, BSD, and now OS X. I'm running test scripts just to play around and to brush up on my commands and lines. Here's a simple one which apparently the only way to do it, from what I see on the web, is to open safari via command line with multiple tabs. Everyone says use 'tell'.
When I write the bash script it says, tell not found. -
Apr 5, 2011 4:57 PM in response to Torn Barbby Barney-15E,Tell is not a bash command. It is an Applescript command.
You can stay here. And, I did ask for you to post what you are trying to do. Meaning, give me more info and I'll try to help, but there is a better forum for both Applescript and unix.
Post the code between
tags.code here
Oops. I just checked the man page. tell is also a tcl command. Are you trying to create a tcl-based script. In that case, I can't help you.
If it is Applescript, I may be able to.
Message was edited by: Barney-15E
Digging further, telltc is a csh command. It prints all terminal capabilities.
Message was edited by: Barney-15E -
Apr 5, 2011 4:58 PM in response to Barney-15Eby Torn Barb,Ooops.....here you go:property URL1 : "http://www.apple.com/"
property URL2 : "http://www.macosxhints.com/"
property URL3 : "http://www.neturf.com/"
tell application "Safari"
activate
my new_tab()
open location URL1
my new_tab()
set the URL of document 1 to URL2
my new_tab()
set the URL of document 1 to URL3
end tell
on new_tab()
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
click menu item "New Tab" of menu "File" of menu bar 1
end tell
end tell
end new_tab -
Apr 5, 2011 5:31 PM in response to Torn Barbby Barney-15E,That is an Applescript. Open Applescript Editor and paste it in. You can run it from there or save it as an application. (or whatever instructions that were posted on the site you found it.) -
Oct 5, 2016 8:54 AM in response to Barney-15Eby Parker288,Can you help me.
do shell script "open '/Applications/Google Chrome.app'
tell application 'Google Chrome' to activate
tell application 'System Events'
keystroke f using {command down, shift down}
end tell"
When I run this, it says tell command is not found...
What am I doing wrong?
-
Oct 5, 2016 10:24 PM in response to Parker288by Barney-15E,Parker288 wrote:
Can you help me.
do shell script "open '/Applications/Google Chrome.app'
tell application 'Google Chrome' to activate
tell application 'System Events'
keystroke f using {command down, shift down}
end tell"
When I run this, it says tell command is not found...
What am I doing wrong?
You never terminated the do shell script argument with double quotes.
yowever, You don't need the first line as the second does that already.
For the rest, AppleScript uses double quotes, not single.