Using Automator to run ActivePerl?

(It was suggested that I post this here. Previously posted under Leopard/Automator. Note: I also considered trying to run my program at boot using launchd, but was intimidated by the sample scripts I saw. If someone can shovel me that code, I'd be grateful, but otherwise I'll keep trying to utilize the far simpler Automator application. --Peter)
Hi all,
I'm new to Mac OS and, well, a bit lost.
I've been running ActivePerl (a perl interpretor) from a Terminal prompt, passing in my program source file as an argument, as follows:
perl <path>/program_file
Program_file opens a GUI and waits for user input (ie, it does not terminate on its own). Until the user terminates this GUI (terminating ActivePerl as well), I note that a Terminal-looking icon appears on the Dock. All well and fine.
Now I'd like to have Automator run program_file at boot.
Running an Automator bash shell script with the same single line, Automator gave me a less-than-helpful message: "The action 'Run Shell Script' encountered an error. Check the action's properties and try running the workflow again."
So I figured I'd instead simply run an Automator perl shell script with the single line:
print system ("<path>/perl", "<path>/program_file");
A bit more successful, I believe this at least attempts to start ActivePerl and run program_file (a Terminal-looking icon briefly flashes on the Dock). But my GUI does not open -- program_file along with ActivePerl seem to have been terminated.
(Automator returns 512 to the print call. I can't locate a description for "512" in Mac OS X Reference Library's "Shell Scripting Primer" -- if this is where I should be looking and if this return code is even significant.)
This ought to be a very simple task. What am I missing here?
Sincere thanks.
Peter

(Automator returns 512 to the print call. I can't locate a description for "512" in Mac OS X Reference Library's "Shell Scripting Primer" -- if this is where I should be looking and if this return code is even significant.)
This is most likely
#define ENOENT 2 /* No such file or directory */
I could be wrong, so take this with a grain of salt.
One form of program completion status is formatted as
8bits 8bits
| | |
| errno | signal |
|_______|_______|
0000:0010:0000:0000
So if my guess is correct, then 512 is breaks down into a value of 2 in the errno byte and a value of 0 in the signal byte.
This also makes sense in that it is unlikely an Automator run would get a signal, and it is not unusual for someone to assume that the PATH used by their Terminal session is the same everywhere, and that is often NOT true, so commands your Terminal finds are not always findable by Automator, Launchd, cron, Applescript, etc...
For example, while you might specify the full path to your perl script, that does not mean that any commands run inside the perl script will find their commands.
You say ActivePerl. Well is that a special version of Perl? Where is it located? Does it have any special features that are NOT part of the default Perl?
I do have -- as far as I understand these things -- $PATH set correctly in my home directory's .profile file. I'll check this Friday, too.
Having the correct PATH set for your Terminal session means nothing to Automator. If you have things in your perl script that depend on a custom PATH, then you are in trouble.
You might want to create an experimental Automator that is "Run Shell Script". Change the "cat" command to:
printenv
Run this workflow in Automator. Click on the "Results". You will most likely see
SHELL=/bin/bash
TMPDIR=/var/folders/zv/zvU6bMiHTeElG+JIWOdzk++TI/-Tmp-/
ApplePubSub_SocketRender=/tmp/launch-s1i3Ke/Render
USER=harris
COMMAND_MODE=unix2003
SSHAUTHSOCK=/tmp/launch-6mdwXe/Listeners
_CF_USER_TEXTENCODING=0x1F5:0:0
PATH=/usr/bin:/bin:/usr/sbin:/sbin
PWD=/Users/yourusername
DBUSLAUNCHD_SESSION_BUS_SOCKET=/tmp/launch-V5WJ8H/unix_domainlistener
SHLVL=1
HOME=/Users/yourusername
LOGNAME=yourusername
DISPLAY=/tmp/launch-Pq6WiM/:0
_=/usr/bin/printenv
Notice that PATH is "/usr/bin:/bin:/usr/sbin:/sbin". That is it. If your Perl script cannot find everything it needs in one of those directories, then you are going to have to either arrange your Perl script to provide full paths to anything it needs outside of PATH, or you are going to have to modify your Automator workflow so it sets up a PATH that makes your Perl script happy. For exampe you could setup your "Run Shell Script" something like:
export PATH="$PATH:/your/custom/path:/another/custom/path"
/path/to/your/desired/version/of/perl /path/to/your/perl/script
Maybe this won't be as simple as I thought it should be. (Laugh or sigh at me, but I like Windows because I don't need to deal with this sort of thing! Stuff just happens by itself. No, I should not entertain programming as a profession.)
Changing environments is always difficult because you keep trying to do thing the old way, because that is what you know. This is a natural situation.
So maybe if you actually told us what you really trying to do, someone can suggest an easier way to do what you want. You have only told us your solution, and not what you want to do.
We know you want to prompt for something, and you want to do this at boot time. We don't know why you want to do this, or what this GUI is displaying, what action you want the user (you) to do with this GUI display. Again, maybe there is another way to do what you want which is more Mac like and easier.

Similar Messages

  • How to prevent Automator's "run shell script" to create fully decomposed forms of my strings ?

    I am using Automator's "run shell script" and I am seeing that it outputs fully decomposed forms of my strings.
    For example, when I set the action to "echo été" in a service (with "Replace selected text" activated) and run that into a Textwrangler window, I'll get fully decomposed forms that Textwrangler won't understand. But when I simply type that command into Terminal, I get my string in composed form.
    The problem is not the display issue, but the fact that if I want to run grep for example in "run shell script", I will not be able to find the proper strings since the forms are different.

    Originally I was using $@ to parse a string and get the result pasted by the service. That was a while ago. There, I noticed that some Japanese characters were messed up. Basically all the kana characters that come with voicing markers like が-ga (instead of か-ka) etc. I did not have the time to pursue that issue though.
    Then, last night, I found that a colleague of mine had tried to use $@ to feed to a local dictionary application called ding (http://ftp.tu-chemnitz.de/pub/Local/urz/ding/). His problem was with characters that had umlauts. After verifying how he wrote his action I remembered that I had similar issues with Japanese.
    Basically his command was "/path/to/ding $@"
    That's supposed to use the selected string as an argument to pass to ding, which will launch a Wish application where the string is used as the searched item.
    From Terminal, that works a treat. But the exact same line in Automator (with input as argument, not as stdin) messed the composition and the resulting string was not recognized by ding as a match to what it was supposed to match.
    So, I tried a few things to get to the core of the issue and found that a simple "echo [accented characters]" was enough to reproduce the difference in string handling between Automator and Terminal. That difference is also reproduced on a number of person's machines.
    I have a number of services that basically revolve on "run shell script" actions and involve 3rd party application outputs, preference files etc. so it would not be convenient to show that to you.
    I have sent a mail about this issue to the automator list yesterday too:
    http://lists.apple.com/archives/Automator-users/2011/Jun/msg00004.html

  • How can I use automator to open terminal change directory run a python script?

    Hi all,
    I dont really ever use automator - which may be my big problem - and I am trying to make an apllication that seems fairly simple in theroy. I want something that will lunch terminal, cd to the place where my python script lives and then run it. I have tried a number of suggested ways and can get the terminal to open and the directory to change but cant figure out how to run the script. This is my workflow if i did it manually each time
    - open terminal
    - type cd "the place where my file lives"
    - type python uploadr.py -d
    I can get terminal to open then cd to the right place but cant get the "python uploadr.py -d" to run without an error.
    any help would be very appricated
    thanks!!!
    J

    this is the script I got closest with - I know its something to do with breaking those two commands up but i just dont know how to do it
    on run {input, parameters}
              tell application "Terminal"
      activate
                        if (the (count of the window) = 0) or ¬
                                  (the busy of window 1 = true) then
                                  tell application "System Events"
      keystroke "n" using command down
                                  end tell
                        end if
                        do script "cd /Users/behole/Desktop/FlickrUpload/" & "python uploadr.py -d" in window 1
              end tell
              return input
    end run
    this is the error I get in terminal after I run it
    Last login: Mon Jul 23 15:37:17 on ttys000
    be-holes-MacBook-Pro:~ behole$ cd /Users/behole/Desktop/FlickrUpload/python uploadr.py -d
    -bash: cd: /Users/behole/Desktop/FlickrUpload/python: No such file or directory
    be-holes-MacBook-Pro:~ behole$

  • How to resize and change the resolution of a batch of photos using Automator

    I searched for a long time tonight looking for the answer to this (seemingly) simple question:
    How do I use Automator to scale and change the resolution of a batch of images?
    It was not so simple.
    Links to this question:
    https://discussions.apple.com/message/12341246#12341246
    https://discussions.apple.com/message/12342026#12342026
    https://discussions.apple.com/message/5785047#5785047
    https://discussions.apple.com/message/1173358#1173358
    https://discussions.apple.com/message/5641853#5641853
    https://discussions.apple.com/message/3207516#3207516
    These are just the links on this site - I found them all over the place at MacRumors, Apple Tips, Mac Help, etc.
    You can actually manage this in Automator.
    Here are the steps that worked for me:
    Create an Automator APPLICATION - not a workflow (this is due to the way that I'm batch converting images - workflows might be ok for some cases)
    Step 1 is Copy Finder Items
    My flow inserts an SD card, opens the DCIM folder that my Nikon creates, selecting the images that I click (command + click to multi-select) and once I have the photos highlighted, I drag them onto this Automator App we're creating.
    <==  You'll have this guy soon!
    As a result - I want to copy the originals to my computer as step 1.  I don't touch the originals on the SD card (and cards are cheap so I tend to leave them on the cards as well)
    Step 2 is the Scale Images action - you can search the library for this and find it quickly.  For my part, I found that scaling images to about 38.8 percent of their size on the SD card is good for uploading to a blog.  Change this value to whatever you wish.
    Step 3 is Run Shell Script - and here is where we marry the brilliance found at this link with our script.If you have a hard time reading the text in the image, it is as follows:
    #bin/bash
    for f in "$@"
    do
         /usr/bin/sips -s dpiHeight 72.0 -s dpiWidth 72.0 $f
    done
    Save this application (I named mine "Format Photos")
    Place the application inside the target folder where you want the images to end up.  I do this because when I have the SD card window open, I can also open my "Photos" window and see my App sitting there.  I select my images as I mentioned and drag them on top of this app.  The app copies the originals and the conversions into the folder.
    NOTES: When you open a converted pic in Preview, you will see Resolution = 300 dpi if you go to Tools --> Adjust Size...  This reading is explained by another brilliant discussion as sips only touches the JFIF properties inside the file's MetaData.  However, if you look at the bottom of the Adjust Size... window, you'll see the image size is probably around 500 kb (give or take depending on the original).  My goal was to get the images down from the 3.0 MB I shoot at to around 500 kb.  Therefore even though the MetaData still thinks that it is 300 DPI according to Preview, it has been changed to 72 (open it in some other applications mentioned at the links and you'll find different readings - it all depends on what the application reads from the Meta).
    This does not rename the files, so you'll get DSC_1000.jpg and DSC_1000 copy.jpg in all likelihood.  If that annoys you, add a step into the Automator Application that renames the file after the "Run Shell Script" action has run, and you can have each file renamed according to some convention that you like.
    This took a heck of a lot longer than I expected - so I decided to put in the effort to share this with the community and save others the hassle. 

    PPI is pixels per inch of the image.  It is difficult to increase resolution as you are trying to add data that is not there.
    But for printing purposes what you want is dpi or dots per inch.
    The image processor either accessed from Bridge (tools/photoshp) or PS is a good way to change a batch of images.

  • Using Automator to open a program with a delay after a programmed restart

    Hi to all! With my old PowerPc I used to start unattended sessions of my Newsreader (Unison) overnight simply putting Unison in my Login elements window, and programming a restart at a fixed hour. Unfortunately, with my very fast new iMac this doesn't work: Unison opens too fast after the programmed restart, before a network connection has been established, and Unison is unable to see the NewsServer online when it starts (error "nodelist not found", typical of a not yet established Internet connection). Note that I downgrade to Unison 1.8.x to do this, as the Unison 2.x program cannot be closed with a session running to resume it after start: it simply defaults to "Pause transfers" after quitting, and need a clic on "Resume" after reopening.
    Obviously, what I need is to introduce a "wait (say) 2 minutes before the opening of Unison", or anything that can check the Internet connection before Unison starts. May anyone instruct me to do this with Automator and/or AppleScript?
    In fact, I tried to generate a workflow in Automator, with a Pause after the start of the process, then the instruction to open Unison. I put the saved workflow in my Login elements, but it didn't work on my iMac 27, i7Core, Snow Leopard installed. I added an "execute workflow" at beginning of the process, but the Pause command gives always an error and the process stops before Unison' opening.
    Any suggestion or help in writing an Automator or AppleScript workflow/script to be put among the startup items?
    Thanks a lot!

    I am trying to use Automator to restart an application. I figured how to quit the application, however when I relaunch it, it asks for password permission... how can I use automator to enter the password? or is there a way to launch the software with password in a script?

  • How can I use automator to import a .csv file into a an excel file

    I would still like all the import settings that I get if I am using excel to do the process, i.e. going in with the text format instead of the general format. That way my dates don't change

    You'll need to use Applescript in Automator.
    Note:  File extension cannot be CSV (Excel will assume that the file is comma separated), so add an action to copy or rename with extension TXT.
    (You can rename back at end of Workflow is needed)
    The Applescript Action is:
    on run {input, parameters}
         repeat with f in input
              tell application "Microsoft Excel"
                   open text file filename (f as string) data type delimited field info {{1, text format}} other char "|" with use other
              end tell
          end repeat
          eturn input
    end run
    NOTE: This is formating the 1st col to text
    If you need to format the second, then you need to:
      open text file filename (f as string) data type delimited field info {{1, general format}, {2, text format}} other char "|" with use other
    (You'll need to list the 1st col, 2nd col, etc until you get to the col to format as text).  Formats are (from the Applescript Excel Library):
    [field info list] : A list contain parse information for the individual columns of data.
    Formats are general format, text format, MDY format, DMY format, YMD format, MYD format, DYM format, YDM format, skip column.
    Or you can skip using Automator and just use an Applescript App (this is a droplet, just drop the files on the icon, or click to choose files):
    on run
         set fs to choose file with prompt "Select one or more files to open:" default location alias (the path to desktop folder as text) with multiple selections allowed
         proceed(fs)
    end run
    on open fs
         proceed(fs)
    end open
    on proceed(fs)
         repeat with f in fs
              tell application "Microsoft Excel"
                   open text file filename (f as string) data type delimited field info {{1, text format}} other char "|" with use other
               end tell
          end repeat
    end proceed

  • Using Automator to cut up a video

    Hello,
    I've been trying to use automator to do some repetitive tasks for me, but I seem to keep running into brick walls since I've not really used it before.
    What I'm trying to do is cut a video file into single frames, and save each one as a jpeg. I know it's possible to do this is Photoshop by importing the video, and making each frame a different layer, then exporting each layer as a file. Problem is this is limited to do only the first 400 frames of your video.
    So far I've made it so automator goes in to photoshop, move to the next frame, save that frame as a jpeg.
    Here's where I run into trouble. I want it to rename each file as it's created automatically so it goes file00001, file00002 and so on and then loop back around so it does the whole video while I go off and made myself a sandwich or something.
    Could anyone possibly help me?

    There are two ways to do this in iMovie 09
    1) Use Chapter Markers
    2) In the Project Library View, select the project and then click FILE/DUPLICATE PROJECT. Do this as for as many copies as you need. Then to create a shorter portion, delete the clips you do not need for that portion.
    If you are open to using another application, you can Share your movie in iMovie. Then use QuickTime Pro ($30) or MPEG Streamclip (free) to split the movie.

  • Using Automator to change Kensington Trackball Settings

    Hi All,
    I have several shared company computers, all have the Expert Kensington Trackball Mouse. The computer in question is an Intel Mac Pro running Leopard. I have 2 sets of users that need to use the rig and both sets of users prefer different settings to the Kensington Mouse (I only need 2 separate profiles, not 4). Kensington does not provide software to quickly switch user profiles. The simplest solution is to create different users for the computer, but that is not an option here. We've been trying to use Automator to script the changes quickly between mouse profiles, but while using the 'Watch Me Do' (none of us are particularly experienced with Automator) feature, we are able to set the bottom two mouse buttons, but the top 2 buttons result in the error message "This operation cannot be performed". The Kensington settings are in System Preferences, and have several drop-down menus and text boxes. There must be a better way to do this. Any ideas? Thanks in advance!

    I have a similar problem with the ultra sensitive trackpad with the "Clicking, Dragging, Drag lock" checked in Preferences/Keyboard & Mouse. I'm always turning them on and off depending on which application I am using.
    My problem is that when I record a series of actions in Automator, the resulting action list has no text behind the action for the mouse click for the Clicking checkbox. Its as though it doesn't even know that its there. All of the other actions show up.
    Got any ideas on how to fill that void or another workflow that would do the same thing ? I think that running the workflow again would turn it back on as the actions are identical.

  • Using Automator to create a "video server"

    I'm looking to turn an Xserve into a video server for a digital signage situation. I know I can use Automator to open a video file in Quicktime and automatically play it full screen, however, is it possible to do the following with automator (or in some other easy fashion):
    1. Have it go into a designated folder and open up the video file in that folder no matter what the files name is. (So I can update the video content monthly and just copy the new file into the folder and not have to change anything in the Automator script. I could always give the file the exact same name every month, but it would be nice if I didn't have to.).
    2. Automatically run the Automator script on system boot - so we can boot up the Xserve in the morning with 1 button and once the OS is up it automatically starts playing the video file.
    3. Last, (and this is probably the hard one), any thoughts on a way I can get the server to play a file to its end, and then check and see if there is a newer file present before looping? If not, it continues looping the same file, if so, it begins looping the new file instead? I'm guessing this would be more of an Applescript thing than Automater? This would be for a "content update while playing" situation.
    I may not even mess with number 3, but the first two are a must. I'm not asking that you take time to develop working code for all the above, just letting me know that I can do it and whether I should be looking at Automater or Applescript for certain functionality would be fine and I can further research from there.
    Thank you.
    Don Hertz

    1. In the Finder actions you will need:
    - Get Specified Finder Items, and point it towards the folder that will contain the movie.
    - Get Folder Contents - to get what's inside the folder.
    - Filter Finder Items - set to filter by 'Name Extension' 'Is equal to' 'mov' and make sure all your video files have the right extension...
    - Open Finder Items - in QT Player - note that this might cause problems if there are multiple files in the folder...
    Then from the QT Player actions:
    - Play Movies.
    2. Save As... Application, then after saving, drag the app into the login items for the user account.
    3. That's going to need some AppleScript, but this thread should get you started:
    http://discussions.apple.com/thread.jspa?threadID=455825&tstart=0
    Ian

  • Using Automator in place of Tether

    +I posted this in another topic in reply to a question, but since I get asked this a lot I figured I'd give it a unique post.+
    So, if you were one of the many hoping Apple would add the ability to shoot tethered directly from within Aperture, only to discover the newly added feature left your shiny new Canon SLR out in the cold, here's how to more or less achieve the same thing using Automator and the Canon software:
    Using Automator to accomplish the task is pretty simple. You'll of course need to use Canon's EOS Utility software to do the remote capture. It's better than Aperture anyway, since it'll actually let you change the settings on the camera remotely as well (Aperture simply lets you click the shutter).
    Once you have the Canon software set up and running, you'll choose a folder to capture the photos to. This can be any folder you like, named anything you like. Within Aperture, create a new project or use and existing project. Do the following:
    1. Open Automator
    2. Choose a "Custom" workflow
    3. You can narrow the action list down by choosing "Photos" under library, and then find the Aperture Icon with "Import Photos" and drag it to the area on the right.
    4. Choose your project from the drop down menu, then select "Import by reference" if you want Aperture to leave the photos where they are and just reference them. Leave it unchecked if you want them imported to the Aperture library. You can also choose to have them deleted after the import if you'd like.
    5. Once you've set up the action with your project and import preferences, go to the file menu and choose "Save as Plug In." Name the action "Tether" or another appropriate name.
    6. In the first drop down menu choose "Folder Action"
    7. In the second drop down menu choose the folder where you have your Canon captured shots going and click "save".
    That's it! Now every time you take a photo using the Canon software, the photos will automatically be imported to the project of your choosing. Good luck!

    I was advising a friend to budget $1000 for a suitable tethered camera along with Aperture2, & more ram.
    I had previously used a video camera to take a snap of a product that he wanted sent via email to a web host on a daily basis. It worked when using iMovie and saving frames.
    As of yesterday, I became familiar with Automator, set up an action that should do the trick anddon't have to use iMovie.
    I do have Adobe Acrobat Pro for making pdf's so I can output in that format, however, will Leopard also output as a pdf without acrobat Pro?

  • Announcement/message before shutdown by using Automator?

    I wondered if it was possible to show a message or announcement when I try to shut down, like a message of some sorts that reminds me to set my Magic Mouse on off to save batteries and stuff like that. I'm not experienced enough with Applescript to know if it's possible by using Automator. If it is: how do I do it?

    This will only trigger if you run the Automator workflow to shut down the system. You can alternatively set up a logout hook to trigger such a message a logout. First create a small applescript that will issue the desired alerts and prompts an then shut down. Then create a small shell script that uses the "osascript" command to execute the applescript. You can also save the Automator workflow as an application and then target this application for execution directly from the shell script instead of using "osascript" (there are ultimately many ways to go about this).
    Then create the logout hook so it points to the shell script, by opening the Terminal and running the following command:
    sudo defaults write com.apple.loginwindow LogoutHook /path/to/script
    When experimenting with this, if you cannot get it to work then you can undo this hook setting by running the following command:
    sudo defaults delete com.apple.loginwindow LogoutHook

  • Using Automator for software updates

    Hi all. I apologize in advance if this has been asked and answered numerous times; I did several searches using different terms and did not find my answer.
    Can I use Automator to do all my software updates completely automatically? Including doing the restarts? I know this is a very basic question for most all of you; I can use my computer but really don't know a lot about using it to the max. I would like to be able to have all the software updates done during the night, while the computer is unattended.
    Thanks.

    If you are not too keen on running those commands you might want to try http://www.igetter.net/iGetter.html This download manager seems to allow the scheduled downloading that you need. I think you would have to go to the Apple site and find the url for the standalone updaters to find the link after Software Update identifies them. Then use this program to schedule the downloads. Sometimes those seem more stable anyway.
    The program us shareware. It appears from the description that the program remains fully functional but puts up a nag screen if the program has not been registered.

  • Use Automator to Change a System Setting

    Hi there,
    I was just wondering if there was anyway to use Automator to be able to click one button and be able to turn off/on the F1, F2, F3 etc... functions, so I am able to use F1, F2, F3 etc... when I need it ( mostly using Pro Tools ) and when i'm finished use the Brightness, Volume etc.....
    Thanks Craven

    Here is an AppleScript that will do this: 
    tell application "System Preferences" to activate
    tell application "System Preferences"
              reveal anchor "input" of pane id "com.apple.preference.sound"
    end tell
    tell application "System Events" to tell process "System Preferences"
              tell table 1 of scroll area 1 of tab group 1 of window 1
                        select (row 1 where value of text field 1 is "Internal microphone")
              end tell
    end tell
    quit application "System Preferences"
    You can put this into an AppleScript in AppleScript Editor (it's in Utilities), or run it in Automator.
    The simplest way would be to save it as an AppleScript application and use that as a login item.
    I wrote it up as a standalone AppleScript application called "InputMic" and saved it to my dropbox. You can download it here if you like: https://www.dropbox.com/sh/assrkjdvns0lj9m/RjP7Mc2HcM
    You can put it in your Applications folder and set it as a Login Item in system preferences > Users & Groups.
    Or drag it to the dock and then run it manually, or both. It will ask for your permission to run as an accessability item in Security & Privacy settings; just click the lock in the left corner, check the box next to InputMic, and then close the lock.

  • Using Automator to "cat" files

    Hi all-
    I was wondering if someone could help me with an Automator workflow. I've never used Automator... but I'm pretty sure it can do what I'm looking for.
    I need it to "cat" .MTS (AVCHD) files for me. I'd like it to order them alphabetically, then cat and output to a single file.
    Is this possible?
    Thanks!

    Yea, I figured out that much. My end goal is to take two .MTS (video) files and drop them onto an automator app and have it cat the files. I just don't know how to get there.
    I'm not good with scripting, and I've never written an Applescirpt, but I know I'm missing something here. Just having the "cat" command in the "Run Shell Script" action isn't working. I'm thinking I have to specify somehow for it to "use the two files I just gave you and run the cat command on them, then output".
    Does that make sense?
    Here is what I have so far in Automator:
    1. App recieves files or folders as input
    2. Sort Finder Items   
         -by Name in Ascending order
    3. Run Shell Script
         -cat
    4. Move Finder Items
         -to Desktop.
    Thanks!

  • Using Automator to Batch Create PDFs

    I've been trying to find a way to make an Automator workflow that will take the name of a folder and combine it's files into a PDF with as little manual input as possible and have finally figured out how to do so. I've seen others ask how to do this for a while so I wanted to share how I did it.
    Why would you want to create PDFs? If you have scanned books, photos, documents or anything else on your Mac, you can create PDFs out of them. You can then store these in iTunes and either read them using Preview on your Mac or iBooks on your iOS device.
    What this workflow will do:
    Take a folder with images, get the folder's name, and create a PDF of the images with it's name.
    On the next pass of the workflow, it will send the previous folder to the trash.
    Create/have a backup of your files!
    Create a folder somewhere that you can drop your folders in. Name it Automator Dropbox. You can create one wherever you want, but this workflow was created with Automator Dropbox in mind so you'll need to change it as necessary.
    Open Automator and create a new workflow.
    Find Finder Items
    - Search Automator Dropbox
    - [All] of the following are true:
    - [Label] is [Red]
    This will search for any folders that were done before.
    Move Finder Items to Trash
    This will move the previous folder/files to the trash.
    Ask for Finder Items
    - Prompt: [Choose a Folder]
    - Start at: Automator Dropbox
    - Type: [Folders]
    This will ask you to choose the next item to convert to PDF.
    Set Value of Variable
    - Variable: pdfvariable
    This will take the name of the folder you just selected and use it to to rename your PDF.
    Label Finder Items
    - [Red]
    This will mark the folder you're working on for deletion the next time the workflow is ran.
    Get Folder Contents
    This will grab all the image files within the folder so that it can create a PDF out of them.
    Scale Images
    - To size (pixels): 1600
    This will scale the maximum dimension of your image down (or up) to 1600px. I find this to be the sweet spot for performance on the iPad 3, and it looks just fine. If the maximum dimension of your image is lower than 1600px, I'd create a duplicate workflow of this and leave out this step; otherwise you will be upscaling and your image won't look as good. You can also leave this step out if you want your original image size kept, but on the iPad 3 and below there will be a delay going from page to page.
    New PDF From Images
    - Save Output to: [Desktop]
    - Output File Name: tempname
    This will save your finalized PDF to the Desktop. You can change this to whatever you want; I would suggest the Automatically Add to iTunes folder located in [Music > iTunes > iTunes Media > Automatically Add to iTunes]. You will find your PDF in the Books category in iTunes.
    Rename Finder Items
    - [Replace Text]
    - Find: tempname in [Full Name]. Ignore Case checked.
    - Replace: [pdfvariable] (Drag pdfvariable from the variables window into the text field for "Replace". If you don't see the variables, go to "View > Variables."
    You can't just drag the variable into the PDF name field in the step above, so this extra step is necessary. It will rename your PDF with the name of the folder it was created from. It will also add the full file path, which will be taken care of in the next step.
    Rename Finder Items
    - [Replace Text]
    - Find: Users/yourname/Documents/Automator Dropbox in [Full Name]. Ignore Case checked.
    - Replace: LEAVE EMPTY
    This will delete the name of the path from the name of your PDF. If your working folder is not Documents/Automator Dropbox, change it to whatever that is.
    If you're running this workflow on a bunch of folders, you can simply keep your cursor over the workflow's play button and press the right arrow + enter to select the next item in queue. This workflow was made for using a little human interaction as possible, so if anyone has suggestions on how to improve on it please post below.
    One last thing - if you're seeing a red folder when you run the workflow to choose a folder, it's because spotlight hasn't indexed it yet and the workflow could not find it to delete it. Just go on to the next item.

    Someone (not me) has created an automator workflow that does this, using a shell script that runs the "pstopdf" unix command. I just downloaded it and tested it on 10 .eps files. You will need to edit the first automator action in the workflow to find the eps files you want (by default it looks for all eps files on your computer), but once you do that, it works like a charm! Converted my eps files to pdf's. Of course, once they are pdf files, you can use automator to convert them to whatever format you want.
    http://mad-sci.blogspot.com/2007/12/why-i-hate-computers.html
    (link to the actual zip file containing the workflow below)
    http://www.physics.mcgill.ca/~burkes/code/PDFworkflows.zip

Maybe you are looking for

  • Deskjet 3050 HPJ610a not connecting

    I have the above printer.  I am trying to get it to print using the wireless. I have been all over the HP pages, but nothing helps. I turn on the wireless connection, and the little screen says "wireless on" but it also says "not connected". How do I

  • Can't get LR5 tethered capture to work for 70D - EOS utility won't install

    I am attempting to setup tethered capture on a macbook pro with Mavericks, Lightroom 5 and a Canon 70D. Lightroom 5 tethered capture alternates between "no camera detected" to "Canon EOS 70D" a few times and then posts the following error: "Tethered

  • Can I set "use facebook photo" for contacts by default?

    When I edit a contact's photo, I can choose "use facebook photo" from the available options if there is a facebook profile linked to the contact.  Is there a way to do this across ALL contacts, without having to edit each of my 300  contacts individu

  • Best approach to do Range partitioning on Huge tables.

    Hi All, I am working on 11gR2 oracle 3node RAC database. below are the db details. SQL> select * from v$version; BANNER Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production PL/SQL Release 11.2.0.3.0 - Production CORE 11.2.0.3.

  • Micro-commits in Git

    So we had a power outage at my college today and a bunch of seniors were angry coz they hadn't saved when the power went out and lost hours of work. Sucks to be them. Anyways, I save regularly and I also version control all my files using Git and thi