Welcome to MacForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Automator workflow w applescript rename selected image

 
   Macintosh computer (Home) -> Apple Scripts RSS
Next:  How do you force exit a script?  
Author Message
Sören_Vogel

External


Since: Jan 17, 2007
Posts: 1



(Msg. 1) Posted: Wed Jan 17, 2007 10:57 am
Post subject: Automator workflow w applescript rename selected image
Archived from groups: alt>comp>lang>applescript (more info?)

Hello,

I have created an automator workflow as a finder plugin for the context menu of one or more selected image files. The workflow invokes the two actions "get selected finder item" and "run applescript". The applescript executes code as follows (exiftool is in $PATH):

<pre>
on run {input}
set input to input as text
set input to POSIX path of input
set the_file to input
display dialog "Image Name" default answer "" buttons {"OK", "Cancel"} default button 1
copy the result as list to {button_pressed, text_returned}
if {button_pressed is "OK"} then
do shell script "exiftool '-FileName<CreateDate' -d \"%Y-%m-%d " & text_returned & " %%f.%%e\" \"" & the_file & "\""
return input
end if
end run
</pre>

The workflow works properly when run from within automator, that is, selecting an item and press the "run" button in the automator window. *But* the plugin does not work. Why? And how can I fix it?

Thank you,

Sören

 >> Stay informed about: Automator workflow w applescript rename selected image 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Launch Automator workflow from Applescript - I need to launch Automator workflow from my applescript code passing a file as a parameter. I know I can start the workflow with "execute" command, but it doesn't take parameters other than the workflow. I've looked through the Automtor dicti...

Mail Apple Script / Workflow - I'm looking to put together a script or automator workflow that would check e-mail via Mail.app, find key words (matched up to a list) in the subject of the message and then reply to that message with a randomly selected picture attached from a..

Help with Rename Script - I'm trying to create a script that copies the name of a folder the file that is saved within that folder. For example, I have a folder called: chicago and a file called template.html I want the file to be renamed to: chicago_IL.html Here's what I'v...

Rename File - Does anyone know an Applescript to re-arrange/rename a files in a folder? I have about a thousand pdf's that need to be renamed. Right now the files are uniformly named along the lines of xxxx01012004.pdf where xxxx is text and 01012004 is the date....

New to Applescript - Hello, I'm brand new to Applescript - I've done a lot with VBS but never touched Applescript. Are there some good script repositories online? AppleScript Editors? Manuals? Any help will be greatly appreciated!!! TIA, Bill bill@2burkes.com
   Macintosh computer (Home) -> Apple Scripts All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]