• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Run script with arguments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run script with arguments


  • Subject: Re: Run script with arguments
  • From: has <email@hidden>
  • Date: Tue, 30 Dec 2014 17:30:28 +0000

Nicola Vitacolonna wrote:

I have run this script with AppleScript 2.4 (OS X Yosemite):

#!/usr/bin/env osascript
script Foo
    on run argv
        repeat with i from 1 to (count argv)
            log item i of argv
        end repeat
        return 42
    end run
end script
"Doctor, it hurts when I do this."
"Then don't do that!"


#!/usr/bin/env osascript
on run argv
    repeat with i from 1 to (count argv)
        log item i of argv
    end repeat
    return 42
end run


$ ./foo a b c
a
b
c
42


has
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


  • Prev by Date: Re: Run script with arguments
  • Next by Date: Re: Run script with arguments
  • Previous by thread: Re: Run script with arguments
  • Next by thread: AUTO: Allyn Martin is out of office.
  • Index(es):
    • Date
    • Thread