JS CS3 Change geometricBounds

Hi
When I run:
app.selection[0].geometricBounds = [0,0,10,10];
everything works as expected.
I only want to change the width so I tried:
app.selection[0].geometricBounds[3] += 10;
or
app.selection[0].geometricBounds[3] = app.selection[0].geometricBounds[3] + 10;
nothing changes and no error message appears.
I solved it in the following clumsy way eventually:
a = app.selection[0].geometricBounds[0];
b = app.selection[0].geometricBounds[1];
c = app.selection[0].geometricBounds[2];
d = app.selection[0].geometricBounds[3] + 10;
app.selection[0].geometricBounds = [a,b,c,d];
So it finally kind of works but it leaves me scratching my head. Is this really the way to do it?
Thanks for clarification
weller

I would do it this way:
myBounds = app.selection[0].geometricBounds;
myBounds[3] = myBounds[3] + 10;
app.selection[0].geometricBounds = myBounds;
The point is that because the property is an array, you must set it with an array -- if you try to manipulate a member of the array, what happens is that ExtendScript creates a temporary version of the array, manipulates that and it is left hanging out there with no effect.
Dave

Similar Messages

  • Indesign CS3 - Changing file from all black to a pantone color

    Is there an easy way to change an all black file to a specific pantone color in Indesign CS3? I've ran into this plenty of times after setting up an all black job and then the customer decides they want to see on the laser printer what it would look like in a specific pantone color. I've always had to go into each photo and text block separately to do this.

    One way is to build jobs like this using a custom black ink defined as CMYK 0,0,0,100 and then all you should have to do for all elements created in IND is delete the black spot and substitute with your new spot.
    Check with your printer, but in general they'll almost certainly prefer a black file to a "spot" file. So if this is just one page you can always kick out a quick PDF, rasterize in PS and place into IND, painted as the new spot. I've never been burned with this workflow, but understand that the client signs off on a proof that is a couple steps away from the file that will go to press.
    I'm sure you can also export to PDF and use Acrobat's convert color utility to get what you want, but I wouldn't know how to go about it. [ed] And fiddled, and still couldn't figure it out.
    J

  • [JS][CS3] Change the content type of a text frame

    Hi,
    a bit basic maybe but I'm stuck on this from an hour...
    I need a textFrame to become a graphic object.
    The textFrame has no content.
    How can I change the contentType on that object?
    Thanks anticipately.

    This looked like an interesting challenge, so I'm taking a shot at it. I created a new document and added three text frames (unpopulated) to the first page. I tagged them "Image", "Caption" and "credit". I then exported as a snippet, deleted the document and opened another new one. Then I placed the snippet (so far, everything has been manual -- no scripts) and indeed, the snippet placed and the frames were added to the document's structure and were properly tagged -- the three tags were automatically created by the action of placing the snippet.
    So, let's duplicate this in a script. Even though I know exactly where the snippet is, I'm going ask the user to find it. That way, I eliminate the issue of getting the path to the snippet wrong:
    var myDoc = app.documents.add();
    var myPage = myDoc.pages[0];
    var myPlacePoint = [myPage.marginPreferences.left, myPage.marginPreferences.top];
    var mySnippetFile = File.openDialog("Choose the snippet");
    if (mySnippetFile == null) { exit() }
    var mySnippet = myPage.place(mySnippetFile, myPlacePoint);
    And that worked. The snippet is on the page exactly where I wanted it. So, now we need to find the text frame that has the "image" tag. First, we must explore just what mySnippet consists of.
    OK, it's an array of three stories. That's a tad weird. Why isn't it an array of three text frames? I wonder what would happen if two of the frames in the snippet were threaded -- but let's address that later after we solve the immediate issue. The point is that we know that the snippet consists of three separate text frames that aren't threaded. So:
    for (var j = mySnippet.length - 1; j >= 0; j--) {
         var myTag = mySnippet[j].associatedXMLElement.markupTag.name;
         alert(myTag);
    And this gives me the three tags (and reminds us that when you tag a text frame you're also tagging the story that holds it. So:
    var myDoc = app.documents.add();
    var myPage = myDoc.pages[0];
    var myPlacePoint = [myPage.marginPreferences.left, myPage.marginPreferences.top];
    var mySnippetFile = File.openDialog("Choose the snippet");
    if (mySnippetFile == null) { exit() }
    var mySnippet = myPage.place(mySnippetFile, myPlacePoint);
    for (var j = mySnippet.length - 1; j >= 0; j--) {
         var myTag = mySnippet[j].associatedXMLElement.markupTag.name;
         if (myTag === "Image") {
              var myFrame = mySnippet[j].textContainers[0];
              myFrame.contentType = ContentType.graphicType;
              break;
    And that does the job.
    Thomas,
    You were very close but you forgot that the text frames that make up a story are addressed as textContainers from CS3 onwards. Your code would have worked in CS2.
    Dave

  • [JS CS3] Modify geometricBounds of Inline Frames in Overset Text

    Hello,
    I have the following setting:
    I recieve a XML file , which contains <image href="..."> tags. InDesign automatically inserts the correct images as an inline frame.
    The layout column are too small for the large images, so when placing the XML into the layout, the whole content is in the overset.
    Inline frames in the overset do not have any geometricBounds. Can I modify width & height of frames in overset text? And how do I do that?
    Thanks
    Tobias

    Thanks Robin!
    I helped myself with the following:
    with(myElement){
         // get img objects
         var theImage = myElement.xmlContent;
         var theImageFrame = theImage.parent;
         theImageFrame.appliedObjectStyle = myDocument.objectStyles.item("Img_free");
    The objectStyle "Img_free" sets the image frame from "inline" to "anchored frame". So the size of the image doesn't matter any more because its outside ("free") of the text. So everything flows into visibility and I can change whatever I want. (Yes, I must not do this with a object style, but it felt right to do so.)
    It's basically a similar way to your description. But I had hoped that there would be a somewhat "cleaner" way to do that. In my eyes it is more a workaround ...
    Any further suggestions?
    (How do people scripting InDesign Server do such things?)
    Thanks
    Tobias

  • CS3 - Change magnification of Source/Program windows?

    I'm working in Premiere Pro CS3 and I've successfully imported some video.  I can change the size of the windows themselves (50%, fit, etc).  However, the image itself inside the windows continues to display at 100%.  This means that at the "fit" windowsize, I'm seeing the top left corner of the image only.
    When I stop the video playback and click on the video itself, I see a set of scale controls over the image, which looks perfectly scaled to the window size.  But as soon as I engage playback, the video blows up to 100% size inside a small window, leaving me without a clear look at my full footage.
    I'm a Photoshop person and I'm looking for the equivalent of the Zoom tool to get a larger or smaller view of the full video.  Is there a way to change this, or is my only option to open out the panels as large as possible to see the whole picture?
    Thanks, I hope this makes sense.

    MandyRose,
    With a Project Preset of Desktop (Custom) set to 640 x 480 PAR = 1.0 (Square Pixels) and matching source footage, which the info in Project Panel verifies, this should not be happening. Going back to your Project Preset, can you check one more time that you have chosen Desktop, with the above specs. ? What you show is what one would get with a mismatch between the Project Preset and the source footage. That's why I'm bothering you with that one bit. I've thought that I had chosen properly, experienced similar, only to find that I had clicked one selection above, or below, or forgot to change my Frame Size in the dialog screen. In the Toolbar, you can go to Project>Project Settings and display the General settings chosen for the Project.
    if I set my view to something larger than my screen can display (for example, 75% or 100%) it stretches and distorts the image within the size of the panel.
    That other magnifications show only a portion of the source footage's Frame Size is correct. Depending on the size of the Program Monitor, one would have to scroll around higher magnifications, when they are chosen, instead of Fit. That it "stretches and distorts" is not.
    I realize this just might be a limitation of Premiere that it always displays this way, but it just seems as though it should show me the full clip (reduced to fit the window) while I'm working with it.
    PrPro's Program Monitor is an emulation, albeit a pretty good one. This is not normal behavior. That is why I'm looking for one setting that is not correct.
    In the Timeline, Rt-click on the Clip, and check whether Scale to Frame is checked. If so, what happens if you uncheck it?
    One other place to check would be the Effects Control Panel and twirl-down Motion, looking at Scale, to make sure that nothing has been applies there. Scale should be set to 100%.
    That is all that I can think of at this moment. I'm sure that I am missing other places to check. If I can come up with any, I'll post them back with more questions.
    Good luck,
    Hunt

  • [AS, CS3] Change Values in [No Paragraph Style]

    Is it possible to change the value of [No Paragraph Style]? I tried this (it's a german version; composer is singe line composer, language is english: GB):
    tell application "Adobe InDesign CS3"
    tell active document
    set myInfo to {object reference, name} of paragraph style 1
    set myPara to item 1 of myInfo
    set ligatures of myPara to false
    set composer of myPara to "Adobe Ein-Zeilen-Setzer"
    set hyphen weight of myPara to 0
    set applied language of myPara to language "Englisch: Großbritannien"
    end tell
    end tell
    Thanks
    Tobias

    This is an "at your own risk" solution: export a .inx version of a document and edit the definition of No Paragraph Style in it. That will change it for that document and any derivative documents you make from it, but you can't change the application default.
    Dave

  • CS3, Change Opacity of a Selection

    I know how to change the opacity of a layer (CS3).
    Can I change the opacity of a selection, and how?........Izzy

    Silk!  I don't know if what I did is exactly what you described but it was close (at least as I understood (or thought I understood) it).
    Did 2 layer via copies of the whole image.
    Made layer 1 active.
    Hid background layer and layer 2.
    Cloned out that part of the image I was trying to change (it was still there on the two inactive\invisible layers).
    Made background layer visible and collapsed layer 1 into it.
    Made layer 2 active and visible.
    Adjusted opacity.
    Flattened image.
    Voila!  Had the effect I was looking for.
    Thanks all for the help and getting me pointed in the right direction.......Izzy

  • [JS IDCS5] changing geometricBounds

    When I change the geometricBounds of a frame (myFrame.geometricBounds = [0, 0, 100, 100]), the graphic within that frame is moving. I want to change these bounds, but the graphic inside has to stay at his position (x = 0, y = 0).
    Regards, Sjoerd

    Solution:
    save the geometricBounds of the frame
    resize Frame
    declare values of the saved geometricBounds
    move the inline graphic backwards with the declared values
    Example:
    var myBounds = mySelection[i].geometricBounds;
    mySelection[i].geometricBounds = ["0mm", "0mm", "130mm", "130mm"];
    var myX = myBounds[0];
    var myY = myBounds[1];
    mySelection[i].graphics[0].move(undefined, [-myY, -myX]);
    Sjoerd

  • Version Cue CS3 Change Default Local File Location

    Hi All
    I've done a bit of searching around and can't find an answer to this.
    We have a bit of a Hybrid network which involves roaming profiles / TS profiles and all manner of stuff I have not yet found.  The upshot of this is that profile size affects all manner of things.
    Vesion Cue CS3 places local files into your user folders (and thereore your profile) by default.
    Is there a way to change the default location of these files?  I dont need them on a network share, the local disc is fine but just not in 'my documents'.
    I am aware I can do it on a project by project basis, but as I deal in hundreds of projects this is impractical.  That is to say I need to have the local files end up in the right place when I first sync.
    Thanks Very Much for your help
    Colin

    I'm sorry Curt,
    I don't understand your point.
    CS3 does, in fact have Version Cue, and does put files in certain places.  So I don't follow what you are getting at.

  • AE CS3: change the size of a formlayer

    hi together,
    at first please excuse my bad english.
    i have a formlayer like a chart with rounded corners and a border. now i will chage the size of the formlayer during a animation.
    when i do this with the property "size", it will always resize the formlayer at the middle of it. but i want, that it will "grow" to the top. the bottomborder should stay at his line. when i change the anchorpoint of the formlayer, it dos not bring me the desired result.
    i hope, that i could explain correct and understandable my problem.
    has anyone a idea what i can do?
    thank you!!!
    andi

    CSS -
    input { width:2140px; height:1402px; }
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "satrop" <[email protected]> wrote in message
    news:fafrup$5he$[email protected]..
    > Anyone know how I can change the size of a text input
    box in Dreamweaver
    > CS3?

  • Photoshop CS3 Changes Image Resolution

    Hello!
    Recently, Photoshop CS3 (installed on PC with Windows XP) has been changing the resolution of my images.  I'll create an image and save it (as anything... jpg or png). When I close and reopen the image, its values have changes.  For example:  a 10 x 5" images at a resoltion of 300 will somehow change to 100 x 50 at a low resolution of something like 6.  I'd like to know what causes this.

    Chris, if what you claim were true, then I wouldn't have an issue.  In fact, what I described in my initial post happens.
    I create a new image (we all follow the same process [Fle > New... select width, height, inches or pixels, resolution]) at a resolution of 300 for a 10x5” image.  Regardless of what I save the image as (jpg, png, etc.), if I close and reopen the image, the values have changed  The width always goes to 100" (I work in inches) and the resolution drops to 6, at the lowest that I’ve seen, up to 49.  Could a virus cause this? 

  • Incopy cs3 changes won't update to indesign cs3

    Just the second time using incopy and indesign.  First time, worked like a dream.  Now the overall configuration is still the same but we have probs.
    Changes made in indesign cs3 WILL update to incopy cs3
    Any changes made to text in incopy cs3 do not update to Indesign.
    I have checked folders permissions since incopy is on a pc and ind on a mac.  Seems right from the mac side.
    I am worried that I first saved the indesign document in a non shared folder, then realized my mistake and saved it in a shared folder.  Could this be the problem?
    I made assignments by exporting text and graphics.
    We're on deadline and I'm going crazy.
    Thanks for any help
    Jae

    It comes with an Creative Cloud Membership.  You can find details on how to install InDesign CC 2014 at Install and update apps - https://helpx.adobe.com/creative-cloud/help/install-apps.html.
    If you are not seeing the option to install InDesign CC 2014 then please utilize the solutions listed in CC desktop lists applications as "Up to Date" when not installed - http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html.

  • [JS][CS3] Change "Start Peg Numbering at:""

    Hello,
    I have a big problem on many InDesign Books with approx. 158 files each. In fact I have cut the InDesign files of approx. 400 pages in 158 files with 2 or 4 pages each but when I cut my reference document it was configured with "Start Page Numbering at:" set to "1."
    Now I have 158 files with this option ("Start Page Numbering at:" set to "1."), my question it is possible by a script to change all the files of the book with the "Automatic Page Numbering" option selected, as is "Continue from Previous Document in the Book."
    With a such script I will win a lot of time on this operation and I'm not motivated to do this file by file.
    Thanks

    Here you are. Works on CS.
    if (app.books.length != 1)
      alert ("Slow Reader Alert!\nI can only work on one book at a time.");
      exit(0);
    for (doc=0; doc<app.books[0].bookContents.length; doc++)
      a_document = app.open (app.books[0].bookContents[doc].fullName);
      a_document.sections[0].continueNumbering = true;
      a_document.close(SaveOptions.YES);
    It's really straightforward. Line by line:
    You can have zero, or more than one book open. For simplicity, this script works on one and only one opened book.
    Eh. Group brace.
    Well. Speaks for itself.
    All done, bye bye.
    .. another group brace. This is going slower than I thought.
    Ah! A book contains an array objects of type "BookContent", which holds file name, creation date, and status (i.e., if the document needs updating). Its length is equal to the number of documents in the book, one per file.
    .. group brace ..
    (snore) oh, sorry. "Open this document". Yep.
    All documents have at least one section; the first is hardcoded to start at the first page. Since this is Javascript, it's section #0. The 'continueNumbering' is just a boolean value, yes or no: "If true, continues page numbers sequentially from the previous section."
    Close, save when necessary. This just means that if the document was not changed (because the numbering was allright), it won't be saved, just as in the user interface.
    Finally, the final closing brace.
    That's it.
    Really.
    (I could go on all day, y'know...)

  • JS: CS3-Change text on master pages

    Hello all,
    I am new to JS and I really need help. I have spent hours researching, but without much success. I have written code in VB before but I am totally new to JS so please be patient with me. Here is what I want to do.
    I publish a monthly trade magazine. Every month when it is time to create the next issue, I open the one that was just completed and do a Save As for the next month. I then go in and delete all the articles and just move around the ads. I have about 20 master pages (left and right combined) and I have to go in and do a find/replace to change the issue date on the top. I don't want to do a Replace All in case it is somewhere else in the document.
    For example, I am about to create the April, 2008 issue. The document will be named 2008-04.indd. I will go to the master pages and find 'March, 2008' and replace it with 'April, 2008'. I am thinking I should use Script Labels and name each text frame on each Master Page so I only change those instances.
    Any thoughts, suggestions, ideas...? Any help would be appreciated. Just remember to talk to me like you are dealing with a 5 year old. Scripting with JS in ID is totally new to me.
    TIA,
    Nancy

    You don't need a script. All you need is a couple of text variables, one with the month, the other with the year. Each month you just change the value of these two variables.
    Peter

  • [JS, CS3] Change text color and export pdfs

    Hi there,
    I am new to scripting and I am trying to find out if a script exists that will export a PDF, then change all text of a certain color to black, then export another pdf with the same settings as the first, but appending the filename. I've searched the forum and understand about the change color bug, but I haven't seen anything in JavaScript -- It's all been applescript.
    Anyone have any brilliant ideas?
    Help is GREATLY appreciated!
    -Molly

    I couldn't get the specific color replacement, I chose the rambo approach...<br /><br />if(app.documents.length!=0)<br />{<br />     var doc = app.activeDocument;<br />     if(doc.saved==true)<br />     {<br />          var docFile = doc.fullName;<br />          var docFile = doc.fullName;<br />          var myFile = File(docFile).fsName;<br />          var myPdfPreset = app.pdfExportPresets.item("[PDF/X-1a:2001]"); //Put what you want <br />          var myPdfFile = new File(String(myFile).split(".indd")[0]+".pdf");<br />          exportPDF(myPdfFile,myPdfPreset);<br />          var myTfs = doc.textFrames.everyItem().getElements();<br />          for(i=0; i<myTfs.length; i++)<br />          {<br />               //will reset all texts to black, quite drastic but works.<br />               myTfs[i].texts[0].fillColor = doc.swatches[2]; <br />               //Should be better to use swatches.item("[Black]"); <br />               //But can't check on my french system<br />          }<br />          var myPdfFile = new File(String(myFile).split(".indd")[0]+"_AllTextsToBlack.pdf");<br />          exportPDF(myPdfFile,myPdfPreset);<br />     }<br />     else<br />     {<br />          alert("Please save your document first");<br />     }     <br />}<br />else<br />{<br />     alert("You need to open a doument first !");exportF<br />}<br /><br />function exportPDF(myPdfFile,myPdfPreset)<br />{<br />     doc.exportFile (ExportFormat.PDF_TYPE, myPdfFile, false, myPdfPreset, undefined, undefined, false);<br />}

Maybe you are looking for

  • How can we reset the session data in SAP ISA B2B application.

    com.sap.isa.isacore.action.IsaCoreInitAction$StartupParameter this action class providing the special feature to store all data passed to it in the request as parameters into the session context and make them available for all other actions. 1. But i

  • I'm using iPhone 4 with ios7.1. How do I get list view in calendar? I'm not seeing the icon

    Can a anyone help me here? Thanks!

  • Mac mini will not restart

    My friend has a mac Mini, i think it was the last one with an optical drive. Anyway, he keeps getting mesages to update his software from Software Update, an when I checked it out sure enough there are over a gigbyte of updates 12 in all waiting to b

  • Suggest an external optical drive?

    My iMac's (21.5 inch) optical drive is just about useless, especially when it comes to transferring files from discs onto my computer, taking as long as 30 minutes for 4gb of information. My girlfriend's iMac (24 inch) optical drive is completely bro

  • Films or TV programs on the Touch

    I travel quite a bit and I was wondering if there is a LEGAL. Apple approved way of either transferring my own bought DVDs I have to the touch or placing recorded TV programs on it for me to view on the go? I live in the Netherlands which means I can