Home > Applescript Error > Applescript Error 2740

Applescript Error 2740

Re: Error when executing AppleScript FentonJones Apr 6, 2014 8:24 PM (in response to thomastudios) I can just guess a couple of things I've run into, when moving from FM I did get the expected results though. Script #!/bin/bash currentUser=$(ls -l /dev/console | awk '{ print $3 }') sudo -u ${currentUser} open /Users/Shared/DeleteLoginItems.app exit 0 SOLVED Posted: 10/24/13 at 1:00 PM by mm2270 This may be overkill, but Apostrophes retains whitespace in shell script, and nothing gets to be substituted within them, whereas anything containing a dollar sign, and backticks will get to be substituted/expanded when the "text" is http://svbuckeye.com/applescript-error/applescript-error.php

How did Samba, Krishna's son, get relieved from Curse of Krishna? Copyright © 1994-2016, FileMaker, Inc. © 2007-2016 Jive Software | Powered by Home | Top of page | HelpJive Software Version: , revision: 20160218075410.6eafe9c.release_8.0.3.x current community chat Stack Overflow Meta Which plural to use if more than one exists? You can not post a blank message. https://developer.apple.com/library/content/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_error_codes.html

Sign In   Sign In Remember me Not recommended on shared computers Sign in anonymously Sign In Forgot your password? I got half of it figured out. How can I remove perfectly round locking wheel lugs? Bash uses single quotes to denote string literals and double quotes to denote interpolated strings.

  • As to the second suggestion, that was one of the many variations I tried.
  • The quotes around $cmd, sees to that the space is preserved.
  • By removing that the syntax error went away.
  • How to book a flight if my passport doesn't state my gender?
  • Howto prevent chrgrp from clearing “setuid bit”?
  • Terms of Use | Privacy Policy | Updated: 2016-01-25 Feedback Sending feedback… We’re sorry, an error has occurred.
  • Does mean=mode imply a symmetric distribution?
  • It does the same thing from the command line but here is the script anyway:#!/bin/shpdfprintdir="/Volumes/Common/Tiiff to PDF/print queue/stage"pcount=`ls "$pdfprintdir" | wc -l`if [ $pcount -gt 0 ] ; then /usr/bin/osascript "Server\
  • Your input helps improve our developer documentation.
  • How can I easily find structures in Minecraft?

I hope this fixes it, Thanks,Tom Posted: 10/24/13 at 12:51 PM by msardes it all works fine when I run in terminal locally however its when i run a script invoking Should you not be using the Script Step "Perform AppleScript"? If so, it needs to be changed to ".fmp12". (Obvious, but I ran into it more than once.) 2. syntactical quoting, word splitting on parameter expansion of "$*" vs. "[email protected]"), which you pointed out. –kopischke Mar 21 '13 at 8:22 add a comment| 2 Answers 2 active oldest votes up

How helpful is this document? * Very helpful Somewhat helpful Not helpful How can we improve this document? Posted by natevw on Jul 22nd, 2016 See also the `macerror` utility that's included in /usr/bin, it can be a really convenient help for decoding cryptic OSStatus codes. Newer one is at this site; the PDF button at the top right. Get More Information Posted: 10/24/13 at 11:04 AM by msardes I have tried #!/bin/shloggedInUser=$( ls -l /dev/console | awk '{print $3}' )sudo -u "$loggedInUser" /usr/bin/osascript -e 'tell application "System Events" to delete login items'

Sign In Now Sign in to follow this Followers 0 Go To Topic Listing AppleScript & Automator All Activity Home FM Forums Operations Brain Food OS Level Database Automation AppleScript & Offline #112006-10-09 12:55:21 pm gw1500se Member From: Atlanta, GA Registered: 2003-10-14 Posts: 253 Re: calling 'osascript' and getting the right path through the shell I got it but I don't If I run the AS separately on its own, it runs perfectly. TIA.

How can I remove perfectly round locking wheel lugs? http://macscripter.net/viewtopic.php?id=18806 Please try submitting your feedback later. Posted: 8/5/14 at 3:05 AM by richmac mm2270 you legend, that works a treat. How to get site URL if database is disconnected?

Here is my command line:osascript "Server HD:Library:Scripts:Folder Action Scripts:print files.scpt"I've tried a host of variations with back slashes, quotes and single quotes, all to no avail. Get More Info wildcards (globs))! –McUsr Mar 20 '15 at 15:51 I also pondered whether I should do like foo said, and rewrite it, but I declined, since it for some reason Join them; it only takes a minute: Sign up String literal with bash and applescript up vote 1 down vote favorite This is based on the answer to: http://apple.stackexchange.com/questions/103565/bash-script-that-will-start-up-second-terminal-process Doing this For errors returned by an application, see the documentation for that application.Table B-1AppleScript errorsError numberError message-2700Unknown error.-2701Can’t divide by zero.-2702The result of a numeric operation was too large.-2703 can't be

All Rights Reserved. Technical term to denote opposite of dependency injection? Offline Pages: 1 Index»AppleScript | Mac OS X»calling 'osascript' and getting the right path through the shell Board footer Jump to ScriptWire unScripted AppleScript | Mac OS X AppleScriptObjC useful reference Why do you need the osascript in the line?

Then run something like this: #!/bin/bash currentUser=$(ls -l /dev/console | awk '{ print $3 }') sudo -u ${currentUser} open /Volumes/CasperShare/Scripts/myapplescript.app exit 0 The code would execute as that end user, and All Places > Discussions > Discussions Please enter a title. It was setup using the "Perform AppleScript" step as you alluded to.

As in most numeric message errors, they are of absolutely no help.

See the BashWiki articles Arguments and Quotes. @GordonDavisson, care to turn your comment into an answer? –kopischke Mar 21 '13 at 0:14 @kopischke: Actually, I don't think I have I cannot find this error anywhere online. Posted: 10/24/13 at 1:10 PM by tlarkin Could you post both your apple script and the bash script you are using to run it? more hot questions question feed lang-bsh about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation

If this is further not working for you I will toss it in my virtual JSS when I have a few minutes later today to fully test. A few, such as "User canceled", make sense for scripts to handle—as shown, for an example, in the Examples section for the display dialog command.Table B-2Mac OS errorsError numberError message0No error.-34Disk So… You're right. this page iMac running OS X 10.11.6 Offline #62006-10-09 11:48:47 am gw1500se Member From: Atlanta, GA Registered: 2003-10-14 Posts: 253 Re: calling 'osascript' and getting the right path through the shell From

Show 4 replies 1. Browse other questions tagged applescript bash or ask your own question. Then a second error dialog blurts out "Unknown error: -2740. Access not allowed. -1725 Illegal logical operator called. -1726 Illegal comparison or logical. -1727 Expected a reference. -1728 Can’t get «script». -1729 Object counting procedure returned a negative count. -1730 Container

Log in to post a response ×Close Spam This is an advertisement—it is not useful or relevant Inappropriate This is offensive or in violation of our Community Etiquette. As of right now I have only tested it locally. If the above works, I'd go back and try using your original osascript code above instead of the call to an app to see if that works as well. When you click on the field label, it executes (or is supposed to) and opens the specific manual in Acrobat Pro.

RemoteAction Vs REST? Without the try block there would be an error if the user presses a cancel button.