How to get GUI feedback from a shell script launched from Script Menu?

Jump to First Reply
Posted:
in Genius Bar edited January 2014
So I have this spiffy shell script I use to backup/sync several filesytems across the network.



Works great. I plopped it in the Script Menu so that my wife can easily run it. Still works great. So far, so good.



Except... there is zero feedback on when it's done. Right now, she listens closely to the drive on her iBook, and when it 'sounds' like its done, then she closes it up for sleep. Risky.



I'd like to know, is there some way to trigger a shell script such that it shows a simple little console window for output so she can see when it is done?



I'd considered making it a .command Terminal script, but then that launches Terminal, which she's not fond of. I know that AppleScripts can trigger shell commands, so I'm wondering if wrapping the shell script in an AppleScript will provide the feedback I'm looking for? Nothing fancy, just the console output of the processes would be fine.

Comments

  • Reply 1 of 4
    123123 Posts: 278member
    [quote]Originally posted by Kickaha:

    <strong>So I have this spiffy shell script I use to backup/sync several filesytems across the network....</strong><hr></blockquote>



    I think these should work:



    exec open path_to_directory_containing_a_message



    exec open file_containing_the_message_for_example_an_image



    exec open app_that_will_display_a_simple_dialog.app



    I'm sure this can be done in AppleScript, but then again, who uses AppleScript...



    [ 02-22-2003: Message edited by: 123 ]</p>
     0Likes 0Dislikes 0Informatives
  • Reply 2 of 4
    123123 Posts: 278member
    [quote]Originally posted by Kickaha:

    <strong>and when it 'sounds' like its done</strong><hr></blockquote>



    alternatively:



    exec mpg123 some_mp3_file.mp3



    (I think you have to install mpg123 first)
     0Likes 0Dislikes 0Informatives
  • Reply 3 of 4
    kickahakickaha Posts: 8,760member
    Thanks, and while that is a decent stopgap, the point was that I didn't want to have something launched. :/



    But it does give me an idea...
     0Likes 0Dislikes 0Informatives
  • Reply 4 of 4
    amorphamorph Posts: 7,112member
    Your best bet would be an AppleScript. I haven't really used them much for interaction, but it shouldn't be too hard to drum something up.
     0Likes 0Dislikes 0Informatives
Sign In or Register to comment.