Remove Automator Workflows

Hi
I've created a workflow that automatically adds images from a folder to iPhoto. However I no longer need this workflow so I'm just wondering how do I delete it. I've searched for the answer and they all say that the workflows are located in the Services folder in my library. However I can't find these workflows.
Can anyone help me?
Running Mountain Lion.
Thanks in advance.

Solved it!
Anyone wondering you just right click on the folder you have the action set up for and click Folder Actions Setup and remove it.

Similar Messages

  • How do I remove the microsoft office 2008 automator workflows?

    Hey, first off all sorry if this isn't quite in the right place but there was a lot of forums to choose from!
    Basically I have installed Microsoft Office 2008 with the automator workflows and now decide that I don't require them and would like to remove them but I am unsure how to go about this?
    I know about the automator folder in system with the workflows in but don't want to delete any as I am afraid I will delete the wrong ones!
    Thanks for your help
    Joe

    Joe Bradley wrote:
    Thanks for your reply but this leads me on to the next question.. The reason for removing them is to remove the scripts icon at the far right of the top menu bar when an office application is running, I thought uninstalling the actions would remove this or am I completely wrong?
    the scripts icon has nothing to do with office or office automator actions.
    if you don't want it there just command+drag it off the sidebar.
    The reason that it annoys me is because it creates a delay when you quit an office program
    no, it doesn't. it makes no difference for office whether the scripts icon is there or not. this icon is there if you want to access some apple scripts. its mere presence has zero impact on speed of anything.
    Thanks for your help!
    Joe

  • Running an automator workflow w/o opening automator

    Is it possible to run an automator workflow - (check addressbook for birthdays - then send a card) once a day without having to remember to open automator everyday (the whole point is I forget to do this in the first place, so I'm hoping automator can just take care of it). but I don't want to have to leave automator open all the time... I think I read something about using applescripts, but I havent played with them at all...
    Thanks

    Hmm, your idea sounds about right. If you created the birthday event in iCal yourself (i.e. it's not the Birthday calendar iCal provides from your Address Book), then you can add an alarm to it. In that case, you have some nice options and effects.
    Since you would be adding the alarm to the birthday event, then the Automator workflow won't run every day and will only run when the birthday occurs. As for options, you can set the alarm for the event to activate at a specific time in reference to the event, e.g. the day before or perhaps around noon. (That is somewhat dependent on whether you made the event an all-day event or for a certain time, but it works either way and is pretty self evident.) You could also have it automatically occur a day late or even a week late.
    As such, you might consider making the workflow be more specific. You could create a workflow specifically for that birthday, and in that case you'd just specify a person from your Address Book instead of searching it for birthdays. Just depends on how you want to approach it. Regardless, saving the workflow as plug-in in Automator will be the easy way to refer to it as an iCal alarm.
    You mentioned iCal popping up reminders and that's an example of what an alarm can do if you set it that way, so you're probably familiar with them. However, you won't see that when you set the alarm to open a file (as in this case) unless you set a second alarm for the event to show a reminder. To add more alarms to the same event in iCal, you can click on the name "alarm" in the info drawer and it will give you a menu to add another alarm. You can also remove extra alarms in the same way. Wasn't sure if you knew that already.

  • Automator Workflow

    Hi
    I have created a workflow for automator to send me an email for birthdays coming up in the next 2 weeks, if i save this as an app it runs fine
    But when is put an event into iCal to alarm and open either the automator workflow or application, it doesnt work
    I am at a loss as to why ?
    Any clues ! (Its on OSX Snow Leopard 10.6 and iWork 09)
    Regards
    Dave

    Unless I am mistaken that first action is actually Find Address Book Items in disguise. Once dropped in place the name changes to either Find People or Find Groups depending upon whether it is set to groups or people. That seems to be the step that is causing problems for me. When I remove it the new workflow sends.
    Here's what I have right now although it does not give me the option of searching two months ahead like one of my previous workflows did. I added a blank line after Stop If iInput is Empty just to make it easier to read.
    Find People with Birthdays
    Send Birthday Greetings
    Send Outgoing Messages
    Stop If Input Is Empty
    Find People With Birthdays
    Get Contact Information
    New Mail Message
    Send Outgoing Messages
    The block of steps that includes Stop If Input Is Empty sends a birthday greeting to people having a birthday. The second block sends me a confirmation email with the contact information of the people who were sent greetings. If you want to see what the original workflow looks like check out http://www.atpm.com/12.08/automator.shtml

  • I want to write a script or Automator workflow/app that emails a random shortcut of the day to three recipients. The source is from an Excel spreadsheet. One column is the shortcut, and the second column is the definition. Anyone have experience?

    I want to write a script or Automator workflow/app that automatically emails a random shortcut of the day to three recipients. The source is from an Excel spreadsheet. One column is the shortcut, and the second column is the definition. Anyone have similar experience and know that this would work?

    I have had a first stab at the script, below.  It uses a file to store the shortcuts and command [descriptions].  You should be able to see from the script annotations how to add a new one.  (I populated 1-4 with real data, but got lazy after that, so you have a few placeholders to work with first.
    As I have noted, once you are happy that you have all the data in the file, you can comment out part of the script for ongoing use.  (BTW, my reluctance to use Excel is that I don't currently have it installed and I don't want to offer wrong advice.  If you have Numbers, I do have that and could probably modify to work with a spreadsheet from there.  This might be especially useful if you have the data already sitting in Excel.)
    A few things came-up whilist I was writing the script:
    1.     Currently, all recipients will not only get the same tip at the same time, but they will see the names and email addresses of the others who receive them.  It is possible to modify this.
    2.     I have added a property gRandomCheck which keeps track of which shortcut has already been used (since the last time the script was compiled.  This will prevent the same tip being sent more than once.    When all tips have been sent once, the script will alert you and not send anything until reset.  It does not check on a per-addressee basis (which would be a refinement).  (If you add a new addressee at this stage, the whole process will start again, and you may not really want this to be the behaviour.)
    3.     The way that I have built the list, commandList, is deliberately cumbersome - it's for the sake of clarity.  If you prefer, you can construct the whole list as {{shortcut:"X", command:"X"}, {shortcut:"Y", command:"Y"}}
    Have a look - I am sure you will have questions!
    SCRIPT STARTS HERE  Paste the following lines (thru the end) into a new AppleScript Editor document and press RUN
    --The property gRandomCheck persists between runs and is used to stop sending the same hint twice.
    property gRandomCheck : {}
    --I am defining a file on the desktop.  It doesn't have to be in this location
    set theFolder to path to desktop
    set commandFile to (theFolder as text) & "CommandFile.csv"
    --(* Unless you need to change the file contents you do not need to write to it each time.  Remove the "--" on this line and before the asterisk about 18 lines below
    --Follow this format and enter as many records as you like on a new line - each with a unique name
    set record1 to {shortcut:"Z", command:"Undo"}
    set record2 to {shortcut:"R", command:"Record"}
    set record3 to {shortcut:"⇧R", command:"Record Toggle"}
    set record4 to {shortcut:"⌘.", command:"Discard Recording & Return to Last Play Position"}
    set record5 to {shortcut:"X", command:"x"}
    set record6 to {shortcut:"X", command:"x"}
    set record7 to {shortcut:"X", command:"x"}
    set record8 to {shortcut:"X", command:"x"}
    set record9 to {shortcut:"X", command:"x"}
    set record10 to {shortcut:"X", command:"x"}
    set record11 to {shortcut:"X", command:"x"}
    set record12 to {shortcut:"X", command:"x"}
    set record13 to {shortcut:"X", command:"x"}
    --Make sure you add the record name before randomCheck:
    set commandList to {record1, record2, record3, record4, record5, record6, record7, record8, record9, record10, record11, record12, record13}
    --This part writes the above records to the file each time.
    set fileRef to open for access commandFile with write permission
    set eof of fileRef to 0
    write commandList to fileRef starting at eof as list
    close access fileRef
    --remove "--" here to stop writing (see above)*)
    --This reads from the file
    set fileRef to open for access commandFile with write permission
    set commandList to read fileRef as list
    close access fileRef
    --Here's where the random record is chosen
    set selected to 0
    if (count of gRandomCheck) is not (count of commandList) then
              repeat
                        set selected to (random number from 1 to (count of commandList))
                        if selected is not in gRandomCheck then
                                  set gRandomCheck to gRandomCheck & selected
                                  exit repeat
                        end if
              end repeat
    else
              display dialog "You have sent all shortcuts to all recipients once.  Recompile to reset"
              return
    end if
    --This is setting-up the format of the mail contents
    set messageText to ("Shortcut: " & shortcut of record selected of commandList & return & "Command: " & command of record selected of commandList)
    tell application "Mail"
      --When you're ready to use, you probably will not want Mail popping to the front, so add "--" before activate
      activate
      --You can change the subject of the message here.  You can also set visible:true to visible:false when you are happy all is working OK
              set theMessage to (make new outgoing message with properties {visible:true, subject:"Today's Logic Pro Shortcut", content:messageText})
              tell theMessage
      --You can add new recipients here.  Just add a new line.  Modify the names and addresses here to real ones
                        make new to recipient with properties {name:"Fred Smith", address:"[email protected]"}
                        make new to recipient with properties {name:"John Smith", address:"[email protected]"}
      --When you are ready to start sending, remove the dashes before "send" below
      --send
              end tell
    end tell

  • Automator workflow "run shell script" keeps running. How to stop?

    Because i want two instances of dropbox running simultaneously on my Mac, I set up a small automator workflow application. The workflow consist of a simple shell script:
    Or in text:
    bash
    HOME=$HOME/Dropbox-quivertree /Applications/Dropbox.app/Contents/MacOS/Dropbox &
    The problem is that once the application runs, or i execute the script from within automator, it just keeps running (i get the little cog in my menubar). Anybody have an idea how to automatically stop after it has launched dropbox?
    Thanks!
    Kim

    I do not have dropbox on my computer, so I tested using the Calculator application. The solution proposed by Mattis S.F. does work, but his explanation does not hold true in my case. Initially, I successfully tried
    HOME=$HOME/Dropbox-quivertree nohup /Applications/Calculator.app/Contents/MacOS/Calculator >/dev/null 2>&1 &
    If I remove the “nohup”, the result does not change. Removal of the “/dev/null 2>&1”, however, results in the same problem originally described by Kim van der Leeuw. My guess is the background process has stdout and stderr redirected by default back to the automator. When redirected to /dev/null, the automator no longer waits for the background process to complete. To summarize, change
    HOME=$HOME/Dropbox-quivertree /Applications/Dropbox.app/Contents/MacOS/Dropbox &
    to
    HOME=$HOME/Dropbox-quivertree /Applications/Dropbox.app/Contents/MacOS/Dropbox >/dev/null 2>&1 &

  • Automator Workflow Fails with Cryptic Error Message

    I'm updating an Automator workflow for OS X Lion that I initally developed and used, without issue, in OS X Tiger. The workflow asks for a name, creates a folder for the name, takes a digital image with a Nikon D50 connected to the computer, and saves the image to the new folder. This aspect of the workflow works fine.
    I then have a prompt asking if we should take another. If the user says "yes," the script should take another image and save it to the folder. This is where I run into an issue. When I attempt to add another "Take a Picture Action" into the workflow, I get the cryptic (at least to me) error message in the attached screenshot.
    Here's the text:
    "Cannot update for observer <AMWorkflow 0x400458ac0> for the key path "parameters.name" from <TakePicture 0x403e3b0a0>, most likely because the value for the key "parameters" has changed without an appropriate KVO notification being sent. Check the KVO-compliance of the TakePicture class."
    The language of this error would seem to indicate a bug. Any thoughts on a fix or the means to report to Apple?

    The subject of this post is a bit misleading. The workflow wasn't failing while I was running it, but rather when I was editing it and trying to include another 'Take a Picture' action in the same workflow.
    The workaround I found was to use a 'Loop' action on the 'Take a Picture' action. It's a bit more elegant and doesn't require multiple 'Take a Picture' actions in the same workflow.
    Nonetheless, what does this error message mean?

  • How to apply multiple automator workflows to one file

    Hi everyone,
    I've set up a few workflow applications to automate the process of making packshots from PDF files. The way those roughly work is they create a temporary copy in a folder, open a Photoshop droplet that executes all the actions on the file, and then save the finished product in a "finished" folder.
    However, we frequently need to deliver multiple packshots made from the same file. I was asked to make one automator app that allowed us to drop the PDF version on it, resulting in the multiple types of packshots in the "finished" folder, together with the original PDF.
    The way I have this set up right now is as follows:
    1) Copy the original PDF file to the "finished" folder
    2) Execute the first automator app
    3) Execute the second automator app
    This seems simple enough, and does work in 10.6.8. When I try it on a different computer in our studio though, with 10.7 installed, I get various errors:
    - Sometimes it says an error occured within one of the automator apps, while the app works fine when running it seperately (on all computers).
    - Sometimes it says something like "An error occurred while converting the data" when moving on from the first application to the second application
    - Sometimes I'll get an error message in the log, saying:
    *** -[_NSArrayl objectAtIndex:]: index 0 beyond bounds for empty array
    What I got from this is that it's actually not getting the right input it requires (or not getting any input, since it's an empty array). However, the previous task is set to "return the task input" (our systems are Dutch so excuse me for any discrepancies in translations please), and the resulting output that I get seems to be what I want the next automator application to use. Below is a screenshot of the error message:
    What I've tried:
    - I read somewhere that the newer versions of Automator require the action "Retrieve selected finder items" between them. I've tried using this in various ways (between all other actions/tasks, only before the second application to be run and before both applications to be run), but with no success. The problem I have with these is that, during the applications, it moves the files around, thus apparently selecting those folders as well.
    - Building an entirely new workflow on the newer system
    - Using "Start application" instead of "Execute Automator workflow". This results in Automator saying that it did execute the workflow while nothing happened.
    - Using "Ignore input" for the second application. This also results in Automator saying that it executed the workflow while nothing happened.
    So right now, I'm pretty stumped as to how to get this combination of apps to work in 10.7. Any solutions or workarounds are most welcome.
    Thanks in advance!

    Yes, angelanna. You can merge or split your video file via FCP sequence.
    ahaah, maybe I think angelanna would like to get the resulting file with MTS format because he mentioned “No need to be compressed”. Are you asking for this, angelanna?
    If so, a simple MTS files managing and editing tool  is needed. Maybe you can have a try the Mac version of Aunsoft Final Mate for managing HD camcorder footages. I just downloaded its free trial version and it offers a simple way of garping footages directly  from camcorder. And also it provides a attractive feature to join flawlessly and split accurately native MTS files for video file output with original MTS format.
    Maybe this is the tool cwhich an help you out, angelanna.
    Enjoy your video.

  • Cannot manually select Automator workflows in iCal

    I know That the Way, Apple intends that we create an Automator workflow as an iCal alarm is to create a new iCal alarm in Automator, and once you save it it automatically creates a new event in iCal. Unfortunately, that's not the way I want to work… I already have dozens of iCal alarms configured, and I'm trying to prep them for Mountain Lion: the currently open AppleScript's but all of my Apple scripts need to be converted to Automator workflows for Mountain Lion. So I was hoping to quickly duplicate previous iCal workflows, then reselect them from within existing events in iCal. Sadly, all of my iCal Automator workflows appear as greyed out in my File Open dialog when attempting to select a new file to run within my iCal alert.
    I don't want to have to delete all of my iCal alarms and start over creating them anew. Perhaps I am missing something simple?

    https://discussions.apple.com/docs/DOC-4082
    http://www.macworld.com/article/1165641/how_increased_mac_security_measures_will _impact_applescript.html
    https://discussions.apple.com/thread/4139323?start=0&tstart=0
    according to the first link I can save the applecript as an application. It doesn't answer why my automator workflows are greyed out when I try to select them, but maybe I'll just try saving as applications... sounds simpler.

  • Automator workflow no longer works on 10.7

    Hi.  I've been using an Automator workflow for years:  it opens iTunes, looks for a specific radio station, sets iTunes volume, sets Computer volume, starts iTunes playing and runs a small Applescript script to close the folder if it was open.
    This has been running for years.  Upgraded to 10.7 and it stopped working.  It seems to launch, but nothing happens.
    I recreated the same workflow, and I can run it:  it states that every step is "Completed".  But it really doesn't work!!!
    What should I try next?  (Windows 8???)

    Hi Frank.  Thanks for the response.
    (Mentioning Windows 8 was a joke, as I'm sure you know! ;-)
    Here's what the workflow looks like;  you'll note the "all green" log at the bottom!
    By the way, when I run it, iTunes does launch;  but it doesn't play anything.  And there IS a WCPE entry;  it's a radio station that is in the list of radio stations/Classical and that entry has also been copied to one of my playlists. 
    The workflow was created as an application and it's run when I power up the Mac.
    Thanks for your interest and advice!

  • Getting File Name in Automator workflow - combine PDF

    I am using Automator to combine 2 PDF files.
    I would like to inherit one of the file names in the new PDF and append a standard text to the front of the file name.
    I am not sure how to do this. I can combine the PDFs the way I would like, but I am not sure how to plick the file name.
    my workflow is as follows.
    Folder Action targets folder where 1st PDF is added(I want this FILE NAME).
    Ger Specified finder item selects 2nd PDF to be combined.
    Sort Finder Items makes sure the new PDF pages are ordered properly.
    Combine PDF Pages combines the pages.
    Move Finder Items saves the files where i want it.
    Name single item is whre i thought to add my standard text plus the variable of FILE NAME.
    Open File in mail to set up my email.
    Anyone can help with this?
    thanks,
    Aaron

    Here is an automator workflow that does something similar so I believe you can adapt to your needs.  This workflow is setup as a service workflow. It will combine PDFs in the order in which they are selected/clicked via the Shift key.  The default name of the combined output file will be the name of the first file clicked.  Automator can be activated by CTRL clicking any of the selected PDFs.
    1. Service receives PDF files in Finder
    2. Automator Action: Run AppleScript
    on run {input, parameters}
              display dialog "Files will be combined in the order selected via the Shift key" as text
              return input
    end run
    3.. Automator Action: Trim input items
    keep the first one
    you will need to download and install this autotmator action from here:
    http://www.menace-enterprises.com/Files/Automator/Actions/Trim%20Input%20Items.d mg
    4.  Automator Action: Run AppleScript
    (* Note & Definitions
    This Applescript extracts the basename of the first selected file without its .pdf extension
    "path_basename_ext" is full path and name, e.g. User/desktop/file.pdf
    "NmExt" is filename with extension, e.g. file.pdf
    "baseName" is the base filename without extension, e.g. file
    "Ext" is the file's extension, e.g. pdf
    on run {input, parameters}
              set path_basename_ext to input
              tell (info for path_basename_ext) to set {NmExt, Ext} to {name, name extension}
              set baseName to text 1 thru ((get offset of "." & Ext in NmExt) - 1) of NmExt
      baseName
              return baseName
    end run
    5.  Automator Action: Set Value of Variable
    define baseName as the variable
    6.  Automator Action: Get selected finder items
    Options: check ignore input
    7. Automator Action: Combine PDF pages
    choose Combine by appending
    8. Automator Action: Move Finder Items
    choose To: Desktop
    Options: check show this action when workflow runs
    9. Name Single Items
    choose Basename only to: baseName
    Options: check show this action when workflow runs
    10. Open Finder Items

  • Old Toad's automator workflow to backup Library6.iPhoto database

    Dear Old Toad,
    I just today downloaded your workflow to backup the iPhoto database file, and am having problems making it work.
    When I run it, either from the dock or the script menu, it launches Automator but then closes without doing anything. I don't get a confirmation screen, and no copy of the database is created.
    So I opened it in Automator to see if editing it would help, even though my library is already named iPhoto Library and stored in user/pictures. When I dragged it onto the Automator window, there was only 1 action (Get Specified Finder Items) instead of the 4 that show up in the ReadMe. When I dragged it onto the Automator app to open it, I got nothing.
    I downloaded it via Firefox 3.0.1 and got a 1.1MB zip, and I tried downloading it twice in case it had corrupted in the download, but no change with the second try. Downloaded from here:
    http://web.mac.com/toad.hall/ToadsCellar/ToadsCellar.html
    Running OS 10.4.11, iPhoto 7.1.5, on a G4.
    Something else I can try?
    Thanks,
    Daiya
    Message was edited by: Daiya

    Yes. Run the application like you would use the Save command in other applications, often. Running it again will overwrite the current backup copy with a new backup that will include all changes you've made to your library, new pictures, deletions, slideshows, books, etc.
    I suggested keeping it in the dock so you can quickly run it after any changes you've made to the library. Being in the Dock makes it more convenient than having to go into the Application folder and launching it from there.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • Every time I sign into my Macbook, I get an error message from Automator; "The data couldn't be read because it has been corrupted.". I have never created an Automator workflow. How do I find out what Automator is trying to run and stop it?

    Every time I sign into my Macbook, I get an error message from Automator; "The data couldn't be read because it has been corrupted.". I have never created an Automator workflow. How do I find out what Automator is trying to run and stop it?

    Maybe it's set as a login item:
    - System Preferences: Users and Groups:
    - Highlight your user account in the left pane/list
    - Click "Login" tab at the top.
    See if you have an Automater action on the list
    - Note, you can select it, then right-click, and can then select "Reveal in Finder". That way you might have an idea what installed it.

  • Automator Workflow to export Numbers documents in PDF format

    Does anyone know of any automator workflow to export Numbers documents in PDF format? I tried this program: Convert to PDF 1.2
    http://www.apple.com/downloads/macosx/automator/converttopdf_mauriziominelli.htm l
    But it gives an error.

    Reading carefully is often useful.
    The description of the tool which you tried clearly states :
    *About Convert to PDF*
    *_Convert all of your text files to PDF_. This action uses the underlying cups printing system ability to convert files, it’s a simple front end to the command line tool cupsfilter.*
    As far as I know, but maybe you don't, *_a Numbers document isn't a text file._*
    I already posted a script exporting Numbers documents as PDF.
    Here is an enhanced version which apply only to Numbers '09 (or maybe higher) :
    --[SCRIPT save2Numbers&PDF.app]
    Enregistrer le script en tant que Script : save2Numbers&PDF.scpt
    déplacer le fichier créé dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
    Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
    aller au menu Scripts , choisir Numbers puis choisir save2Numbers&PDF
    Le script enregistre le document au format natif de Numbers
    et l'enregistre dans un fichier PDF.
    S'il existe déjà un PDF homonyme, il est renommé en lui ajoutant une chaîne
    construite sur sa date de modification.
    --=====
    L'aide du Finder explique:
    L'Utilitaire AppleScript permet d'activer le Menu des scripts :
    Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
    Cochez la case "Afficher le menu des scripts dans la barre de menus".
    +++++++
    Save the script
    as a Script: save2Numbers&PDF.scpt
    Move the newly created file into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
    Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
    go to the Scripts Menu, choose Numbers, then choose save2Numbers&PDF
    The script saves the document in the native Numbers format and saves it in a .pdf file
    If such a .pdf already exists, it is renamed with a stamp matching its modification date.
    --=====
    The Finder's Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the "Show Script Menu in menu bar" checkbox
    --=====
    Yvan KOENIG (VALLAURIS, France)
    modifié 2010/08/17
    property closeIt : true
    (* true = closes the saved document
    false = doesn't close it *)
    property theApp : "Numbers"
    property theExt : "numbers"
    --=====
    on run
    tell application theApp
    activate
    set le_document to front document
    if modified of le_document then save le_document
    delay 0.2
    set thePath to path of document 1
    end tell -- theapp
    set {xPath, xExt} to my saveAs(thePath)
    if closeIt then tell application theApp to close document 1 saving no
    end run
    --=====
    on saveAs(p)
    local extension_export, type_export, nomde_loriginal, dossierde_loriginal, nomde_lexport, cheminde_lexport
    set {extension_export, type_export} to {"pdf", "LSDocumentTypePDF"}
    set {nomde_loriginal, dossierde_loriginal} to my quelNomEtDossier(p)
    if nomde_loriginal ends with theExt then
    • replace the original extension by the xExt one *)
    set nomde_lexport to (text 1 thru -(1 + (length of theExt)) of nomde_loriginal) & extension_export
    else
    • add the xExt extension name *)
    set nomde_lexport to nomde_loriginal & "." & extension_export
    end if
    set cheminde_lexport to dossierde_loriginal & nomde_lexport
    • CAUTION, When saving, Numbers doesn't take care of an existing document.
    It replaces it by the new one. *)
    tell application "System Events"
    if exists (file cheminde_lexport) then
    Playing safety, we rename the existing file by inserting a modificationdatetime stamp *)
    set name of file cheminde_lexport to (text 1 thru -(2 + (length of extension_export)) of nomde_lexport) & my horoDateur(modification date of file cheminde_lexport) & "." & extension_export
    end if
    end tell -- System Events
    • save as type_export document *)
    tell application "Numbers" to save document nomde_loriginal as type_export in cheminde_lexport
    return {cheminde_lexport, extension_export}
    end saveAs
    -- =====
    on quelNomEtDossier(f)
    local nom, dossier
    tell application "System Events" to tell file (f as Unicode text)
    set nom to name (* Unicode text *)
    set dossier to path of container (* Unicode HFS path *)
    end tell -- to System Events
    return {nom, dossier}
    end quelNomEtDossier
    --=====
    • Build a stamp from the modification date_time
    on horoDateur(datedemodification)
    local les_secondes
    set les_secondes to time of datedemodification
    return ("_" & year of datedemodification & text -2 thru -1 of ("0" & (month of datedemodification as integer)) & text -2 thru -1 of ("0" & day of datedemodification) & "_" & text -2 thru -1 of ("0" & les_secondes div 3600) & text -2 thru -1 of ("0" & (les_secondes mod 3600) div 60) & text -2 thru -1 of ("0" & les_secondes mod 60))
    (* Here, the stamp is "YYYYMMDDhhmmss" *)
    end horoDateur
    --=====
    --[/SCRIPT]
    Yvan KOENIG (VALLAURIS, France) mardi 17 août 2010 18:16:27

  • Automator workflow question?

    I tried to create a workflow in automator but I had no luck so far. So I need some help to create an automator workflow for;
    go to a specific web page and save the page as pdf to desktop and than close the safari.
    I've tried as "record/watch what I do" in automator but when I click on the safari on dock the "watch me" script misses it and presses mail.app
    Help please. Thanks in advance.

    Give this one a try - it uses a *Run AppleScript* action to script Safari's print dialog:
    1) *Get Specified URLs* (drag URL here - only the last one will be saved)
    2) *Display Webpages*
    3) *Run AppleScript*: <pre style="</div>
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 680px; height: 340px;
    color: #000000;
    background-color: #DAFFB6;
    overflow: auto;"
    title="this text can be pasted into the AppleScript Editor">
    on run {input, parameters} -- save the current Safari page as PDF
    waitForPage()
    tell application "Safari"
    tell application "System Events"
    keystroke "p" using {command down} -- activate the Print... menu item
    delay 0.25
    click menu button "PDF" of sheet 1 of window 1 of application process "Safari" -- open the PDF menu
    delay 0.25
    keystroke (ASCII character 31) -- down arrow
    keystroke (ASCII character 31) -- down arrow
    keystroke return -- activate the Save As... menu item
    delay 0.25
    keystroke return -- press the save button
    end tell
    quit
    end tell
    end run
    to waitForPage()
    delay 1
    repeat
    tell application "Safari" to set windowName to the name of window 1
    if windowName does not contain "Untitled" then exit repeat
    delay 1
    end repeat
    repeat
    tell application "Safari" to set windowName to the name of window 1
    if windowName does not contain "Loading" then exit repeat
    delay 1
    end repeat
    repeat
    tell application "Safari" to do JavaScript "document.readyState" in document 1
    if result is "Complete" then exit repeat
    delay 1
    end repeat
    end waitForPage
    </pre>

Maybe you are looking for