• 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
Shell Script Timeout?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Shell Script Timeout?


  • Subject: Shell Script Timeout?
  • From: Glenn Sugden <email@hidden>
  • Date: Sat, 21 Feb 2004 11:39:54 -0800

Could someone please help me out with this (simple) script?

This script works correctly (when the seconds of importing is small)...

...but the "do shell script" line times-out without the "with timeout" block...

...and continues to time-out even with the block.

I didn't know that shell scripts would time AppleScript out, but I guess they do...

...yet isn't this the correct solution?

Thanks - -

::Glenn

---

set seconds_of_importing to (60 * 60) -- 1 hour(s)
set shell_string to "sleep " & seconds_of_importing
tell application "System Events"
tell process "iMovie"
tell front window
tell group 1
click button "Import"
end tell
end tell
with timeout of seconds_of_importing seconds
do shell script shell_string
end timeout
tell front window
tell group 1
click button "Import"
end tell
end tell
end tell
end tell

---
I'm listening to "Jauqq" by Close Up Over from Black Dog Productions: Bytes
<http://www.gracenote.com/music/search.html? q=Close+Up+Over+Black+Dog+Productions:+Bytes&f=artist&f=disc&x=0&y=0>
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Shell Script Timeout?
      • From: Graff <email@hidden>
  • Prev by Date: Re: Quote-character in Apple Mail
  • Next by Date: Re: Shell Script Timeout?
  • Previous by thread: Re: Making bookmarks for Safari
  • Next by thread: Re: Shell Script Timeout?
  • Index(es):
    • Date
    • Thread