Skip navigation

Applescript Input into Automator input...

1960 Views 38 Replies Latest reply: Apr 3, 2013 6:38 AM by mtimmons RSS
  • red_menace Level 6 Level 6 (14,275 points)
    Currently Being Moderated
    Jan 27, 2013 3:21 PM (in response to mtimmons)

    1. The path to resource command has an optional parameter that can be used to specify a subdirectory (the resource needs to be just the file name):

     

    set trackCommand to quoted form of POSIX path of (path to resource "prev_watch.sh" in directory "Scripts")

     

    4. The ProgressBarController script in the bundle has a few different routines to initialize and show the progress window so it can be set up in different ways.  You could set it up initially to be a barber pole, or set everything up and then show it, etc, but I was trying to get everything into a common initialization handler - I've moved the initial showing of the progress window to after any other dialogs.  Another thing I changed was getting the name of the file items - System Events can use either POSIX or HFS paths, text or alias by doing something like

     

    tell application "System Events" to set theName to name of disk item (anItem as text)

     

    5. The .xib files are compiled and don't have much to navigate by so I don't know about removing entire menus, but by searching for the text "cocoapplet" you can find the application name in the menu items and replace it.

     

    I've updated my example of your project here.

  • red_menace Level 6 Level 6 (14,275 points)
    Currently Being Moderated
    Jan 27, 2013 3:40 PM (in response to red_menace)

    Correction - the name to search for should be "cocoaapplet" (the original name in the menu items).

  • red_menace Level 6 Level 6 (14,275 points)
    Currently Being Moderated
    Jan 27, 2013 7:30 PM (in response to mtimmons)

    Thanks for the feedback - it helped me add a little bit more documentation to my templates.

  • red_menace Level 6 Level 6 (14,275 points)
    Currently Being Moderated
    Feb 10, 2013 11:58 AM (in response to mtimmons)

    I finally had a chance to put your code snippet into the FCLauncher4 application and the cancel is still working - did you change something else perhaps?  The progress bar controller's stopProgress property is set when the cancel button is pressed, but it is up to your script to do something about it.

  • red_menace Level 6 Level 6 (14,275 points)
    Currently Being Moderated
    Feb 10, 2013 4:18 PM (in response to mtimmons)

    I just tried it with the shell script enabled, and the cancel works OK - you shouldn't rely on shortcuts such as the tilde expansion, though.

  • red_menace Level 6 Level 6 (14,275 points)
    Currently Being Moderated
    Feb 10, 2013 5:15 PM (in response to mtimmons)

    Curious - the cancel button's key equivalent (the escape key) should do the same thing as clicking the button.  The build I am using is the last one you posted a link to, named FCLauncher4.

  • red_menace Level 6 Level 6 (14,275 points)
    Currently Being Moderated
    Feb 10, 2013 8:16 PM (in response to mtimmons)

    Yes, the button works for me in 10.8.2.  If your latest version is much different than FCLauncher4, maybe something got corrupted.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.