Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

InDesign CS3 resize images 100% script

New Here ,
Dec 06, 2007 Dec 06, 2007
I've been using this apple script (one of my favorites), probably written by Rob Day, that resamples all the images in a InDesign document to 100%. Once I started it it asks me what resolution I want (300dpi is pre-set) and where I want the resampled links to be saved. Then it goes through the document and opens up every image and sizes it down to the percentage it was placed, saves it to the folder I determined before and updates the image in InDesign, placing it 100%.

It always worked pretty good, but for some reason now I get an error message all the time. I switched from Indesign CS2 to CS3 which might be the problem.

Does anybody know how to fix the script for CS3?

Or is there anything similar already out there for CS3?

Any help is appreciated since I need to get this 550 page catalog done... THANK YOU.

here is the script:

myDisplayDialog()
on myDisplayDialog()
tell application "Adobe InDesign CS3"
activate
set myDialog to make dialog with properties {name:"Resample images"}
tell myDialog
tell (make dialog column)
--Dialog row containing integer editbox.
tell (make dialog row)
tell (make dialog column)
make static text with properties {static label:"dpi:"}
end tell
tell (make dialog column)
set myIntegerEditbox to make integer editbox with properties {edit value:300}
end tell
end tell
end tell
end tell
set myResult to show myDialog
if myResult is true then
--Get the values from the various editboxes.
set myInteger to edit value of myIntegerEditbox
destroy myDialog
set myProcessedLinks to {}
set myFolder to choose folder with prompt "Select a destination folder for resampled images"
tell application "Adobe InDesign CS3"

--If transformation preferences are not set to transformations are totals
--we have to set them for the script to work.
if transformations are totals of transform preferences is false then
set myOldTransPreferences to properties of transform preferences
set transformations are totals of transform preferences to true
set show content offset of transform preferences to true
set dimensions include stroke weight of transform preferences to true
set «class TrCt» of transform preferences to true
set myResetTransform to true
else
set myResetTransform to false
end if
set myDocument to active document
tell myDocument
--If the measurement units of the active document are not inches, set the
--measurement units to inches. Units MUST be inches in order to script work.
if horizontal measurement units of view preferences of myDocument is not points or ¬
vertical measurement units of view preferences of myDocument is not points then
set myOldViewPreferences to properties of view preferences of myDocument
set horizontal measurement units of view preferences of myDocument to points
set vertical measurement units of view preferences of myDocument to points
set myResetUnits to true
else
set myResetUnits to false
end if


set outdateLinks to every link whose status is link out of date
repeat with OODLinks from (count outdateLinks) to 1 by -1
update link of item OODLinks of outdateLinks
end repeat
set IDLinks to every link whose status is normal
--Iterate backwards through the links to avoid invalidating objects.
repeat with myCounter from (count IDLinks) to 1 by -1
set myLink to item myCounter of IDLinks

--Process only image links.
set myLinkedFile to file path of myLink as alias
set myLinkType to link type of myLink
tell application "Finder" to set fileCreator to file creator of (info for myLinkedFile)
--If statement expanded to isolate PS EPS from AI EPS.
if (myLinkType = "TIFF") or (myLinkType = "Photoshop") or ((myLinkType = "EPS")
TOPICS
Scripting
5.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 06, 2007 Dec 06, 2007
On 7/12/07 4:08 AM, "Petra Ives" <member@adobeforums.com> wrote:<br /><br />> but for some reason now I get an error message all the time<br /><br />What does the message say?<br /><br />-- <br />Shane Stanley <sstanley@myriad-com.com.au><br />AppleScript Pro Florida, Feb 2008 <a href=http://scriptingmatters.com/aspro>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 06, 2007 Dec 06, 2007
Did you try putting it in a folder named: "Version 4.0 Scripts" ?
(*exactly* -- case sensitive)

Harbs
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 06, 2007 Dec 06, 2007
It says:

Error Number: -1708
Error String: Adobe InDesign CS3 got an error: rextangle id 9086 of page id 8998 of spread id 8991 of Document "P&A_CAT08_Cover_Front_8.indd" doesn't understand the "even InESrxfm" message.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 06, 2007 Dec 06, 2007
Harbs, IT WORKED! that simple. thank you so much. you are a genius. that will save me tons of work.
Petra
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 12, 2007 Dec 12, 2007
Petra,
any chance you could post the whole script? i've been searching for something like this forever.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 28, 2007 Dec 28, 2007
LinkOptimizer also works, but you have to pay for it.

http://zevrix.com/linkoptimizer.html
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 13, 2007 Dec 13, 2007
Max,

I'm one of the author of the script, there were another version with croping feature but it wasn't reliable enough for me, I tweeked it with the help of lots of people so that's why I don't want to take credit for it. Someone else updated the script to work with PS CS3 and ID CS3 on macscripter where you'll see pretty much it's evolution. There is still some problem with it if you work on a server though. Feel free to email me and I'll send you the script if you can't find it at macscripter.

Jeff
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 14, 2007 Dec 14, 2007
Did you try putting it in a folder named: "Version 4.0 Scripts" ?

if youre like me and prefer to keep your scripts organized elsewhere, you can also modify your script with the lines shown below. script versioning has worked surprising well for me so far in carrying along my v3 scripts to v5.


set version of «class pScr» to 3.0
using terms from application "InDesign CS"

-- insert script here

end using terms from
set version of «class pScr» to 5.0
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 11, 2008 Apr 11, 2008
I have copied the above script and I am receiving the below error message. I would really appreciate if someone send the final working script since it is very usefull

Error 25
Error in line 2
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 12, 2008 Apr 12, 2008
I really don't know anythign about scripting but I remember that it is important to put the script in the following folder structure:
Scripts-Scripts Panel-Version 4.0 Scripts

I hope that will do it.




From: member@adobeforums.com
To: adobe.scripting.indesign@adobeforums.com
Subject: Re: InDesign CS3 resize images 100% script
Date: Fri, 11 Apr 2008 02:27:58 -0700

A new message was posted by Chadi SAROUFIM in



InDesign Scripting --

  InDesign CS3 resize images 100% script



I have copied the above script and I am receiving the below error message. I would really appreciate if someone send the final working script since it is very usefull

Error 25

Error in line 2





View/reply at InDesign CS3 resize images 100% script

Replies by email are OK.

Use the unsubscribe form to cancel your email subscription.




More immediate than e-mail? Get instant access with Windows Live Messenger.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 16, 2008 Apr 16, 2008
Could this be modified to work on only the selected image in the document?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 16, 2008 Apr 16, 2008
No, I think it only works for the entire document.


From: member@adobeforums.com
To: adobe.scripting.indesign@adobeforums.com
Subject: Re: InDesign CS3 resize images 100% script
Date: Wed, 16 Apr 2008 18:21:46 -0700

A new message was posted by gtomps in



InDesign Scripting --

  InDesign CS3 resize images 100% script



Could this be modified to work on only the selected image in the document?





View/reply at InDesign CS3 resize images 100% script

Replies by email are OK.

Use the unsubscribe form to cancel your email subscription.




Pack up or back upuse SkyDrive to transfer files or keep extra copies. Learn how.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 16, 2008 Apr 16, 2008
I have copied the script and pasted it into a txt file. Then I have put it in the scripts folder. I think that this is not the proper way to do it. Can you please explain to me step by step how to do it. Thank you.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 17, 2008 Apr 17, 2008
The script is in AppleScript. Open the Script Editor on a Mac, paste the script and save. If you are on a Windows machine it won't work.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 17, 2008 Apr 17, 2008
gstomp,

I've made a version that should work on selections based on an earlier version of the script and comparing the two, but I didn't test it. If there is some volonteers, email me and I'll send you the selection script. I didn't test it myself though, got enough on my plate as it is.

Jeff
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 18, 2008 May 18, 2008
I have tried to copy and past the code above into script editor and save it but I get an error.

syntax error
Expected , but found end of script.

Can someone help me resolve this. Better still, where can I download this script?

Chris
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 16, 2008 Sep 16, 2008
Chris, did you ever find this script? I get the same error in AS and I could really use this script.

Mike
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 16, 2008 Sep 16, 2008
Michael,

I have the full script, please email me and I'll send it to you.

Jeff
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 05, 2009 Mar 05, 2009
Any update on this? A script like this would ease one of my recurring production headaches. I've been using a script from here ( http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=1612518) but it's almost too good: it rotates images in Photoshop as well as re-sizing, and for various reasons, I'd prefer not to do that.
Any help much appreciated
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 05, 2009 Mar 05, 2009
LATEST
I almost finished writing such a script: still have to translate messages into English and make some amendments. I’m going to post it soon.

Kasyan
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines