Mac Help Forums


Reply
Thread Tools Display Modes

applescript help move files after converting

 
New Member
Join Date: Mar 2007
Posts: 1
 
      19th March 2007
Good Day!

I quite a newbie in applescripting... I have created a script that resaves a .tif file into .eps using illustrator 10. What I want is the user will select the tiff original folder and the eps destination folder... it selects all the tif files in the original folder open it in illustrator resaves it into eps and move that eps to the destination folder. On my script the eps file staying on the original folder.

Code:
set the topLevelFolder to choose folder with prompt "Source Folder?" as string
tell application "Finder"
	set AllFiles to name of every file of folder topLevelFolder as list
end tell

set myPath to choose folder with prompt "Destination folder?" as string

tell application "Finder" to set fileName to AllFiles

tell application "Adobe Illustrator 10"
	repeat with i in AllFiles
		set OpenThisDoc to ((topLevelFolder as string) & i) as alias
		open OpenThisDoc
		if (count of documents) > 0 then
			set myInteractLevel to user interaction level
			set user interaction level to never interact
			set myPath to file path of document 1 as string
			if myPath ends with ".tif" then
				try
					repeat with myPage from 1 to 1
						open alias myPath with options {page:myPage}
						set myNewPath to myPath
						repeat with myCharNum from (count of characters of myNewPath) to 1 by -1
							if character myCharNum of myNewPath = "." then
								if myCharNum > (count of characters of myNewPath) - 5 then set myNewPath to (text of characters 1 thru (myCharNum - 1) of myNewPath) as string
								exit repeat
							end if
						end repeat
						set myNewPath to myNewPath & ".eps"
						save document 1 in file myPath as eps
						close document 1 saving no
					end repeat
				end try
			end if
			set user interaction level to myInteractLevel
		end if
	end repeat
end tell
thanks in advance

Regards,
Polites

Last edited by polites; 19th March 2007 at 11:18 AM..
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
applescript help move files after converting. aaabha AppleScript 0 14th March 2011 04:11 AM
Applescript to delete and move files appatight AppleScript 0 9th March 2011 09:46 PM
Converting Applescript to Javascript Michael H. Phillips UK Macs 7 15th July 2008 06:33 PM
Applescript to stuff and move files zeyhra AppleScript 3 10th August 2006 08:58 PM
AppleScript to move or hide OS X dock when specific app in foreground? Edward Mendelson AppleScript 0 23rd February 2004 01:01 AM


All times are GMT +1. The time now is 10:27 AM.
Mac-Help.com is an independent website and is not affiliated with Apple Inc.


Welcome!
Welcome to the Mac Help Forums
 


Latest Threads
New book about Steve Jobs << take part in it!
Arjan (50 Minutes Ago, 09:37 AM)

Help! Stupid computer is automatically logging me out
Elizaboo (11 Hours Ago, 10:41 PM)

URGENT Help. Crazy talk Mac!
Joeker (12 Hours Ago, 09:42 PM)

PDF Document
yura (22 Hours Ago, 12:13 PM)

Difficulties with internet speed (nothing to do with connection)
sammethh (1 Day Ago, 06:36 AM)

 


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51