+ Reply to Thread
Results 1 to 6 of 6

Thread: Applescript in shell

  1. #1
    Junior Member muhammednoufal is on a distinguished road
    Join Date
    Mar 2008
    Location
    Dubai
    Posts
    6

    Applescript in shell

    I tried shell to execute applescript.

    osascript -e 'display dialog "hi"'


    it gives message "No user interaction allowed"

    and also for osascript -e 'choose file'

    Wats wrong with my code?

    With Thankzz
    Muhammed

  2. #2
    BDFL Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus's Avatar
    Join Date
    Apr 2006
    Location
    On the interwebs
    Posts
    12,414
    Blog Entries
    116
    Hey Muhammed, good to see you here. Unfortunatey Applescript is not something I'm very good at, but I hope someone else can help. I think it'd be great to get more AS stuff on the site.

  3. #3
    Senior Member hanzo is on a distinguished road hanzo's Avatar
    Join Date
    Sep 2007
    Location
    Abu Dhabi
    Posts
    185
    Sorry I missed this one, haven't been around lately.

    This is a pretty easy one:

    osascript doesn't have a GUI to interact with, so you need to tell something with a GUI to display the dialog.

    In this case, Finder would be the way to go.

    Here is what you want:

    osascript -e 'tell application "Finder" to display dialog "hi"'

    shameless self promotion

    freezerpants.com :: superimposable.org


  4. #4
    BDFL Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus's Avatar
    Join Date
    Apr 2006
    Location
    On the interwebs
    Posts
    12,414
    Blog Entries
    116
    Quote Originally Posted by hanzo View Post
    Sorry I missed this one, haven't been around lately.
    Hey freezerpants, welcome back, hope everything's been okay

  5. #5
    Senior Member hanzo is on a distinguished road hanzo's Avatar
    Join Date
    Sep 2007
    Location
    Abu Dhabi
    Posts
    185
    Everything is fine, just suffering from time/attention management issues

    shameless self promotion

    freezerpants.com :: superimposable.org


  6. #6
    BDFL Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus has a reputation beyond repute Magnus's Avatar
    Join Date
    Apr 2006
    Location
    On the interwebs
    Posts
    12,414
    Blog Entries
    116
    Quote Originally Posted by hanzo View Post
    Everything is fine, just suffering from time/attention management issues
    I understand, that happens to all of us.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts