[JS] How to control the scroll bar of the document?

Hello.

I would like to move scroll bar to a position I want.

[I couldn't find I want in the "app.layoutWindow [0 '].

Any ideas?

Thank you.

Ideas?

This one:

Add an element of assistance, could be a rectangle in the center of the window you want to see after scrolling.

Store your current zoom value.

Select the item of assistance.

Change the value of zoom to zoom.

Change the value of zoom to your original value (or your expected value).

Remove the element of assistance.

Warnings:

Some positions will work as expected, due to limitations in the size of the pasteboard.

Especially if the center of the 'porthole' resulting should be on the editing table.

Of the code; just one example, which must be adapted to your needs:

var doc = app.documents[0];
var layoutWindow = doc.layoutWindows[0];

// Find a better way to determine the right position.
// For now the helper rectangle will be positioned on that page.
var page = layoutWindow.activePage;

var currentZoomPercentage = layoutWindow.zoomPercentage;
var currentZeroPoint = doc.zeroPoint;
var viewPreferencesOfDoc = doc.viewPreferences.properties;

doc.viewPreferences.properties =
{
    rulerOrigin : RulerOrigin.PAGE_ORIGIN,
    horizontalMeasurementUnits : MeasurementUnits.MILLIMETERS,
    verticalMeasurementUnits : MeasurementUnits.MILLIMETERS

};

doc.zeroPoint = [0,0];

// Note: You could work with the bounds of the page to determine a relative position to the page like:
// Center of quadrant 3 of the page etc.pp.

// A square 2 x 2 millimeters is added and selected:
var helperRectangle = page.rectangles.add({geometricBounds : [170,130,172,132]});
doc.select(helperRectangle);

// Changing the zoom percentage will zoom in to the selected object:
// Maybe I found a bug here, the value must not exceed 2000, anything above will throw an error.
// Tested with InDesign CC 2015.2 v11.2.0.99 on Mac OSX (German)
layoutWindow.zoomPercentage = 2000;

// Zoom out again to the original value:
layoutWindow.zoomPercentage = currentZoomPercentage;

// Tidy up a bit:
// Remove the helper:
helperRectangle.remove();
// Reset the view preferences and the zero point:
doc.viewPreferences.properties = viewPreferencesOfDoc;
doc.zeroPoint = currentZeroPoint;

Uwe

Tags: InDesign

Similar Questions

  • Satellite M100 with Debian - how to control the power and the cooling fan on

    Hey,.

    I M100 and I installed debian, works very well, but there is a problem.
    Cooling fan turns on the top speed of all time. I m not shy on unix.
    How can I control cooling fan?
    How to control the power to the laptop?

    Hi mate,

    have you ever heard of the toshutils? I highly recommend trying these tools. Just google for toshutils and you'll find a few nice applications. Should usually be included in the distribution you have, also, I would check with 'apt - get search toshutils.

    See you soon

  • How to control the speed of the fan on Satellite A660 - 11 M?

    Please any body know how to control the fan speed its always of 69% and making bad noise and the cpu use is 3% no to treatment high I try avancΘs power but still runing high speed

    Advanced power settings go to Toshiba power Saver saver > cooling method. There are minimum level. Change back to your power management for a second power plan, and the fan must be much quieter.

    I did it on my Satellite A660.
    Before changing PC Toshiba, health monitor showed CPU temperature 41% and the speed of the fan was 67%. After changing the method of cooling fan speed is 0%.

  • How to control the output voltage?

    Good time after some time can get the output voltage, but this value is alwayscontinuous. How to control the voltage output through a Boolean? In

    in order to get this tension when I want to.

    Greetings.
    Hugo Santos

    Hi Hugo,.

    If you use a LabVIEW project, you must set the time of sampling in the properties of the node (see SamplingInterval.png). But this time to refresh the data should be high enough. If you take into account this update of time trying to control your way out.

    Kind regards

  • How to control the ws appeal period

    Hi Experts,

    I use bpm12.1.3, when the process web service using the service task, how to control the delay?

    Best regards

    Hi user,

    There is a nice blog on wait times. It's about 11g, but it also applies to 12 c.

    https://technology.AMIS.nl/2011/11/18/timeouts-in-Oracle-SOA-Suite-11g/

    Antonis

  • How to control the movement of the oam in muse & just play once the proposal?

    How to control the movement of the oam in muse & just play once the proposal?

    This must be configured during the creation of the oam, no Muse, but the animated application you use.

    Thank you

    Sanjit

  • How to control the length of the field... ?

    Hi all


    All by providing payment details in the payment.jsp... If we use a credit card which has 16 digits then, how to control the ground to allow the entry of 16 digits only... ?


    Thank you
    Vishnu

    Write javascript to enter only numbers and set the "16" size = attribute to limit the size to 16 digits.

    JavaScript can be like that of google.

    function isNumberKey (evt) {}
    charCode var = (evt.which)? evt.which: event.keyCode
    If (charCode > 31 & (character code < 48="" ||="" charcode=""> 57))
    Returns false;

    Returns true;
    }

    -Kiss

  • How to control the length of field, select items list to 4.2 page

    I apologize in advance if I ask what is obvious, but simply, I couldn't get a response yet:

    I would like to know how to control the length of the elements of the type selection list page 4.2
    (as for a normal textfield: in the case where the content is longer than simply not all appears on the screen)

    help much appreciated
    see you soon
    Wim

    WimDeGroot wrote:
    I apologize in advance if I ask what is obvious, but simply, I couldn't get a response yet:

    I would like to know how to control the length of the elements of the type selection list page 4.2
    (as for a normal textfield: in the case where the content is longer than simply not all appears on the screen)

    Normally the browser automatically resizes the selection list based on the content.

    What version of the browser / do you use?

    What theme?

    What model page/region?

    What form/article layout?

    What content does not match?

    (Basically the best way to get help with problems of this type is to reproduce on apex.oracle.com and see us actually...)

  • How to control the service console in ESX?

    How to control the service console in ESX?

    http://www.Petri.co.il/5-critical-VMware-ESX-CLI-network-commands.htm

    http://download3.VMware.com/VMworld/2006/mdc9694.PDF

    http://download3.VMware.com/VMworld/2006/mdc9807.PDF

    http://download3.VMware.com/VMworld/2006/tac0028.PDF

    http://download3.VMware.com/VMworld/2006/tac9689-b.PDF

    http://download3.VMware.com/VMworld/2006/labs2006/VMworld.06.Lab04-performance-manual.PDF

    http://www.RTFM-ed.co.UK/

    PS: If you have found useful messages then please leave a few points

    André

  • How to control the number of fields in the Advanced mode in &lt; af:query &gt;

    Hello

    How to control the number of fields in the Advanced mode in < af:query >?

    Say I have 20 fields in my table, and I created a view of criteria with 2 fields. This would work perfectly in basic mode. But in Advanced mode , the choice of fields is possible by clicking on the Add fields button. I didn't have the customer to search with all 20 fields. Only 10 fields must be listed in the Advanced Mode, even if there are 20 fields in my table.

    How can I control the list of fields in ADDFields button?

    Any ideas?



    KR

    You can uncheck the contestable ownership of attributes that you must not appear in the Advanced Mode (but they will not appear in the other modes too!) or by programming the value the same as those mentioned here.

    http://adfcodebits.blogspot.com/2010/11/bit-27-setting-view-object-attributes.html

    Also, you can hide the button AddFields as suggested here - http://www.notjustjava.com/2011/12/cool-tips-to-showhide-components-of-the-query-control-of-adf/

  • How to control the sort during the download or export

    can't figure out how to control the sort order when you export on hard drive or upload to smugmug.  have photos arranged in the way I want to do in LR and then when I export to hard drive they are ordered by file name.

    When it comes to your hard drive, your operating system determines the file order.  No matter what you do in Lightroom, the OS will be based on your choice determin how files will be ordered. If you want them to be in order, you should probably adopt a convention of name change in your export that names the exported files similarly followed by a sequence number.  File01, folder 02, etc. Then set your viewer (Finder/Explorer) to sort by file name in ascending order.

  • How to control the number of lines of text below the image in the slideshow module?

    Lightroom 3.3

    How to control the number of lines of text below the image in the slideshow module?  I have an image with 36 words in the caption field which exports like two lines GOOD.!  I have another image with 57 words in the field of legend who runs the page and shows only a VERY BAD line.  With 57 words I can't do the single-line text box small enough to keep the text does not spread out of the page.

    Ideas?

    On the Mac platform and I expect similar under Windows, just hit enter or return key will not help. Instead, you will have to hit the keys Ctrl + Enter or Ctrl + return. This forces a new line. Windows may use a different modifier key. The screenshot below shows that it is possible. Unfortunately, you need to add the text via the caption or Description field in the library module.

  • How you update the document in your model agreement with all changes made in Adobe sign?

    Hello

    I successfully Setup Adobe sign in my sandbox SFDC, created templates with merge mapping and mapping of data... it's all coming together nicely.

    I start sending an agreement, click on "Preview of the signed document or position fields", update all the fields in my agreement (define the length of field, drop down / drop-down list of values... etc.) and send my agreement must be signed. My question is: how to upgrade the document in the model to account for all of the updates I just did this document/contract? I do need to update the fields whenever I send the agreement?

    As long as a Salesforce administrator I was looking for in Salesforce for the answer, but I didn't know that you can add templates to Adobe sign on the dashboard. Once you add a template, you can change all the fields of the form (and the formulas, rules of validation... etc) from the tab 'manage '.

  • How to control automatic scrolling when using the tool pen?

    Is there a way to control the SPEED that Photoshop scrolls when you use the pen close to the rim of a document? If a line of the path direction is suddenly slipped off the screen PSD moves the window WAY out of position. It's boring.

    Not that I'm missing, it can be annoying.

  • Satellite L550-1CW - how to control the touchpad?

    How do you control the touchpad or pointer to go anywhere he wants?
    (IE... when on a particular web page, sometimes the page will automatically scroll through on its own, or the size of text on the screen will change.)

    Can disable you this feature, its boring and very fustrating?

    I hope you know what I mean...

    Windows 7 Edition home premium

    Hello

    To be honest I n don't know what you mean exactly. To me it sounds like it's your touchpad isn't working properly, you have tested an external mouse and how does it work?
    For example, you can disable the touchpad by pressing FN + F9.

    In addition you can try reinstalling the latest drivers for touchpad of Toshiba's official website.

Maybe you are looking for

  • Satellite M30X: Trojan horse - total Formate with recovery disc?

    Hello I had a Trojan horse on my Satellite M30X. My Antivirus deleted, but every time I've been connected to the Internet, it appeared again. Not connected to the Internet it doesn't give me any problems. As I couldn't get rid of him, I backed up all

  • OfficeJet HP 6830: 1 year older printer print head Error Message

    Continuous "Problem with printhead" error on my printer at home. Am (was until today) an instant ink Subscriber. Running through the provided tool on your site, my printer is "out of warranty" since December 26, 2015. How can I do to get this fixed o

  • Sansa Fuze cut songs

    Yesterday, as I noticed a problem with my Sansa Fuze. When I'm listening mp3 songs and increase the volume above some Sansa point (about 3/4 of the maximum volume) begins to cut songs (2 seconds of silence - 1 or 2 seconds of music - 2 seconds of sil

  • Computer hesitate

    My computer very reluctant. Seems to have started after I have win7 instllaled for example, in the POGo, I play Solitare, I click on a card, and it does not move. window I'm rebounds on screen. This happens on a regualr basis. I can't yet figure out

  • Windows 10 could act as a Windows 7 virus, re - install?

    OK, so I decided to download 10 Windows on a netbook.  I had not had the upgrade icon but installed from iso as an upgrade, just to see how it worked.  Stupid mistake that even if everything has worked it have no driver Intel GMA 3600 available (and