Recent Posts

Pages: 1 2 3 [4] 5 6 7 8 ... 10
31
Adobe InDesign scripting / Geometric Bounds out of order
« Last post by mbornbach on May 04, 2016, 03:57:08 PM »
I'm getting the location (measurements) for guides on a page and I'm creating text boxes for the areas within the guides. I'm using variables to calculate the text box bounds based on the page size and guide location. For some reason when I do this, the bounds end up in the wrong order. Then the box is in the wrong spot and it's the wrong size.  When I use actual numbers for the geometric bounds {"4 in", "5 in", "6 in", 7 in"} the bounds remain in the right order.  Any ideas?  Thanks!

Code: [Select]
on open droppedfiles
repeat with afile in droppedfiles
tell application "Adobe InDesign CC 2014"

--SETTING MEASUREMENTS TO INCHES
tell view preferences
--Measurement unit choices are:
--picas, points, inches, inches decimal, millimeters, centimeters, or ciceros
--Set horizontal and vertical measurement units to points.
set horizontal measurement units to inches
set vertical measurement units to inches

end tell


open afile


tell document 1

-----------------------------------------

--SETTING RULER ORIGIN TO ZERO
set rulerOrigin to ruler origin of view preferences
if rulerOrigin is not page origin then set ruler origin of view preferences to page origin --(spread origin/page origin/spine origin)


set rulerZeroPoint to zero point
if rulerZeroPoint is not {0, 0} then set zero point to {0, 0}

--Do Stuff

--Reset zero point and ruler origin
set zero point to rulerZeroPoint
set ruler origin of view preferences to rulerOrigin

-----------------------------------------

--SETTING PAGE HEIGHT AND WIDTH
tell page 1
set pageHeight to item 4 of bounds
set pageWidth to item 3 of bounds
end tell

set theGuides to every guide of page 1

-----------------------------------------

--CREATING EMPTY LISTS TO ADD TO LATER ON
set theGuideListVertical to {}
set theGuideListHorizontal to {}

--GETTING THE ORIENTATION (HORIZONTAL OR VERTICAL) FOR EVERY GUIDE
repeat with aGuide in theGuides --Telling it to loop through every guide
set guideOrientation to orientation of aGuide as string --Getting the orientation of every guide

--STORING THE LOCATION (MEASUREMENTS) OF EVERY VERTICAL GUIDE IN ONE LIST
if guideOrientation contains "«constant ****vert»" then --Determining if guides are vertical
set guideLocationVertical to location of aGuide --Getting the location of every guide
set theGuideListVertical to theGuideListVertical & guideLocationVertical --Creating the list with every location (measurement) of all the vertical guides

--STORING THE LOCATION (MEASUREMENTS) OF EVERY HORIZONAL GUIDE IN ANOTHER LIST
else if guideOrientation contains "«constant ****horz»" then --Determining if guides are horizontal
set guideLocationHorizontal to location of aGuide --Getting the location of every guide
set theGuideListHorizontal to theGuideListHorizontal & guideLocationHorizontal --Creating the list with every location (measurement) of all the horizontal guides
end if

end repeat


-----------------------------------------

--GETTING GEOMETRIC BOUNDS FOR LAST BOX

set lastFrameVerticalOffset to item 1 of theGuideListHorizontal as number
set lastFrameHorizontalOffset to item 1 of theGuideListVertical as number
set lastFrameHeight to (pageHeight - lastFrameHorizontalOffset) as number
set lastFrameWidth to (pageWidth - lastFrameVerticalOffset) as number

display dialog lastFrameVerticalOffset & " " & lastFrameHorizontalOffset & " " & lastFrameHeight & " " & lastFrameWidth as string

set xFrame1 to make text frame at page 1 of spread 1 with properties {geometric bounds:{lastFrameVerticalOffset, lastFrameHorizontalOffset, lastFrameHeight, lastFrameWidth}}

display dialog geometric bounds of xFrame1 as string

end tell
end tell

end repeat
end open
32
Adobe InDesign scripting / Re: Exporting PDFs and attaching to an email
« Last post by Jean-Marie Schwartz on April 26, 2016, 02:46:26 AM »
To be honest, I've started with lasy bones questions: how to have the Mac doing all my repetitive tasks and how to improve Quark? And I ended with the same question as yours. I asked Michel, aka Scripting_Ace on Quark forums. He helped me very kindly with specific requests from me. Then I learnt a lot on the Web. Then I failed (and still fail) on so many points and that's probably the best school :-) But Michel was definately my best teacher, simple and clever. He pointed many details like that and corrected me so many times! But, again, I still come accross issues, stupid errors, and so on. That's why lists and forums are the best place to get help.
33
Adobe InDesign scripting / Re: Exporting PDFs and attaching to an email
« Last post by mbornbach on April 21, 2016, 03:56:04 PM »
Here's the final code of my pdf and email script. :) So how did you learn applescript Jean-Marie? I've been using google to learn in between other work for the past year, but I'm sure there's a lot I haven't learned yet.

Code: [Select]
global my_pdf_choice

on open droppedfiles

-------------------------------------------------

--PART 1
--PROMPTING THE USER FOR WHICH PDF PRESET THEY WANT
tell application "Adobe InDesign CC 2014"
set my_pdf_export to get the name of every PDF export preset
set my_pdf_choice to (choose from list my_pdf_export) as string
end tell


-------------------------------------------------

--PART 2
--GETTING EMAIL SUBJECT AND CONTENT INFORMATION

tell application "Finder"
if (count of droppedfiles) is greater than 1 as integer then --IF MORE THAN ONE FILE IS DROPPED, THE SUBJECT AND CONTENT IS SET IN THE 2 LINES BELOW
set subjectName to "Proof of signs"
set contentInfo to "I've attached " & (count of droppedfiles) & " proofs" & "." & " Please let me know if there are any revisions or if the signs are good to print as is." & "<br>" & ":-)" & "<br>" & "<br>" & "Thanks!"
else --IF JUST ONE FILE IS DROPPED THE SUBJECT & CONTENT DEFAULTS TO BELOW LINES
repeat with the_file in droppedfiles
if name of the_file does not contain "sign" as string then
set fullName to name of the_file as string
set shortName to text 1 thru -6 of fullName
set subjectName to "Proof of " & shortName & " sign"
set contentInfo to "Attached is a proof of " & shortName & " sign" & "." & " Please let me know if there are any revisions or if it is good to print as is." & "<br>" & ":-)" & "<br>" & "<br>" & "Thanks!"
else
set subjectName to "Proof of " & fullName
set contentInfo to "Attached is a proof of " & shortName & "." & " Please let me know if there are any revisions or if it is good to print as is." & "<br>" & ":-)" & "<br>" & "<br>" & "Thanks!"
end if
end repeat
end if
end tell

-------------------------------------------------

--ACTIVATING INDESIGN
tell application "Adobe InDesign CC 2014" to activate

-------------------------------------------------


--PART 3
--THE MAIN PART SHALL CREATE THE NEW OUTGOING MESSAGE
tell application "Microsoft Outlook"
set newMessage to make new outgoing message with properties {subject:subjectName, content:contentInfo}
tell newMessage

--PROCESSING THE DROPPED FILES WOULD TAKE PLACE HERE           
repeat with the_file in droppedfiles
set pdfFile to my ProcessFile(the_file) --CALLING HANDLER PROCESSFILE FOR EACH DROPPED FILE
make new attachment with properties {file:pdfFile} --ATTACHING EACH GENERATED PDF
end repeat
end tell
open newMessage
end tell


--RESETTING USER INTERACTION SO DIALOG BOXES COME UP AGAIN
tell application "Adobe InDesign CC 2014"
set user interaction level of script preferences to interact with all

end tell

end open

-------------------------------------------------


--PART 4       
--HANDLER PROCESSFILE
on ProcessFile(the_file)

--GETTING RID OF INTERRUPTING MISSING FONT & IMAGE DIALOG BOXES
tell application "Adobe InDesign CC 2014"
set user interaction level of script preferences to never interact
tell PDF export preferences
set view PDF to false
end tell

--OPENING THE FILE IN INDESIGN
open the_file

--DECLARING VARIABLE FOR MISSING LINKS/IMAGES AND THE PATH TO THE DOCUMENT
set my_destination to (path to desktop) as string
set doc_name to get name of active document as string
set pdf_name to text 1 thru -6 of doc_name as string
set pdf_destination to my_destination & pdf_name & ".pdf"

--TELLING IN DESIGN TO CREATE PDF FILE IF NO FONTS/IMAGES ARE MISSING
tell document 1

--EXPORTING THE PDF
export format PDF type to pdf_destination using my_pdf_choice without showing options
close the_file saving no

end tell
end tell
set the_pdf_file to pdf_destination as alias
return the_pdf_file

end ProcessFile
34
Adobe InDesign scripting / Re: Exporting PDFs and attaching to an email
« Last post by mbornbach on April 21, 2016, 03:32:34 PM »
Thanks Jean-Marie! It is working. I'm playing with using if statements to change the subject name and content of the email based on how many files are dropped on the script. It looks like it's working nicely. I'll post the final code when I'm done with that part. :)
35
Adobe InDesign scripting / Re: Exporting PDFs and attaching to an email
« Last post by Jean-Marie Schwartz on April 21, 2016, 02:38:56 AM »
Hi! I don't use InDesign as far as I'm concerned, but never mind, it has nothing to do here. To put the thing simple, you need to attach 3 files to a new email. So what you'll need to do is or to stock the 3 aliases in a list and then pick up the files one by one (which is actually top fast when running) to attach them; or to insert the PDF generation inside of the repeat loop in the Outlook block.
For instance:
Code: [Select]
on open droppedfiles

tell application "Adobe InDesign CC 2014" to activate

--PART 1
--THE MAIN PART SHALL CREATE THE NEW OUTGOING MESSAGE
tell application "Microsoft Outlook"
        set newMessage to make new outgoing message with properties {subject:"Proof of " & pdf_name & " sign", content:"Attached is a proof of the " & pdf_name & " sign" & "." & " Please let me know if there are any revisions or if it is good to print as is." & "<br>" & ":-)" & "<br>" & "<br>" & "Thanks!"}
        tell newMessage

--PROCESSING THE DROPPED FILES WOULD TAKE PLACE HERE           
        repeat with afile in droppedfiles
                set pdfFile to my ProcessFile(afile) --CALLING HANDLER PROCESSFILE FOR EACH DROPPED FILE
                make new attachment with properties {file:pdfFile} --ATTACHING EACH GENERATED PDF
            end repeat
        end tell
        open newMessage
end tell

--RESETTING USER INTERACTION SO DIALOG BOXES COME UP AGAIN
tell application "Adobe InDesign CC 2014"
     set user interaction level of script preferences to interact with all
                   
end tell
 

--PART 2       
--HANDLER PROCESSFILE
on ProcessFile(the_file)
        --GETTING RID OF INTERRUPTING MISSING FONT & IMAGE DIALOG BOXES
        tell application "Adobe InDesign CC 2014"
            set user interaction level of script preferences to never interact
            tell PDF export preferences
                set view PDF to false
            end tell
           
            --OPENING THE FILE IN INDESIGN
            open the_file
           
            --DECLARING VARIABLE FOR MISSING LINKS/IMAGES AND THE PATH TO THE DOCUMENT
            set my_destination to (path to desktop) as string
            set doc_name to get name of active document as string
            set pdf_name to text 1 thru -6 of doc_name as string
            set pdf_destination to my_destination & pdf_name & "_LoRes" & ".pdf"
           
            --TELLING IN DESIGN TO CREATE PDF FILE IF NO FONTS/IMAGES ARE MISSING
            tell document 1
               
               
                --EXPORTING THE PDF
                export format PDF type to pdf_destination using "IDPDF_LoRes" without showing options
                close afile saving no
               
                             
            end tell
        end tell
       set the_pdf_file to pdf_destination as alias
       return the_pdf_file       

end ProcessFile

Does it make sense? Does it work as expected?
36
Adobe InDesign scripting / Exporting PDFs and attaching to an email
« Last post by mbornbach on April 20, 2016, 03:48:18 PM »
I have a script that exports a pdf in InDesign and attaches that pdf to a new email. Right now, if I drop 3 files on the script, it creates 3 separate emails with one attachment each. What I want it to do is create ONE email with three attachments. I know I need to take the part that creates the email in outlook out of the repeat loop. I'm not sure how to loop through the exported pdfs to get them to attach to the email, one by one. Is there a way to add the pdf files to some sort of list? Any help is appreciated :)

on open droppedfiles
   
   
   
Code: [Select]
	---------------------------------------------------------------------

--PART #1 - GETTING THE FILE NAME AND PATH AND CREATING PDF FILE

tell application "Adobe InDesign CC 2014" to activate
repeat with afile in droppedfiles

--GETTING RID OF INTERRUPTING MISSING FONT & IMAGE DIALOG BOXES
tell application "Adobe InDesign CC 2014"
set user interaction level of script preferences to never interact
tell PDF export preferences
set view PDF to false
end tell

--OPENING THE FILE IN INDESIGN
open afile

--DECLARING VARIABLE FOR MISSING LINKS/IMAGES AND THE PATH TO THE DOCUMENT
set my_destination to (path to desktop) as string
set doc_name to get name of active document as string
set pdf_name to text 1 thru -6 of doc_name as string
set pdf_destination to my_destination & pdf_name & "_LoRes" & ".pdf"

--TELLING IN DESIGN TO CREATE PDF FILE IF NO FONTS/IMAGES ARE MISSING
tell document 1


--EXPORTING THE PDF
export format PDF type to pdf_destination using "IDPDF_LoRes" without showing options
close afile saving no


--RESETTING USER INTERACTION SO DIALOG BOXES COME UP AGAIN
tell application "Adobe InDesign CC 2014"
set user interaction level of script preferences to interact with all

end tell

end tell
end tell


---------------------------------------------------------------

--PART #2 - CREATING A NEW EMAIL MESSAGE WITH THE FILE ATTACHED


tell application "Microsoft Outlook"
set pdfFile to pdf_destination as alias
set newMessage to make new outgoing message with properties {subject:"Proof of " & pdf_name & " sign", content:"Attached is a proof of the " & pdf_name & " sign" & "." & " Please let me know if there are any revisions or if it is good to print as is." & "<br>" & ":-)" & "<br>" & "<br>" & "Thanks!"}
tell newMessage
repeat
make new attachment with properties {file:pdfFile}
end repeat
end tell
open newMessage
end tell


---------------------------------------------------------------

end repeat
---------------------------------------------------------------------







end open


37
Scripting in general / Re: Renaming and Filing Images
« Last post by Jean-Marie Schwartz on November 13, 2015, 05:52:15 AM »
I've run your code. (I've also created locally, that is on my Desktop, both folders "File Manually in RDRIVE & 1_4c IMAGES" and "z_DEBORAH_CONVERT and FILE").
I processed a tenish pictures. They all were renamed with the tail _s_4c (correctly?) and moved to the folder "File Manually in RDRIVE & 1_4c IMAGES".
Then I've run it again chosing those renamed pictures and they were all duplicated to the folder "z_DEBORAH_CONVERT and FILE" with no change in the file names.

Is this the behaviour you're expecting?
38
Scripting in general / Re: Renaming and Filing Images
« Last post by mbornbach on November 05, 2015, 03:23:59 PM »
I tried simplifying the code down to the part that seems to be giving me problems in an attempt to solve the part that is keeping the script from working. I'm still getting that -4960 error right after the script renames the images but before it moves them. The interesting thing is if the image already has _s_4c at the end of the filename, the script does work. 

If I remove the following line, the script works for all images regardless of how they are named, but then the images that did not have _s_4c at the end are not renamed correctly.
Code: [Select]
set name of afile to newName

Here's the full simplified code:

Code: [Select]
on open droppedfiles

repeat with afile in droppedfiles


--USING THE FINDER TO RENAME THE FILE, ADDING  _s_4c to THE IMAGE NAME
tell application "Finder"
activate
set fileExt to name extension of afile
set oldDelims to AppleScript's text item delimiters

try
--ELIMINATING _4c on IMAGES THAT ALREADY HAD _4c IN FILE NAME BEFORE PROCESSING
if name of afile contains "_4c" and name of afile does not contain "_s_4c" then
set AppleScript's text item delimiters to {"_4c"}

--ELIMINATING DOUBLE _s_4c on IMAGES THAT ALREADY HAD _s_4c IN FILE NAME BEFORE PROCESSING
else if name of afile contains "_s_4c" then
set AppleScript's text item delimiters to {"_s_4c"}

--FOR IMAGES THAT DIDN'T HAVE _s_4c IN FILE NAME BEFORE PROCESSING
else if name of afile does not contain "_s_4c" or "_4c" then
set AppleScript's text item delimiters to {"."}
end if

set fileName to name of afile --> ex. Disneyland.tif
set nameWithoutExtension to first text item of fileName --> Disneyland
set newName to nameWithoutExtension & "_s_4c" & "." & fileExt --> Disneyland_s_4c.tif
set name of afile to newName


--RESETTING APPLESCRIPT'S TEXT ITEM DELIMITERS AND NAME
set AppleScript's text item delimiters to oldDelims


--FILING THE IMAGES
--DUPLICATE FILE TO WEB CONVERT FOLDER ON R DRIVE
duplicate afile to alias "Volumes:sblain$:IMAGES_FROM PREPRESS:z_DEBORAH_CONVERT and FILE:"

--Moving file to the "File Manually in RDRIVE & 1_4c IMAGES folder" inside the Processing Folder if there is an error
on error
set AppleScript's text item delimiters to oldDelims
move afile to alias "Volumes:nas:Advertising Department:5_ADVERTISING DEPT - PREPRESS:1_ADV IMAGE PROCESSING:2_PROCESSING:Melissa Processing:Scripts:File Manually in RDRIVE & 1_4c IMAGES:" with replacing
end try


end tell
end repeat
end open
39
Scripting in general / Re: Renaming and Filing Images
« Last post by mbornbach on November 05, 2015, 08:30:21 AM »
Thanks. It's still giving me the -4960 error, so maybe there's a second culprit?

Code: [Select]
on open droppedfiles

repeat with afile in droppedfiles


--USING THE FINDER TO RENAME THE FILE, ADDING  _s_4c to THE IMAGE NAME
tell application "Finder"
activate
set fileToMove to afile
set fileToMove_Name to name of fileToMove
set fileExt to name extension of fileToMove

set oldDelims to AppleScript's text item delimiters

try
--ELIMINATING _4c on IMAGES THAT ALREADY HAD _4c IN FILE NAME BEFORE PROCESSING
if name of fileToMove contains "_4c" and name of fileToMove does not contain "_s_4c" then
set AppleScript's text item delimiters to {"_4c"}

--ELIMINATING DOUBLE _s_4c on IMAGES THAT ALREADY HAD _s_4c IN FILE NAME BEFORE PROCESSING
else if name of fileToMove contains "_s_4c" then
set AppleScript's text item delimiters to {"_s_4c"}

--FOR IMAGES THAT DIDN'T HAVE _s_4c IN FILE NAME BEFORE PROCESSING
else if name of fileToMove does not contain "_s_4c" or "_4c" then
set AppleScript's text item delimiters to {"."}
end if

set fileName to name of fileToMove --> ex. Disneyland.tif
set nameWithoutExtension to first text item of fileName --> Disneyland
set newName to nameWithoutExtension & "_s_4c" & "." & fileExt --> Disneyland_s_4c.tif
set name of fileToMove to newName

--RESETTING APPLESCRIPT'S TEXT ITEM DELIMITERS AND NAME
set AppleScript's text item delimiters to oldDelims

--TELLING FINDER TO RESET APPLESCRIPT'S TEXT ITEM DELIMITERS IF THERE'S AN ERROR
on error
set AppleScript's text item delimiters to oldDelims

end try
end tell

--FILING THE IMAGES
tell application "Finder"
activate

set fileToMove to afile
set fileToMove_Name to name of fileToMove as string
set fileExt to name extension of fileToMove as string

--DUPLICATE FILE TO WEB CONVERT FOLDER ON R DRIVE
try
if fileExt is "tif" then
duplicate fileToMove to alias "Volumes:sblain$:IMAGES_FROM PREPRESS:z_DEBORAH_CONVERT and FILE:"
else
move fileToMove to alias "Volumes:nas:Advertising Department:5_ADVERTISING DEPT - PREPRESS:1_ADV IMAGE PROCESSING:2_PROCESSING:Melissa Processing:Scripts:Convert:" with replacing
end if

--Moving file to the "File Manually in RDRIVE & 1_4c IMAGES folder" inside the Processing Folder if there is an error
on error
move fileToMove to alias "Volumes:nas:Advertising Department:5_ADVERTISING DEPT - PREPRESS:1_ADV IMAGE PROCESSING:2_PROCESSING:Melissa Processing:Scripts:File Manually in RDRIVE & 1_4c IMAGES:" with replacing
end try



--ONTO FILING INTO THE 1_4C IMAGES FOLDERS
try

--DECLARING LISTS OF STRINGS OF CHARACTERS FOR THE COMPUTER TO LOOK FOR

--AG Files
set AG00string to {"AG00", "AG01", "AG02", "AG03"}
set AG04string to {"AG04", "AG05", "AG06", "AG07", "AG08", "AG09"}
set AGAstring to {"AGA", "AGB", "AGC", "AGD", "AGE", "AGF", "AGG", "AGH", "AGI", "AGJ", "AGK", "AGL", "AGM", "AGN", "AGO", "AGP", "AGQ", "AGR", "AGS", "AGT", "AGU", "AGV", "AGW", "AGX", "AGY", "AGZ"}
set AG_Astring to {"AG_A", "AG_B", "AG_C", "AG_D", "AG_E", "AG_F", "AG_G", "AG_H", "AG_I", "AG_J", "AG_K", "AG_L", "AG_M", "AG_N", "AG_O", "AG_P", "AG_Q", "AG_R", "AG_S", "AG_T", "AG_U", "AG_V", "AG_W", "AG_X", "AG_Y", "AG_Z"}

--BI Files
set BI0string to {"BI0", "BI1", "BI2", "BI3", "BI4", "BI5"}
set BI6string to {"BI6"}
set BI7string to {"BI7"}
set BI8string to {"BI8"}
set BI9string to {"BI9"}
set BIAstring to {"BIA", "BIB", "BIC", "BID", "BIE", "BIF", "BIG", "BIH", "BII", "BIJ", "BIK", "BIL", "BIM", "BIN", "BIO", "BIP", "BIQ", "BIR", "BIS", "BIT", "BIU", "BIV", "BIW", "BIX", "BIY", "BIZ"}
set BI_Astring to {"BI_A", "BI_B", "BI_C", "BI_D", "BI_E", "BI_F", "BI_G", "BI_H", "BI_I", "BI_J", "BI_K", "BI_L", "BI_M", "BI_N", "BI_O", "BI_P", "BI_Q", "BI_R", "BI_S", "BI_T", "BI_U", "BI_V", "BI_W", "BI_X", "BI_Y", "BI_Z"}


--MOVING THE ACTUAL FILES TO THE 1_4C IMAGES FOLDERS

--Moving AG files to 1_4c IMAGES Folders
if AG00string contains (text 1 thru 4 of fileToMove_Name) then
move fileToMove to alias "Volumes:server1:Advertising Department:2_IMAGES - HIGH RES FOR PRINT:1_4c IMAGES:AG-high res images:AG00 - AG03 - HI RES:"
else if AG04string contains (text 1 thru 4 of fileToMove_Name) then
move fileToMove to alias "Volumes:server1:Advertising Department:2_IMAGES - HIGH RES FOR PRINT:1_4c IMAGES:AG-high res images:AG04 - AG09 - HI RES:"
else if AGAstring contains (text 1 thru 3 of fileToMove_Name) then
move fileToMove to alias "Volumes:server1:Advertising Department:2_IMAGES - HIGH RES FOR PRINT:1_4c IMAGES:AG-high res images:AGA - AGZ - HI RES:"
else if AG_Astring contains (text 1 thru 4 of fileToMove_Name) then
move fileToMove to alias "Volumes:server1:Advertising Department:2_IMAGES - HIGH RES FOR PRINT:1_4c IMAGES:AG-high res images:AGA - AGZ - HI RES:"

--Moving BI files to 1_4c IMAGES Folders
else if BI0string contains (text 1 thru 3 of fileToMove_Name) then
move fileToMove to alias "Volumes:server1:Advertising Department:2_IMAGES - HIGH RES FOR PRINT:1_4c IMAGES:BI-high res images:BI0 - BI5 - HI RES:"
else if BI6string contains (text 1 thru 3 of fileToMove_Name) then
move fileToMove to alias "Volumes:server1:Advertising Department:2_IMAGES - HIGH RES FOR PRINT:1_4c IMAGES:BI-high res images:BI6 - HI RES:"
else if BI7string contains (text 1 thru 3 of fileToMove_Name) then
move fileToMove to alias "Volumes:server1:Advertising Department:2_IMAGES - HIGH RES FOR PRINT:1_4c IMAGES:BI-high res images:BI7 - HI RES:"
else if BI8string contains (text 1 thru 3 of fileToMove_Name) then
move fileToMove to alias "Volumes:server1:Advertising Department:2_IMAGES - HIGH RES FOR PRINT:1_4c IMAGES:BI-high res images:BI8 - HI RES:"
else if BI9string contains (text 1 thru 3 of fileToMove_Name) then
move fileToMove to alias "Volumes:server1:Advertising Department:2_IMAGES - HIGH RES FOR PRINT:1_4c IMAGES:BI-high res images:BI9 - HI RES:"
else if BIAstring contains (text 1 thru 3 of fileToMove_Name) then
move fileToMove to alias "Volumes:server1:Advertising Department:2_IMAGES - HIGH RES FOR PRINT:1_4c IMAGES:BI-high res images:BIA - BIZ - HI RES:"
else if BI_Astring contains (text 1 thru 4 of fileToMove_Name) then
move fileToMove to alias "Volumes:server1:Advertising Department:2_IMAGES - HIGH RES FOR PRINT:1_4c IMAGES:BI-high res images:BIA - BIZ - HI RES:"

--Moving All Other Files to the "File Manually in 1_4c IMAGES" Folder inside the Processing Folder
else
move fileToMove to alias "Volumes:nas:Advertising Department:5_ADVERTISING DEPT - PREPRESS:1_ADV IMAGE PROCESSING:2_PROCESSING:Melissa Processing:Scripts:File Manually in 1_4c IMAGES:"
end if

--Moving Files to the "File Manually in 1_4c IMAGES" Folder inside the Processing Folder if there is an error
on error
move fileToMove to alias "Volumes:nas:Advertising Department:5_ADVERTISING DEPT - PREPRESS:1_ADV IMAGE PROCESSING:2_PROCESSING:Melissa Processing:Scripts:File Manually in 1_4c IMAGES:"
end try

end tell
end repeat
end open
40
Scripting in general / Re: Renaming and Filing Images
« Last post by Jean-Marie Schwartz on November 05, 2015, 03:29:12 AM »
Hi! At a glance, you seem to double set the name of the file to move:

Code: [Select]
                    set name of fileToMove to newName
                   
                    --RESETTING APPLESCRIPT'S TEXT ITEM DELIMITERS AND NAME
                    set AppleScript's text item delimiters to oldDelims
                    set name of fileToMove to fileToMove_Name

Wouldn't this be the culprit?
Pages: 1 2 3 [4] 5 6 7 8 ... 10