How do I scale square frames in CS5 using applescript?

I need help fixing a script which changes the scale of square frames after it duplicates them. The script worked fine in CS1 but not for CS5. I tried changing "resize" to "scale" but it doesn't compile correctly. Does anyone know how to change "resize mySelection01 horizontal scale 21.6 vertical scale 21.6" to work for CS5?
Thanks,
Hector
tell application "Adobe InDesign CS5.5"
    set myDocument to active document
    tell myDocument
        set startinglayer to "Image"
        tell page 2 of myDocument
            set mySelection01 to rectangle 1
            duplicate mySelection01
            resize mySelection01 horizontal scale 21.6 vertical scale 21.6
            move mySelection01 to page 28 of myDocument
            move mySelection01 to {15, 55}
            set properties of mySelection01 to {fill color:swatch "None" of myDocument, stroke color:swatch "Black" of myDocument, stroke type:stroke style "Solid" of myDocument, stroke weight:0.25}
        end tell
        tell page 4 of myDocument
            set mySelection02 to rectangle 1
            duplicate mySelection02
            resize mySelection02 horizontal scale 21.6 vertical scale 21.6
            move mySelection02 to page 28 of myDocument
            move mySelection02 to {116, 55}
            set properties of mySelection02 to {fill color:swatch "None" of myDocument, stroke color:swatch "Black" of myDocument, stroke type:stroke style "Solid" of myDocument, stroke weight:0.25}
        end tell
        tell page 6 of myDocument
            set mySelection03 to rectangle 1
            duplicate mySelection03
            resize mySelection03 horizontal scale 21.6 vertical scale 21.6
            move mySelection03 to page 28 of myDocument
            move mySelection03 to {218, 55}
            set properties of mySelection03 to {fill color:swatch "None" of myDocument, stroke color:swatch "Black" of myDocument, stroke type:stroke style "Solid" of myDocument, stroke weight:0.25}
        end tell
        tell page 8 of myDocument
            set mySelection04 to rectangle 1
            duplicate mySelection04
            resize mySelection04 horizontal scale 21.6 vertical scale 21.6
            move mySelection04 to page 28 of myDocument
            move mySelection04 to {319, 55}
            set properties of mySelection04 to {fill color:swatch "None" of myDocument, stroke color:swatch "Black" of myDocument, stroke type:stroke style "Solid" of myDocument, stroke weight:0.25}
        end tell
        tell page 10 of myDocument
            set mySelection05 to rectangle 1
            duplicate mySelection05
            resize mySelection05 horizontal scale 21.6 vertical scale 21.6
            move mySelection05 to page 28 of myDocument
            move mySelection05 to {15, 157}
            set properties of mySelection05 to {fill color:swatch "None" of myDocument, stroke color:swatch "Black" of myDocument, stroke type:stroke style "Solid" of myDocument, stroke weight:0.25}
        end tell
        tell page 12 of myDocument
            set mySelection06 to rectangle 1
            duplicate mySelection06
            resize mySelection06 horizontal scale 21.6 vertical scale 21.6
            move mySelection06 to page 28 of myDocument
            move mySelection06 to {116, 157}
            set properties of mySelection06 to {fill color:swatch "None" of myDocument, stroke color:swatch "Black" of myDocument, stroke type:stroke style "Solid" of myDocument, stroke weight:0.25}
        end tell
        tell page 14 of myDocument
            set mySelection07 to rectangle 1
            duplicate mySelection07
            resize mySelection07 horizontal scale 21.6 vertical scale 21.6
            move mySelection07 to page 28 of myDocument
            move mySelection07 to {218, 157}
            set properties of mySelection07 to {fill color:swatch "None" of myDocument, stroke color:swatch "Black" of myDocument, stroke type:stroke style "Solid" of myDocument, stroke weight:0.25}
        end tell
        tell page 16 of myDocument
            set mySelection08 to rectangle 1
            duplicate mySelection08
            resize mySelection08 horizontal scale 21.6 vertical scale 21.6
            move mySelection08 to page 28 of myDocument
            move mySelection08 to {319, 157}
            set properties of mySelection08 to {fill color:swatch "None" of myDocument, stroke color:swatch "Black" of myDocument, stroke type:stroke style "Solid" of myDocument, stroke weight:0.25}
        end tell
        tell page 18 of myDocument
            set mySelection09 to rectangle 1
            duplicate mySelection09
            resize mySelection09 horizontal scale 21.6 vertical scale 21.6
            move mySelection09 to page 28 of myDocument
            move mySelection09 to {15, 258}
            set properties of mySelection09 to {fill color:swatch "None" of myDocument, stroke color:swatch "Black" of myDocument, stroke type:stroke style "Solid" of myDocument, stroke weight:0.25}
        end tell
        tell page 20 of myDocument
            set mySelection10 to rectangle 1
            duplicate mySelection10
            resize mySelection10 horizontal scale 21.6 vertical scale 21.6
            move mySelection10 to page 28 of myDocument
            move mySelection10 to {116, 258}
            set properties of mySelection10 to {fill color:swatch "None" of myDocument, stroke color:swatch "Black" of myDocument, stroke type:stroke style "Solid" of myDocument, stroke weight:0.25}
        end tell
        tell page 22 of myDocument
            set mySelection11 to rectangle 1
            duplicate mySelection11
            resize mySelection11 horizontal scale 21.6 vertical scale 21.6
            move mySelection11 to page 28 of myDocument
            move mySelection11 to {218, 258}
            set properties of mySelection11 to {fill color:swatch "None" of myDocument, stroke color:swatch "Black" of myDocument, stroke type:stroke style "Solid" of myDocument, stroke weight:0.25}
        end tell
        tell page 24 of myDocument
            set mySelection12 to rectangle 1
            duplicate mySelection12
            resize mySelection12 horizontal scale 21.6 vertical scale 21.6
            move mySelection12 to page 28 of myDocument
            move mySelection12 to {319, 258}
            set properties of mySelection12 to {fill color:swatch "None" of myDocument, stroke color:swatch "Black" of myDocument, stroke type:stroke style "Solid" of myDocument, stroke weight:0.25}
        end tell
    end tell
end tell

Hector, I would have gone the route of transforming the rectangle myself… but matrix is a little tricky to get the lingo right… Only done it in ExtendScript before now… Any how this should give you the general idea of the loop… Your X&Y values are not equidistant so I went for a list instead…
tell application "Adobe InDesign CS5"
          tell the active document
                    set dupPage to page 28
  -- Loop the 12 items
                    repeat with i from 1 to 12
  -- A list of 12 X&Y pair lists
                              set posBox to {{15, 55}, {116, 55}, {218, 55}, {319, 55}, ¬
                                        {15, 157}, {116, 157}, {218, 157}, {319, 157}, ¬
                                        {15, 258}, {116, 258}, {218, 258}, {319, 258}}
  -- Double the value of i for the page ref
                              tell page (i * 2)
                                        set dupeBox to duplicate rectangle 1
  -- Transform the matrix here
                                        -- or use your property value change…
  move dupeBox to dupPage
  move dupeBox to item i of posBox
                                        set fill color of dupeBox to "None"
                                        set stroke color of dupeBox to "Black"
                                        set stroke type of dupeBox to "Solid"
                                        set stroke weight of dupeBox to 0.25
                              end tell
                    end repeat
          end tell
end tell

Similar Messages

  • How to access the Text Frame, when we use scrollable frame,

    Hi Friends,
    How to access the Text Frame, when we use scrollable frame,
    Thank you,
    [ Nav ]

    That's the same question:
    how can I access something (a page item) on a page…
    Answer: you need something unique in that object you can get a handle on.
    Or you use the selection a user of your script is doing and work with that selection…
    A "scrollable frame" is nothing special. What it makes it a "scrollable frame" is the DPS software.
    So you have to look for attached labels on the object, that identify the object for the PDS plug-in "Overlay Creator" as a "scrollable frame". That's possible with the "extractLabel("KeyString")" function. But you need to know the appropriate key-string in advance.
    In another of your thread in the DPS forum, I basically answered the question how to obtain those key-strings.
    When knowing the key-string you could loop through all your page items (you can skip all text frames) in the allPageItems-collection, to identify the "scrollable frame" by extracting the right label.
    If you have more than one "scollable frames" you need a second unique identifier for the particular object.
    That could be nearly any property.
    Keep in mind, there is no "scrollableFrames" collection in the DOM !
    Uwe

  • How to apply "scale to frame size" to a bunch of stills in CS4 and most likely all PP pro.

    Hello, I was looking for an answer to this procedure after trying to use the "paste attribute" function; that is ticking this option on one picture, and pasting (as attribute) it to the rest of the stills. As this did not work I finally found a Youtube video showing how simple (and embarrassing) it was. -  Just highlight all your stills on the timeline and right click anywhere on the selected area. Then click on the "scale to frame size" to put a tick against it. NB In my case though a few things happened when I tried, and one I remember was that my selection had already a still with the tick against the "resize..." (as I tried and erred various other ways) so it would not work, I guess because the program already could see the tick although it's only on one still. Most likely if I hadn't learned the "paste attribute" method I would have chosen this but here you are as an erratic user I opted for the less obvious possible method!  I hope this entry will help people who want a quick answer  to this situation. I'm a little surprised though as I thought I read somewhere that PP as "scale to frame size" as a default!

    Yes that's right Bill, I think that's what the video did show and that I tried to share in "my discussion" But Ann explained to me how to turn it on as a default from Preference which is a smarter way to go about it, providing it's done before importing the pictures in the project window. Else, yes that the way to do it!
    Actually it would be nice to be able to choose the size of the frame so to fit it directly into the safe area which ever is chosen, it would cut a couple of steps when animating the still, avoiding scaling into the safe area (I'm a dreamer!)

  • How to create plugin in Adobe InDesign -CS5 using java?

    Hi,
    1.I want to create  new plugin in adobe in design CS5 using java .is it possible using java???Is any one know about  this please help me on this..

    Short answer: No, it isn't possible. The only available option is C++ development in most cases.
    Longer answer: It is possible to develop solutions with Java, depending on circumstances. The only available and truly sensible option is through InDesign Server which exposes InDesigns' scripting API to Java. Keep in mind that it us unavailable for desktop version of the product, and also, that it won't be a plugin, only scripting solutions. This means that you are given access to rather high-level API, and many details are removed. This may or may not be acceptable, depending on what exactly you want to achieve. Sometimes it is possible to avoid integration with Java at all.

  • Moving a layer in Photoshop CS5 using Applescript

    I have a layer in a document called "logo" and i want to duplicate it to every open document and then move it to a specific spot in each document
    I got the duplicating thing happening but cant seem to move the bounds of the layer (says it is read only and cannot be changed)
    here is what I have written
    tell application "Adobe Photoshop CS5"
    activate
    set theDocs to count of documents
    repeat with i from 1 to theDocs
    duplicate art layer "logo" of current document to document i
    end repeat
    repeat with i from 1 to theDocs
    set current document to document i
    tell document i
    set bounds of art layer "logo" to {0.456666666667, 6.38, 2.88, 6.77}
    --Adobe Photoshop CS5 got an error: Property is read/only and cannot be changed
    end tell
    end repeat
    end tell
    This doesn't error but also doesn't move the logo at all
    tell application "Adobe Photoshop CS5"
    activate
    set theDocs to count of documents
    repeat with i from 1 to theDocs
    duplicate art layer "logo" of current document to document i
    end repeat
    repeat with i from 1 to theDocs
    set current document to document i
    tell document i
    set properties of art layer "logo" to {bounds:{0.456666666667, 6.38, 2.88, 6.77}}
    end tell
    end repeat
    end tell
    anyone know what the language is to move the layer around?

    In any language the way to move a layer x,y is to use translate… You will need to do the math from current x,y to required x,y given a distance… A read only property is just that regardless of language… Here is a quick example of how I did this kind of thing using Applescript… I still do the same method now but use the ESTK instead…
    tell application "Adobe Photoshop CS2"
    activate
    -- Store the app settings
    set User_Rulers to ruler units of settings
    set User_Dialogs to display dialogs
    set ruler units of settings to pixel units
    set display dialogs to never
    set Doc_Ref to the current document
    tell Doc_Ref
    -- Store the image res so we can put it back
    set Original_Res to resolution
    -- Change to work at 72 dpi
    resize image resolution 72 resample method none
    -- Move horizontal 1 inch
    translate layer 1 delta x 72 as pixels
    -- Move vertical 1 inch
    translate layer 1 delta y 72 as pixels
    -- Read the bounds propety
    set Layer_Bounds to bounds of layer 1
    log Layer_Bounds
    -- Move the layer using bounds to top/left
    translate layer 1 delta x -(item 1 of Layer_Bounds) as pixels
    translate layer 1 delta y -(item 2 of Layer_Bounds) as pixels
    -- Put back the image res
    resize image resolution Original_Res resample method none
    end tell
    -- Put back the app settings
    set ruler units of settings to User_Rulers
    set display dialogs to User_Dialogs
    end tell
    You should get the general idea of how this works from this. It should move the first layer across 1 inch, down i inch then put it top/left. It assumes you have a layer that is not a background layer nor is it locked in any way…

  • How to fetch current system time in milliseconds using AppleScript?

    I need to write the actual systemtime hh:mm:ss.msc into a field of FileMaker by using AppleScript (as FileMaker does still not support TimeStamps down to milli seconds) - now, how to realize that?
    Any help is welcome - Thanx

    Hi Mathur,
    kindly help me in mapping a field in which I have to map current system time.
    I think there is no standard function for time like the date so do i write a UDF for the same or any other way an in case a UDF than please help in that.
    Mathur no need to write UDF for that..
    Use standard function Current date-------> In that (Target Format) u have to specify the time i.e: HHmmss
    Thats it..... Noe use this function as u like...
    Satya Kumar

  • How to Create PDF from Illustrator CS3 by using applescript?

    Hi Guys,
    Do some one knows how to create PDF from Illustrator CS3 by using apple script. If know, please give me the scripting.
    HARI

    Have you tried File>Scripts>SaveDocsAsPDF? There should be a folder of sample scripts installed in your AICS3 folder and a folder of documentation which contains an Illustrator AppleScript Reference which has examples.

  • How can I include the Frame Number  when using "Export Frame"?

    Im using the button at the bottom right of the Playback Control Panel called "Export Frame".  This does exactly what I need but I have a lot of frames that need single frame exporting. How can I get the file name to automaticly include the frame number at the end of the file name? 
    For example, instead of it displaying "Sequence 01.Still001"  by default.  I would like for it to display "Sequence 01_0001"   Letting me know that is frame 0001.
    This is possible, correct?

    Well what about in the export option using CTRL + M?  I saw a coworker using this method in an older version of Premiere, but we can't enable it on CS5.5.  Being able to export a single frame as a bmp that has the frame number at the end of the file name.
    Example:
    Output Name: Sequence 01_0001.bmp
    Under Video Basic Setting is:
    Export As Sequence UNCHECKED
    Field Type: Progressive
    Frame number still doesn't show at end of file name.  What are we missing?

  • How do I scale a lot of images using CSS in HTML5 and CSS3

    I have a CSS image gallery that displays a larger photo with descriptive text below it, when a thumbnail image is hovered on.
    Each photo has code like that following:
    <a class="thumbnail" >
    <img src="thumbs1/paradethumbs/DSC_0073.jpg" alt="thumbnail picture" />
    <span><img src="pics1/paradepics/DSC_0073.jpg" alt=" " /><br /> 19 - a black faced sheep.</span>
    </a>
    The first source is a thumbnail,  image stored at a size of 72 by 48.
    The second source is an image stored at 600 x 400.
    When the thunbnail is hovered on, the larger photo is displayed at its full size using css.
    There are 20 or so thumbnails in this gallery, and different numbers in other galleries that use the same code.
    The example above is number 19 from 20.
    This works fine on tablets and larger displays.
    When I wish to show it on an Iphone or similar, with a display that is 480 or less wide, I need to scale the larger photo down to 300 wide.
    As the Iphone will have a lower quality of image than a larger display, it will not matter too much if the 600x400 photo is scaled down, and having tried it by giving it an ID with CSS like
    #imagescale{ width:300px; } it looks acceptable. However, as IDs are supposed to be unique, then thats a no go area for the remaining photos.
    My problem is how do I select the second image source shown in bold above, and scale it and the span text by 50%.
    The text is not too important as it can be changed to fit - the image is the main problem.
    I need someting like "if the display is less than 600 and the image is in the pics directory, display it at 300 wide".
    The browser will hopefully  take care of the height.
    Any suggestiosn would be appreciated.
    Howard Walker

    Thanks Nancy. The general idea and the link to the article helped a lot.
    However, the css using using a percentage had unpredictable results when selecting repeated images.
    The first one scales to 50% and then the next scales to 50% of the last one (25%)  and so on ad infinitum, unless you click on another object that is not an image.
    Using a pixel size like 280px rather than a percentage did the trick, but it also involved changing lots of other items before I could get everything to fit.
    Now I have a better knowledge of media queries and how to set them up.
    Best of all, all my image galleries work fine just using css and html. Never thought that would happen.
    Take five stars!
    And the same to David Powers for his great article.
    Howard Walker

  • How to enable the script label of a text frames in indesign using applescript

    hi all,
    am using Indesign CS2 with applescript..
    Using script I have to open a template in indesign and flow the word document into it...
    I can able to flow the word document into the template using "Place" command..but script labels of the text frames gets disabled...
    I need the script labels to be enabled...
    can anybody help me
    thanks in advance

    Script labels can't be disabled, so I'm not sure what your problem is -- perhaps seeing some code could help. Could it be that you're referencing a page item by label, but it is not responding because the item is part of a group?
    Shane Stanley <[email protected]>
    AppleScript Pro Sessions <http://scriptingmatters.com/aspro>

  • How can i hide a folder from finder using "Applescript" ?

    hi
    i saw somewhere here and downloaded an applescript file which i was able to hide a folder in finder. so that i can reach them using Terminal but i could not see them in finder.
    help !
    thanks !!!
    happy new year !!!

    Use the following:
    tell application "System Events"
    set visible of (choose folder with invisibles) to false
    end tell
    The Script Editor is in the /Applications/AppleScript/ folder.
    (27742)

  • Update the Player Flash CS5 Uses (In Test Movie)

    So Flash CS5 came with a beta version of Flash Player 10.1.
    Now that the official release of Flash Player 10.1 is released, how do I update what Flash CS5 uses when I Test Movie?
    I have so far updated the Flash Player in my browser and my standalone players but I can't seem to figure out how to update the Player that Flash CS5 uses.
    This wouldn't be so bad if the beta of 10.1 wasn't breaking my project because of bugs.
    Any help appreciated.

    More bumps, there has to be a way to do this.  Adobe wouldn't cement in a beta verison of Flash Player into Flash CS5 would they?

  • "Scale to Frame Size" option - won't I lose quality?

    Hello,
    I have a sequence in 720p and I have most of the videos in 1080p. I want to scale all of them once, so I select them all, go to Clip->Video Options->Scale to Frame Size. But, the Scale Size shows all the time as a 100%, even after the clips are scaled down.
    Question 1: Won't I lose quality if I will zoom in (but go not further than 1080p)?
    Question 2: Also, I understand, that I cannot go further than 150%, right?
    Thank you.

    donkamiliani wrote:
    I do not want to scale (Using Motion->Scale) each clip separately. I want to do it for all clips
    Jeff has it technically right, but missed part of the question.
    I believe the remaining part of the question is "How do I set every 1080 frame to 67% so I can use that as a starting point? All at once."
    Answer: Set one clip to 67%. Copy that clip. Then, select all of the other clips and "Paste Attributes".  Now all of them will be set at 67% and if you decide to zoom in to 100% you will have no quality loss.
    Be sure to do that before you change any other attributes of that clip. If you have, don't worry. Just turn off that effect temporarily so you can copy just the motion effect

  • Scale to Frame Size not perfect

    I am working with DV and HDV.  I am scaling the HDV to frame size and it works pretty well, but there is a thin black verticle line on either side of the frame.  This vanishes when I go back to a DV clip, and reappears when I go back to a scaled HDV clip. 
    Any ideas on how I can remove these lines/expand the image?
    Many thanks,
    Doug

    In case it's not abundantly clear from the first three posts, PPro is behaving correctly. Scale to Frame Size adjusts the size of the source so that one dimension fits within the sequence's dimensions. In the process, it maintains the source's image aspect ratio. Therefore, if the image aspect ratio of the source does not precisely match that of the sequence, then space will be left along the sides or the top and bottom.
    As Ann pointed out, HDV is exactly 16:9, whereas widescreen DV is not. Hence, narrow pillarboxes.
    What you seem to be expecting, at least implicitly, is for PPro to not only scale the source but also stretch it to fill the frame completely.
    You have two options to eliminate the pillarboxing:
    Use the Scale effect with "Uniform Scale" option enabled, in which case you'll end up effectively cropping off the top and bottom.
    Disable Uniform Scale and then bump up the Scale Width, which stretches the image.

  • How do you extend the frame from one side but not the whole thing?

    I am updating my blog and want to put a rectangle picture into the pre-set frame. I need to stretch it horizontally but the entire frame (i.e., both sides and top/bottom) stretched instead. How do you extend the frame from one side but not the whole thing?

    In Inspector, select the Graphic Inspector. Choose, from the Fill options, Image Fill. Select the image from the dropdown and click Open. Now go back to Inspector and click on Scale to Fit. Choose from the options in the window. There are a number of them which should address your problem:
    With the Blog template, you will probably need to insert a text box over the stock placement frame and work with that instead.
    Mark

Maybe you are looking for

  • Bapi_Goodsmvt_Create: Material does not exist or is not activated....

    Hi all, I'm using .Net connector to execute BAPI from my program and I'm able to login but always get the same message when I try to execute the material transfer: <b>Material xxx does not exist or is not activated</b>. I'm not sure it has anything t

  • Print tile problem

    I have a one page pdf document I want to print enlarged on several pages. I'm running Acrobat Pro on a mac OS 10.6.7 with an epson workForce 840. I follow instructions (see below) and selected tiling options but the print out is reduced rather than e

  • Regarding ABAP Engine  (Web AS 6.40)

    Hi All              Can you please tell me wheather we have ABAP Engine ( WAS 6.30 or 6.40 Evoluation ) in the SDN.SAP.com.           Thanks In Advance Regards Saravanan

  • Powerbook hd dying?

    The past day, my powerbook hasn't been sleeping properly some of the time. Anyway, then it started just sitting at the starting up spinny so I went into verbose... it's just sitting here spitting out line after line of IOATABlockStorageDriver::sCompl

  • How do I get rid of the passcode screen on the ios7 update?

    How do I get rid of the passcode screen on my ios7 update on iPhone?