Hi,
We have bunch of qurak files. From that files we need to extract Art file names and its path name.
Can I get help to write applescript for this actions.
Thanks,
Gopal
Hi,
We have bunch of qurak files. From that files we need to extract Art file names and its path name.
Can I get help to write applescript for this actions.
Thanks,
Gopal
what do you have so far ?
Hi
This should point you in the right direction,
this script is simply for a one page document with one picture box with an image inside you will
need to adapt for your needs.
tell application "QuarkXPress"
tell document 1
tell page 1
set t to file path of image 1
tell application "Finder"
set n to name of t
display dialog "Name:" & space & n & return & return & "File Path:" & space & t
end tell
end tell
end tell
end tell
hope it gives you an idea!!
This will get you a list of file paths for images your file name is just the last part of the file path.
property Default_Location : (path to desktop folder as Unicode text)
tell application "QuarkXPress"
activate
set Doc_Name to name of document 1
tell document Doc_Name
set Path_List to {}
repeat with This_Image from 1 to count of image
tell image This_Image
set File_Path to (file path as text)
if Path_List does not contain File_Path then
set end of Path_List to File_Path
end if
end tell
end repeat
set ASTID to AppleScript's text item delimiters
set AppleScript's text item delimiters to return
set Report_Text to Path_List as text
set AppleScript's text item delimiters to ASTID
my writelog(Doc_Name, Report_Text)
beep 3
display dialog "The report is on your desktop." giving up after 2
end tell
end tell
on writelog(Doc_Name, Report_Text)
set Image_Report to Default_Location & Doc_Name & space & "Image Report" & ".txt"
try
open for access file the Image_Report with write permission
write Report_Text to file the Image_Report starting at eof
close access file the Image_Report
on error
close access file the Image_Report
end try
end writelog