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

verticalScale, horizontalScale and transformReferencePoint in InDesign Server JS

New Here ,
Nov 21, 2008 Nov 21, 2008
Hi,
If you scale items using verticalScale or horizontalScale, InDesign will anchor the object to whatever is set in the layoutWindow.transformReferencePoint. InDesign Server does not have layoutWindow. So..
1)Does InDesign Server always use middle/center as the reference point for horizontalScale/verticalScale? If not..
2)How can I control the transformReferencePoint in InDesign Server?

Thanks,
-Nissan
TOPICS
Scripting
3.6K
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
Explorer ,
Nov 21, 2008 Nov 21, 2008
Hi Nissan,

Use the resize or reframe method (depending on what you want to do), rather than setting the scaling properties of the page item. The resize method can take an anchor point enumeration to set the center of transformation. resize scales the content of the frame; reframe does not.

Thanks,

Ole
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 ,
Nov 24, 2008 Nov 24, 2008
Thanks for the reply Ole,
I should mention that I am using CS3/ES Toolkit 2.
I do not see a resize or reframe pageItem method in the Object model. Is that new for CS4?
Thanks,
-Nissan
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 ,
Nov 25, 2008 Nov 25, 2008
Bump...
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
Guest
Nov 25, 2008 Nov 25, 2008
Nissan, I'm not sure about 'resize' or 'reframe' as Ole was referring to, but you can use the transform techniques which are new methods and objects in CS3. Adobe has a guide to using them called 'Working With Transformations'. You can setup a scaling amount as a transformation matrix and then transform the matrix at the same time as specifying an anchor point.

Like you, I couldn't find any 'resize' or 'reframe' methods directly within the DOM, but I do know what you are trying to achieve can be done using the transform methods.
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
Participant ,
Nov 26, 2008 Nov 26, 2008
On Nov 26, 2008, at 8:00 AM, Simon Paterson wrote:

Nissan, I'm not sure about 'resize' or 'reframe' as Ole was referring to, but you can use the transform techniques which are new methods and objects in CS3. Adobe has a guide to using them called 'Working With Transformations'. You can setup a scaling amount as a transformation matrix and then transform the matrix at the same time as specifying an anchor point.

Like you, I couldn't find any 'resize' or 'reframe' methods directly within the DOM, but I do know what you are trying to achieve can be done using the transform methods.

I've come in on the middle of this and don't know what exactly you're talking about, but I've had a question about resizing and hope someone can advise me on it. It's this: The proxy points in PageMaker were of two sorts. Normally they would be little squares, and if you selected one and entered coordinates for a new position it would move the selected object, without resizing it, so that the point would be at that position. If you clicked on the point again, however, it changed to an arrow and if you then entered coordinates for it, it would move the point to that position without resizing the object. That's what I've wanted to do sometimes in InDesign, but to date I haven't been able to. I can always wind up achieving the desired result one way or another, but it's always clunkier and more time-consuming than being able to position the point precisely and immediately as I could with the arrow proxy point. So, does InDesign really not have this capability anymore? And if it has it, how do you get it?


Thanks,

Roy McCoy
UEA, Rotterdam

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
Participant ,
Nov 26, 2008 Nov 26, 2008
Roy,

No, InDesign doesn't not have that second feature of PageMaker's proxy.

Dave
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
Participant ,
Nov 26, 2008 Nov 26, 2008
> Dave Saunders wrote:

> No, InDesign doesn't not have that second feature of PageMaker's
> proxy.

And nothing similar is substituted for it? Maybe this is one of those
things like square brushes in Photoshop, that they thought nobody
would miss. But I sure miss it. I have to do arithmetic calculations
to get the same result... Or maybe not. I suppose I can redo my
PageMaker guide scripts, order the coordinate for the guide that I
would have entered in the control palette, and then drag-snap (new
verb!) to the guide. It still seems a regrettable loss, though.


Thanks,

Roy McCoy
Rotterdam, NL
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
Participant ,
Nov 26, 2008 Nov 26, 2008
I rather have the impression that you, Ole and I are the only three ex-PM users who actually missed that feature. I used to ask for it a couple of releases ago, but I've given up.

Dave
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
Explorer ,
Nov 26, 2008 Nov 26, 2008
Hi Roy, Dave,

Actually, that's the difference between the resize and reframe methods in scripting, which mirror the difference between the scale x/scale y and width/height fields in the Control panel. But I agree that the Proxy version was better.:-)

Thanks,

Ole
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
Participant ,
Nov 26, 2008 Nov 26, 2008
On Nov 27, 2008, at 2:08 AM, Olav Kvern wrote:

Hi Ole!

This reminds me. I think your scripting documentation and sample scripts are too difficult. 🙂

Likewise, I can't tell whether you're suggesting a workaround here or not. I've just got, you know, something hanging out with the right side at 38.768, and I want it at exactly 37.1, and I don't want to move the left side, and I can't drag the handle where I want it even if I want to, because it only goes to 36.934 or 37.226 argh, and I still don't have a way to simply put it at 37.1(00).

Failing that, maybe one of you wonderful guys will tell me how to correct this:

set find what of find text preferences to " -- "
set change to of change text preferences to thin space & "-" & thin space
change text document 1

O
It says it was expecting a string or nothing and I hate to disappoint it, but I found that "thin space" in the dictionary and had the audacity to think I could use it. Which I suppose I can, somewhere, only apparently not here.


Thanks,

Roy


Hi Roy, Dave,

Actually, that's the difference between the resize and reframe methods in scripting, which mirror the difference between the scale x/scale y and width/height fields in the Control panel. But I agree that the Proxy version was better.:-)

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 ,
Nov 26, 2008 Nov 26, 2008
On 27/11/08 1:33 PM, "Roy McCoy" <member@adobeforums.com> wrote:<br /><br />> set change to of change text preferences to thin space & "-" & thin space<br /><br />You can only use enumerations like thin space by themselves; when you try to<br />concatenate them as above, AppleScript does the concatenation and it knows<br />nothing of InDesign's thin space.<br /><br />The solution is to use what you'd use in the UI: ^< (I hope that survives<br />this system; a carat followed by an opening angled bracket).<br /><br /><br />-- <br />Shane Stanley <sstanley@myriad-com.com.au><br />AppleScript Pro Florida, April 2009 <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
Participant ,
Nov 26, 2008 Nov 26, 2008
On Nov 27, 2008, at 3:48 AM, Shane Stanley wrote:

> The solution is to use what you'd use in the UI: ^< (I hope that
> survives this system; a carat followed by an opening angled bracket).

It does but I can't get it to work. That's why I went looking in the
dictionary to find something that did. I'm trying it again now but
it's still isn't working. I suppose it's an escape-character thing.


Thanks,

Roy
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
Participant ,
Nov 26, 2008 Nov 26, 2008
I'm okay now. I wasn't originally trying

set find what of find text preferences to " -- "
set change to of change text preferences to thin space & "-" & thin
space
change text document 1

but rather

set find what of find grep preferences to " --? "
set change to of change grep preferences to "^<-^<"
change grep document 1

So what I now have works:

set find what of find text preferences to " - "
set change to of change text preferences to "^<-^<"
change text document 1
set find what of find text preferences to " -- "
set change to of change text preferences to "^<-^<"
change text document 1

Only I don't know how to change to a thin space or similar special
character with grep. Do I vaguely remember seeing a table with text
and grep search strings side by side? I know I made one for myself,
but it isn't complete (doesn't have thin space or such in grep, for
example) and may not be totally correct on what it does have.


Thanks,

Roy
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 ,
Nov 26, 2008 Nov 26, 2008
On 27/11/08 1:55 PM, "Roy McCoy" <member@adobeforums.com> wrote:<br /><br />> I suppose it's an escape-character thing.<br /><br />Nope -- it works fine here:<br /><br />tell application "Adobe InDesign CS3"<br /> make document<br /> set theFrame to make text frame at document 1<br /> set contents of parent story of theFrame to "this -- that"<br /> set find what of find text preferences to " -- "<br /> set change to of change text preferences to "^<-^<"<br /> change text document 1<br /> return contents of parent story of theFrame<br />end tell<br /><br /><br />-- <br />Shane Stanley <sstanley@myriad-com.com.au><br />AppleScript Pro Florida, April 2009 <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
Advocate ,
Nov 26, 2008 Nov 26, 2008
On 27/11/08 2:18 PM, "Roy McCoy" <member@adobeforums.com> wrote:<br /><br />> Only I don't know how to change to a thin space or similar special<br />> character with grep.<br /><br />Look in the UI...<br /><br />-- <br />Shane Stanley <sstanley@myriad-com.com.au><br />AppleScript Pro Florida, April 2009 <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
Participant ,
Nov 26, 2008 Nov 26, 2008
On Nov 27, 2008, at 4:23 AM, Shane Stanley wrote:

>> Only I don't know how to change to a thin space or similar special
>> character with grep.
>
> Look in the UI...

Yeah. I think I saw that tilde somewhere (not in the UI), but I forgot.
Or maybe it was in the UI. Anyway, thanks.


Roy
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
Participant ,
Nov 27, 2008 Nov 27, 2008
Dave Saunders wrote:

> I rather have the impression that you, Ole and I are the only three
> ex-PM users who actually missed that feature. I used to ask for it a
> couple of releases ago, but I've given up.

Alas! I noticed just now that ID doesn't have an equivalent of the old
Mac PM Edit > Show Clipboard command. I guess you can always just
paste somewhere, but then you have to delete it later and that's
messier.


Roy
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 01, 2008 Dec 01, 2008
Hi All,
I just got back from Thanksgiving and saw this flurry of activity. Just to take it back to the original topic though...

1) Simon, thanks for your answer. I am aware of the transformation matrix and have played with it, but from what I can tell there is no way to set the anchor based on the ruler [0,0] so I cannot use that right now without major rewrites.

2) Ole, you referred to the resize and reframe method. Can you please let us know if this exists in CS3 and where?

3) Does anyone know what the default anchor point is for verticalScale / horizontalScale in InDesign Server CS3?

Thanks,
-Nissan
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
Participant ,
Dec 01, 2008 Dec 01, 2008
I believe it is top-left. I was doing some work last week with InDesign Server where I needed to scale objects within groups around various anchor points specified by the user. We came up with the idea of having nine object styles named for the anchor points so my script could know which to use.

Then, it's just a case of working out where the object needed to end up before doing the scaling, and from there it was an easy matter to do the move.

Dave
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 01, 2008 Dec 01, 2008
Thanks for your reply Dave.
I had originally assumed it was top-left until I had a strange behavior that I replicated in InDesign by changing the anchor to center-middle before running the script.
I'm not 100% sure about wether the object moved strangely because of something in my overly complicated script or if somehow the anchor point was set to center-middle.
Do your scripts assume top-left when you calculate the move or do you just get the new bounds after each scale?

I guess it's time for some more testing/debugging.

-Nissan
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 15, 2009 May 15, 2009
LATEST

Nissan,

Did you find out a way to control the transformReferencePoint, leaving top left anchor as a default?

Best,

~ Steven

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
Participant ,
Dec 01, 2008 Dec 01, 2008
My scripts take over completely the responsibility for the transform anchor point. I look where the point is before and after and make the appropriate move.

Dave
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