How to force script to read a real property?

Hi,
Help me manage this, pls. We have a textFrame with, say, 3 columns.
TextColumns line.length is different couse widow/orphans settings.
so to fix it I try to run this:
// some text in middle column is selected.
MC = app.selection[0].textColumns[0];
Pcount = MC.paragraphs.length;
lines_count = MC.lines.length;
    if (Pcount > 1) {
        do 
            for (var x = Pcount-1; x >0; x--) {
                stopped = x;
                lines_count1 = MC.lines.length; // shouldn't be changed?
                MC.paragraphs[x].spaceBefore = MC.paragraphs[x].spaceBefore + 1;
                alert (lines_count1 + "; " + lines_count + "; " + MC.paragraphs[x].spaceBefore);
                MC.recompose(); // doesn't matter write it or not
        while (lines_count1 == lines_count); // this stay true
        MC.paragraphs[stopped].spaceBefore = MC.paragraphs[stopped].spaceBefore - 1;
variables "line_count" and "line_count1" should start to differ inside while loop... but they do not. Why?
thx

This is the problem with text specifiers that has been discussed a number of times here. Try this modified code:
function main() {
  var column = app.selection[0].textColumns[0],
      paragraphs = column.paragraphs.everyItem().getElements(),
      startLineCount = column.lines.length,
      i;
  if (paragraphs.length > 1) {
    do {
      for (i = paragraphs.length - 1; i > 0; i--) {
        paragraphs[i].spaceBefore += 1;
    } while (startLineCount === column.getElements()[0].lines.length);
    for (i = paragraphs.length - 1; i > 0; i--) {
      paragraphs[i].spaceBefore -= 1;
app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.FAST_ENTIRE_SCRIPT);
Jeff

Similar Messages

  • How can I script Adobe Reader updates using vbScript, PowerShell or C#?

    I would like to script Adobe Reader updates using vbScript, PowerShell or C#, are there any Adobe API calls I use to do this.  There are several different version that I support and auto update is not an option. I do updates at a specific time of the month. I would like to write a script that would download and install the update for the currently installed version of Adobe Reader (32 or 64 bit) for the version of the OS (32 or 64bit). I can detect the OS version and the Adobe version.  I can download updates but I do not want to hard code anything

    Sabian is correct.
    Most admins download the updates from the ftp site and push via AIP, GPO, SCCM, or some other method whenever it makes sense for them.
    Ben

  • How to force using the adobe reader to view the PDF by javascript / PHP / HTML?

    I use the standard way to embed a pdf to my website, however, when I open it the browser will choose the default pdf viewer instead of the adobe reader. I can change it manually by looking at the browser option but it would not be nice if the website visitor need to do this manually. So I would like to know how to force the browser to open the PDF in adobe by using some HTML header / javascript / php or any parameter in object tag. Thanks.
    <object id = 'zoomPage' type='application/pdf' data= '" + sourceFolder + "SingTao/2013/08/17/0/0/A/Content/pdf/pdf_" + currZoomPageNo + ".pdf#toolbar=1&navpanes=0&statusbar=0&messages=0&pagemode=read'><p>The PDF can not display</p></object>

    I know this problem related to the browser behaviour so I would target only :Chrome firefox and IE 9+ (it is ideal if IE8 can also adopt the solution) thanks

  • Reader XI & IE10 - how to force PDF's to be viewed in READER?

    I have NO Adobe add-on installed in IE10.  Updgraded from Reader 8.1 to Reader XI.  Under Reader 8.1 there was an option in settings to force PDF's to be opened in READER instead of IE.  Cannot find that option.  Went to Settings / Manage-Add-ons to disable Adobe PDF there, but it's not installed, so can't disable it.
    Any ideas on how to force PDF's to be opened in READER instead of IE10?
    Thanks!

    I do not quite understand your initial comment.  You write that you do not have the Adobe Reader add-on installed on IE10, yet PDFs open in IE?
    See this article how to enable viewing PDFs in a browser; you will have to do it the other way around to see the opposite effect: http://helpx.adobe.com/acrobat/using/display-pdf-browser-acrobat-xi.html

  • How can I name a button/movie so that an external script can read it?

    Hi,
    I have a javascript on my website that is called on any click. The script reads the name of the clicked item. This works fine for all jpg/gif images with a name, but how can I name a flash movie in such a way that this script can read it? I tried several things, the name (and id) in the published parameters, the name of the instance, of the button, etc. But nothing works?
    The external javascript is this:
    var theName;
    function grabName(e){
    var targ;
    if (!e) var e = window.event;
    if (e.target) targ = e.target;
    else if (e.srcElement) targ = e.srcElement;
    if (targ.nodeType == 3) {targ = targ.parentNode;}
    theName=targ.name;
    if(theName){GoogleCounter(theName);}
    document.onclick=grabName;
    Thanks,
    Irene

    You should look into using the ExternalInterface class to have Flash talk to javascript in the web page that contains it.  Here's a link that provides some information on that...
    http://kb2.adobe.com/cps/156/tn_15683.html

  • How to Force Client's DHCP Renew on Mobility Event?

    Hi All,
    I have a (single) client (it is a cisco IOS router) behind a wireless workgroup bridge (cisco1242).
    The client's IP address is obtained via DHCP from the wired network.
    Now, when roaming occurs, the Client will never have knowledge about this event,
    and hence will not renew its IP address until lease expiers.
    This is not a problem of course when Layer 2 roam occurs, but with Layer 3
    roam it will interrupt the traffic.
    The cisco's IP Mobile implementation does have this issue addressed in DCCoA
    scenario: the WGB is configured to send an SNMP trap on its dotradio state change;
    the cisco mobile router is configured with snmp-server manager to process this trap
    and start DHCP renew on the Down/Up event. Unfortunately, this works in Mobile IP
    scenario only because I cannot make it work without the mobile router registered
    with a home agent.
    I wonder if someone could come up with an idea on how to force DHCP renew
    on a client (cisco IOS router) in such a situation - event scripting, SLA,  or ...?
    alex
    ============================

    Yes, George, I've looked at this.
    The problem with dynamic anchoring with static IP address is how
    the (new) WLC detects the IP address of the client. Remember that
    my client is cisco router with network(s) behind it. Snooping the
    ARP request will not work since ARP timeout in IOS is 4 hours.
    Orphan packet handling (I understand it is intercepting the IP
    packet from client without reply(?)) will most probably give erroneous
    result as this packet can be a packet from a network behind the router.
    alex
    ====================================

  • How to force the "Bluetooth Communicat​ions Port" to be one of COM1 to COM8 ports?

    Dear Lenovo Community, Happy Holidays to you all and wish you a great happy new year. Recently purchased a Bluetooth OBDII device and have difficulty making it to work with its provided software on my T61 (running original XP Home). My short story and question/problem is that I can open "My Bluetooth Places" and pair with the OBDII device as an "OBDII SPP Dev", but my T61 assigns serial port COM19 to it. The OBDII software which came with the device only can let user set to one of the COM1 to COM8 ports and in the properties of Bluetooth pairing, there is no way that I can select which COM port to use. I looked at the Device Manager and I do see these COM port assignments: COM4,5,6,7: Sierra Wireless (the HSDA modem in the laptop which I have never used BTW) COM 9,10,11,12,13,14,15,16,17: Bluetooth Serial Port COM 18, 19: Bluetooth Communications Port and I don't see anything for COM1,2,3, and 8 My question is how to force the computer/OS to assign one of the COM1 to COM8 ports to my device upon pairing? Can I disable the Sierra Wireless model from the COM ports list and hope this will happen? Thanks for your help and inputs beforehand. Regards, AL

    Hi, AL_K
    Have you attempted to change the port number in device manager itself? If you navigate to Device Manager and open the list of Ports, you can right-click on the device you wish to assign a different port number. After right-clicking, click Properties. There should be a tab called Port Settings. In here, you should find a setting to manually assign a port number.
    Good luck, and let me know how it goes,
    Adam
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution!" This will help the rest of the community with similar issues identify the verified solution and benefit from it.

  • How do i install adobe reader without installing products from google.

    i dont like google, i dont like a bunch of worthless taskbars crowding my browser. so how do i install adobe reader without installing google products when you dont even give me the chance to say i dont want them?
    It is unethical to force onto people products of any nature that they do not want. i do not want google products so by your installation for adobe reader automatically installing google products without my consent is unethical.

    I don't understand the "forcing" part; the bundled software is clearly optional, and can be unchecked before the download.
    Or using the download link that Michael provided earlier (which is posted at least a dozen times every day in this forum).

  • I want to upgrade iOS from 5 to 6, but when I go to synch everything in preparation, it tells me I will lose all my stuff on the iPhone and iPad which is unique.  How can I backup or do a "real synch" (both sides have same data) and then upgrade?

    I want to upgrade iOS from 5 to 6, but when I go to synch everything in preparation, it tells me I will lose all my stuff on the iPhone and iPad which is/are  unique.  How can I backup or do a "real synch" (both sides have same data at end of process) and then upgrade?

    You should really read the manual.
    "How do you restore from backup? "
    Restore.  When given the choice, choose to use backup.
    "And how can I check to see if the pics and videos are on my computer somewhere first??"
    They would only be where you put them.  What program did you use to import them?  Pics/vids taken with ipod are not part of the sync process at all.  You should be importing them just as you would with any digital camera.
    If you did not import them, then they are not on your computer.

  • Adobe Acrobat 9 Standard is still seeing my old scanner install.  How to force it to see new scanner install.

    Adobe Acrobat 9 Standard is still seeing my old scanner install.  How to force it to see new scanner install?  Scanner is recognized by and works fine in Windows.  Acrobat however still sees Fujitsu fi-6130dj #3.  I need it to see Fujitsu fi-6130dj which is what is listed in Device Manager.  (Windows XP SP3).
    Thank you for any suggestions.

    To provide more detail and list what was done to resolve the issue but there may be a better way.
    Background.  When you install a USB device to a PC it is listed in Windows Device Manager as installed hardware.  If you take the USB plug for any device and plug it into a different USB port on the PC the PC will install drivers again for that device.  In Device Manager, if you set a system environment variable for device manager to show non-present devices you can see all of the times this may have occurred.  In this specific instance there were five installations in Device Manager for one piece of hardware, a Fujitsu fi-6130 scanner.  The first listing was Fujitsu fi-6130dj, then Fujitsu fi-6130dj #2, Fujitsu fi-6130dj #3 and so on.  Adobe Acrobat only saw the third instance of these drivers being installed.  Once I cleaned Device Manager of all Fujitsu scanner installs I was able to have a single set of drivers installed for this Fujitsu but Adobe still recognized the third instance of the driver install and I could not figure out how to force it to see what Device Manager was seeing, a single instance of the scanner being installed (with no #3 behind it).
    Steps performed to try to resolve.
    Repair install of Adobe - no luck - still sees the #3 instance of the scanner
    Deactivation, uninstall, reboot, reinstall, reactivation of Adobe - no luck, same behavior as above
    Complete removal of all scanner related software.  This included the ISIS drivers in Add/Remove Programs and all other related software.  This also included deleting the contents of the TWAIN_32 directory found within the root of the Windows directory and also included deleting the scanner from Device Manager.
    Rebooted.
    Reinstalled complete packages of both TWAIN and ISIS scanners - with the scanner disconnected.  Powered the scanner back on and let Windows install the drivers for the hardware.  Only at this point did Adobe see the new install of the Fujitsu scanner and no longer looked for the #3 instance of that scanner install.

  • How to activate script debugging in Adobe Livecycle designer

    Friends,
    I would like to know how to activate script debugging in the Adobe Livecycle designer. I need to debug the scripts written in the script editor.
    Thanks and Regards.

    Syntax checking is available in designer from version 8.1 onwards.
    If you want to enable in Adobe Reader then go to Edit --> Preferences --> JavaScript --> Enable the option Show console on Errors on messages.
    Apart from it the alternative way to debug the scripts is to use xfa.host.messageBox and check the values.
    Chintan

  • How to force my Web part to run regardless of users permissions

    I have created the following custom permission , which will allow users to Create items without being able to view,edit them:-
    $spweb=Get-SPWeb -Identity "http://vstg01";
    $spRoleDefinition = New-Object Microsoft.SharePoint.SPRoleDefinition;
    $spRoleDefinition.Name = "Submit only";
    $spRoleDefinition.Description = "Can submit/add forms/files/items into library or list but cannot view/edit them.";
    $spRoleDefinition.BasePermissions = "AddListItems, ViewPages, ViewFormPages, Open";
    $spweb.RoleDefinitions.Add($spRoleDefinition);
    $spweb.Dispose();
    then inside my "Issue Tracking List" i stop inheriting permission from team site , and i define the following permission for all users:-
    now users can add items and they can not view them ,, which is perfect :).
    But now i wanted to add a custom web part to my Create form which will hide certain fields if the user is not within specific group ,the web part looks as follow:-
    protected override void OnInit(EventArgs e)
    base.OnInit(e);
    InitializeControl();
    using (SPSite site = new SPSite(SPContext.Current.Site.Url))
    using (SPWeb web = site.OpenWeb())
    web.AllowUnsafeUpdates = true;
    SPGroup group = web.Groups["Intranet Visitors"];
    bool isUser = web.IsCurrentUserMemberOfGroup(group.ID);
    if (!isUser)
    SPList myList = web.Lists.TryGetList("Issue List");
    SPField titleField = myList.Fields.GetField("Category");
    titleField.Hidden = true;
    titleField.ShowInEditForm = false;
    titleField.ShowInNewForm = false;
    titleField.ShowInDisplayForm = false;
    titleField.Update();
    myList.Update();
    // web.AllowUnsafeUpdates = false;
    else
    SPList myList = web.Lists.TryGetList("Issue List");
    SPField titleField = myList.Fields.GetField("Title");
    titleField.Hidden = false;
    titleField.Update();
    myList.Update();
    // //web.AllowUnsafeUpdates = false;
    web.AllowUnsafeUpdates = false;
    then i deploy the web part and i add it to the Create form. but after doing so user are not able to create items and they will get the following error:-
    Sorry this site has not been shared with you
    so can anyone advice how to force my web part to run , without checking the users permissions or with minimal permssions ?

    in this case, use the elevated privileges to read/add/edit items with elevated privileges with below code.
    but make sure the page which you add this web part have at least read access to all user.
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using (SPSite site = new SPSite(web.Site.ID))
    // implementation details omitted
    More: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx
    Bistesh
    Ok after adding :-
    SPSecurity.RunWithElevatedPrivileges(delegate()
    users with the following permissions can create items:-
    "AddListItems, ViewPages, ViewFormPages, Open";
    and they can not edit/read them, which is great. but i am facing a caching problem , because if user is inside the "Intranet visitor" he will be able to see Category field as mentioned in my code, but if i remove him from the "Intranet Visitor"
    he still can see the field,, although in the web part i specify not to display the Category column if the user is not inside the "Intranet visitor " group... here is my current code:-
    protected override void OnInit(EventArgs e)
    base.OnInit(e);
    InitializeControl();
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using (SPSite site = new SPSite(SPContext.Current.Site.Url))
    using (SPWeb web = site.OpenWeb())
    web.AllowUnsafeUpdates = true;
    SPGroup group = web.Groups["Intranet Visitor"];
    bool isUser = web.IsCurrentUserMemberOfGroup(group.ID);
    if (!isUser)
    SPList myList = web.Lists.TryGetList("Risk & Issue Management");
    SPField titleField = myList.Fields.GetField("Category");
    titleField.Hidden = true;
    titleField.ShowInEditForm = false;
    titleField.ShowInNewForm = false;
    titleField.ShowInDisplayForm = false;
    titleField.Update();
    myList.Update();
    // web.AllowUnsafeUpdates = false;
    else
    SPList myList = web.Lists.TryGetList("Risk & Issue Management");
    SPField titleField = myList.Fields.GetField("Category");
    titleField.Hidden = false;
    titleField.ShowInEditForm = true;
    titleField.ShowInNewForm = true;
    titleField.ShowInDisplayForm = true;
    titleField.Update();
    myList.Update();
    web.AllowUnsafeUpdates = false;
    so can you advice please ? is this a caching problem, or once the user add at-least single item he will be able to see all columns ?

  • How to force CoreDump in the Kernel source code

    Hi,
    Anyone know, how to force coredump in the Kernel source code?. And also to collect all information related to CPU Registers, CPU IRAM, Cache Data and complete SDRAM content.

    pull your RAM out....
    Wouldn't recommend doing that really...... And why would you want to cause a kernel panic?
    EDIT: Spelling sucked...
    Last edited by crankyadmin (2009-09-28 22:02:14)

  • How to force digital input sample rate?

    Does anyone know how to force a Digital Input sample rate and/or tell Core Audio which conversion clock to use... internal or external? Apparently both things can be done from Pro Tools, but I don't have it.  My problem is locking onto an A/D converter's 48K Toslink output.  I can set 48K in 'Audio - Midi' setup and the audio is perfect, but a few seconds later  Core Audio returns to the default 44.1K.  I need to force it to stay at 48K, or clock on the signal rather than internal clock.

    Braver,
    Let me clarify a few things. First, the 6733 supports correlated digital I/O. This means that the digital operation does not have its own clock. You can correlate the digital operation with the AO clock, which will allow a digital operation up to the max AO rate. You can generate a pulse train with an onboard counter and use that as your digital clock source. Also, you can use a completely external clock source to achieve the max digital rate of 10MHz. The knowledge base, linked below, points you to a couple of examples that ship with LabVIEW. Be sure and read the documentation associated with each example.
    Knowlege Base
    As for
    the example CDI Single Point clocked by Counter (E).vi, notice how the output of...

  • When I send messages off-line, they enter in the addressed mailbox with the date and hour which I've clicked "Send later". How could I set up to the real time?

    When I send messages off-line, they enter in the addressed mailbox with the date and hour which I've clicked “Send later”. How could I set up to the real time?

    What you say about Send Later timestamp is correct.
    When you click Send or Send Later a time is set regardless of when you actually sent the Send Later email.
    Please voice your vote at this link:
    https://bugzilla.mozilla.org/show_bug.cgi?id=560901
    You will need to logon/register.

Maybe you are looking for