Need help more script

[I'll post it on the forum Google Group too.]

File is here: https://Acrobat.com/#d=m7zuQYiUoFrtz5isD7rErQ

Form is a series of paintings that can increase and shrinking their respective lines by clicking a button in the header - tables initially collapsed and filling can open the appropriate tables. I use + and - values on the buttons to see what they should do – they call a script object that manages a loop through the rows in the table, etc. (thank you Niall!).

I also put similar loops in place on the pre-publication and events docReady (on the root of form1) so that tables collapse down to only use lines for printing or after the form is saved and reopened.

I have a few questions that I can't understand. I think that some of the problems might even have to do with the events, I'm using, but not sure.

Reset the value of the key in the header lines + /:

Unless a table is extended and has empty rows showing I want to the caption of the button to be a +. I tried to explicitly set cela under different loops but seem to have questions.

Problem with repetition legend header button:

If a table breaks across a page, the button in the repeat header row does not reflect the caption of the button in the header of the parent line. I sort of fixed this with a code of Paul Guerett that sets the caption based on xfa.layout.pageSpan and it works, but if you click on the button repeated again to reduce the table legend of the main button is not kept up-to-date (must restore a +), unless you click the main button.

Is related to this one once the file is saved and reopened table headers that had been repeated at random several times (2-5 in general).

I also ran into some trouble with drive when using Unicode characters for the caption of the button. Instead of +/-, I tried to use \u25BC and \u25B2 (downwards and upwards of triangles), but reader seemed to choke on it.

This form is ready to go with the exception of these two questions that I can't find.

Hi Jono,

Here is the form with a few mods: https://acrobat.com/#d=rXwdoCcfDC0pWQz-39KWjg

Regarding the extensible headers, I think that the main problem is that the HeaderRow has been set to repeat in the object > tab link. I deselected it. However, you need to test. I have seen this before, and to recover I wrapped the header in a separate subform. I won't do it here because of scripting, but see how you go.

On the reset button, I've included an execEvent for the docReady event in the form1 node. This resets him ' + '.

When a table spans several pages (generating another '-' button). I've included another line to reset the original button toward "+":

xfa.resolveNode("HeaderRow[0].Button1.caption.value.#text").value = "+";

It seems to work.

I have not watched the Unicode. I would stick with the + /, as these are self evident and you will be less likely to have compatibility problems.

Shape looks good!

Good luck

Niall

Tags: Adobe LiveCycle

Similar Questions

  • Need help with script java folder level for silent registration with unique file name

    That's what I'm trying to do

    1. when a person completes the request on one of our computers in the office, there will be a button send at the bottom of the application.

    2 submit the application on is automatically stored on the local server with the file name determined by the fields name and surname on the application.

    example - John Doe Application.pdf

    Saved in the folder C:\Users\Station1\Desktop\FinishedApplication.jpgApplications

    3. This is the example of code I found, but I don't know how to enter which fields determine save name and where to save it to.

    http://thelivecycle.blogspot.de/2015/06/save-with-new-name-in-specified.html

    http://thelivecycle.blogspot.de/2015/06/save-with-new-name-in-specified.html http://thelivecycle.blogspot.com/2009/11/save-form-to-specific-directories-and.html

    Thank you!

    Lol this is the part that you need as a script to the folder level:

    var lcbSaveAs = app.trustedFunction (function (vDoc, vPath) {}

    app.beginPriv ();

    vDoc.saveAs ({cPath: vPath});

    app.endPriv ();

    });

    This is the code you use in your file:

    lcbSaveAs (, "/ C/users/specialisee1/Desktop/result /" + this.getField("FirstName").valueAsString + "" + this.getField("LastName").valueAsString + "Application.pdf");

    lcbSaveAs is the name of the function of trust.

    vDoc.saveAs is the Document object, call the saveAs method.

    I don't know what oDoc.SaveAs is, or where you got it.

  • Need help with script to remove audit ASM files

    Hello

    It would be great if someone can provide me with a script to delete the files of audit and trace on ASM files

    Thank you

    Aerts.

    Ed,

    I have a shell script which is run via cron once a week.  Of course, you need to change the location of the trace and audit files.  This script will remove all files .trc and .trm more than 10 days

    #! / bin/bash

    find/u01/app/oracle/diag/rdbms /... dbname... / path-name ' * .trc ' - mtime + 10 - type f-exec rm '{} ';

    find/u01/app/oracle/diag/rdbms /... dbname... / path-name ' * .trm ' - mtime + 10 - type f-exec rm '{} ';

  • I need help with script of 'Edit arc' Russell Brown

    Hello

    I installed the script of 'Edit arc' Russell Brown for CS6. It does not play right. I go to the window > Extensions > edit in an ARC and choosing a layer to run the script. I then run the script. the layer converts it to a smart object and opens in the CRA. I treat layer in an ARC and choose 'Open' and then when the layer opens this file is smaller that before I was running the script (i.e. If layer a face of a person on this subject face decreased after treatment of CRA.)

    My Adobe Camera Raw preferences are set to automatically open all the tiffs supported. The file is 300 ppi, 8bits.  My settings of the CRA are 8 bits 300 ppi. I also tried to change the settings of the CRA to 16-bit, 300 dpi. I'm on a mac equipped with the trial version of photoshop CS6. I don't know why the layer shrinks. It seems like ARC treats the file to 240 DPI or something. Can anyone help? Thank you.

    I don't have so I can't test this, but I think that if you change the "Adobe ACR Editor.jsx" script that was installed during the installation of the CS6 Panel, you should be able to match the ppi of the cab to your ppi CS6 documents.

    Modify it, you need to do is to comment out or remove the following lines.

    // change image res to match defalut ACR 240
    if( app.activeDocument.resolution != 240 ) {
        var docRes = app.activeDocument.resolution;
        app.activeDocument.resizeImage(undefined, undefined, 240, ResampleMethod.NONE);
    }
    
  • Need help with script to find the virtual computer by IP

    Looking for a script that will correspond to the vm to IP, but should be able to find several IPS at the same time.

    I put this together from scripts on the net, which works well to search for a single IP address at a time:

    $match_address = Read-Host "enter the IP address to find."

    Get - VM | %{

    $vmips = $_. Guest.IPAddress

    {foreach ($ip in $vmips)

    If ($ip - as $match_address) {}

    "VM found correspondence address: {0}" f $_. Name

    }

    }

    }

    But would need to be able to enter several IP addresses of different subnets in the $match_address and search script for a match for every ip address.

    Could you please try this?

    function search-VMAssociatedToIP {}

    (param

    $ArrayOfIPToCheck

    )

    {in process

    $VMsAndAssociatedIP = get-view - viewtype 'virtualmachine ' | {foreach-object

    $VM = $_

    $_.guest.net | {foreach-object

    $Net = $_

    $_. IpAddress | {foreach-object

    $IpAddress = $_

    $Output = New-Object-Type PSObject-Prop ([ordered] @ {}

    "VM" = $VM. Name

    "NetworkName" = $Net.Network

    "IP address" = $IpAddress

    })

    Return $Output

    }

    }

    }

    $ArrayOfIPToCheck | {foreach-object

    $IPtoCheck = $_

    $VMsAndAssociatedIP | where {$_.} IpAddress - eq $IPtoCheck} | {foreach-object

    $Output = New-Object-Type PSObject-Prop ([ordered] @ {}

    "IpToCheck" = $IPtoCheck

    'VM' = $_. VM

    "NetworkName" = $_.NetworkName

    'IpAddress' = $_. IpAddress

    })

    Return $Output

    }

    }

    }

    }

    $MyArray = "10.0.33.1","10.0.30.11","10.0.20.11","10.0.32.1".

    Search for VMAssociatedToIP - ArrayOfIPToCheck $MyArray | OGV

    Use a table entry.

    First get the IP addresses of all computers installed correctly (only for virtual machines with VMware tools) virtual based on get - view so the collection will be fast.

    Then compare with the PPE provided as input.

  • Need help java script to make something work

    Is it possible to set fields to fill out in advance by selecting a certain element in a drop-down list of separate?

    Example, I have 3 fields of a document, the first contains a menu drop-down of lets say models of printers, the second field is the number of pages allowed to be printed by the model, the third would be the price per copy plus the volume allowed

    Fall to the low price of Volume by extra

    Model 1 100 10 p

    Model 2 200 20 p

    Model 3 300 30 p

    Model 4 400 40 p

    So if I chose the 3 model in the drop down menu, my Volume poster 300 field and my price per extra copy would show 30 p

    In my mind, this seems like it should be possible, but I don't know where to start. I have no idea about writing java script, so if this is the solution I need some advice please

    Thank you

    Jackie

    Yes, it is possible. It is a good place to learn how do:

    https://acrobatusers.com/tutorials/change_another_field

  • Need help simple script

    Hi guys,.

    Need some help im working on a series of steamers one very simple but as im only learn Powershell atm I hit an obstacle. I would like to get a list of the strategy of starting for all my guests so far I

    Get-VMHost | Get-VMHostStartPolicy | FT - autosize

    That works very well but does not give me the friendly name of the host, I guess I can get probably that but don't know how.

    Thanks in advance

    www.virtualisedreality.com | www.Twitter.com/virtualisedreal

    Here's a way to do it, I'm sure there is an easier way, that I just can't think of it right now!

    $MyObj = @()
    Foreach ($vmhost in Get-VMHost){
         $StartupPolicy = Get-VMHostStartPolicy -Vmhost $vmhost
         $Details = "" | Select VMHost, Enabled, StartDelay, StopAction, StopDelay, WaitForHeartbeat
         $Details.VMHost = $vmhost.Name
         $Details.Enabled = $StartupPolicy.Enabled
         $Details.StartDelay = $StartupPolicy.StartDelay
         $Details.StopAction = $StartupPolicy.StopAction
         $Details.StopDelay = $StartupPolicy.StopDelay
         $Details.WaitForHeartbeat = $StartupPolicy.WaitForHeartbeat
         $MyObj += $Details
    }
    $MyObj
    

    If you found this information useful, please consider the allocation of points for correct or helpful.

    Alan Renouf

    http://Virtu-al.NET

  • Newbie needs help w / script revision



    So, I created a slide show, where each image is a link. I have selected _blank in the selection of the window. I would like to change that to _parent. Problem is that I can't find the script! Seems that the actions are associated with the instance. And I can not find them in order to change the action. Help?

    Use the movie Explorer. It is in the Windows menu.

    When loading, you can refine what it shows by using the icons at the top. For Actionscript, this is the icon with the arrow. To change a particular frame, you can double-click the name of the image or the code then it will open the actionscript Panel.

  • Need help w / Script Groovy (Jet lag)

    I'm writing a script groovy/function which displays the difference (DD:HH:MM:SS) between two dates (now rather than a time of inputt'ed).

    I run the following script, which seems like it should work, but I get the error referenced below: DATEVAL is an input value.  Any idea?

    import groovy.time. *.

    def now = new Date()

    TimeDuration duration = TimeCategory.minus (now, dateValue)

    length of back

    Error:

    the value returned by the Script: "the static value of the type: 'groovy.time.TimeDuration' ' is not assignable to the type of the Script output:" foglight-5 - admin:TimeDuration.

    Screenshot:

    change your output type of the object, see what it says to type when you test again.

  • Need help with script to Calc

    I have a requirement as below.

    If has! = #Missing AND B == missing OR C == #Missing

    To copy the last week same value from one day to the current date.

    I've written as below.

    DIFFICULTY ('FY15', 'D01')

    "Qty")

    IF (A! = #MIssing AND (B is #Missing or C == #Missing))

    "Qty" = "D07;

    )

    ENDFIX

    I have to write like that for all the permutations and combinations for all the combination date D1 to D31.

    Is there an elegant way, that everyone knows to do this using variables. Please throw some light on this for me.

    Thank you
    Vishal

    Hi Vishal,

    In this case, you should be able to do it with @PRIORand taking "Days" out of the statement to FIX.  The exact syntax depends on if the "days" are labeled as a time dimension.  If it is marked at the time, the assignment would be:

    "Qty" = @PRIOR ("quantity", 7);

    Because you don't want to cross the borders of the month I guess 'D01' through "D07" will always end up #Missing.

  • Need help with script debugging - images not showing

    Hello

    I practice with little javascript for a rotating banner.  It works on my local copy, but when I download it will not display.  I also added a photo in the 'body' and it shows, so I compared the paths, and they seem correct.

    the page is here

    what Miss me?

    I got the code here:

    http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

    Thank you

    Ziggy

    ... /images/banner_1.jpg

    Remove the part highlighted for each image. This will allow search for the image as in

    http://ziggystout.com/flg_test/images/banner_1.jpg

    When you test the link, I see that banner_2.jpg and banner_3.jpg are found at this place, but the other two images are not here.

    Please ensure that you have downloaded the missing images or that they have the correct name and extension.

  • Need help with script cal on CCONV

    Hi all experts,

    I installed the database of currency and it works fine, but when I tried to get the rate dynamically based on 'Year' and 'Version', I got syntax error, here is my code.


    UPDATECALC OFF SET;

    DATACOPY RPTValue to USDValue;
    Fix ("USDValue")
    CCONV @MEMBER (@CONCATENATE (@NAME (@CURRMBR ("Year")), @NAME (@CURRMBR ('Version')))-> "USD";
    ENDFIX;

    CALC ALL;

    In my database of currency, the currency has been defined as "(2010Act, 2010Bud, 2011Act, 2011Bud, etc.), it's because we have different rates by year and version."

    Thanks for any recommendations

    Billy

    You must link your PL database to database of currency for that... OK such me how can we achieve... Send me by e-mail

    [email protected] we will do together

  • Need help with custom script to rename the layers

    Hello world.

    I need help to write a custom script (because I suck at it) that will allow me to go through all the layers and sous-calques for a specific name ('X') and give it a new specific name ('Y').

    I have had success using the script below, but it does not work on any text layers names where the text layer was previously particularly well-known in 'X' and now changed needs.

    Any help is greatly appreciated.

    * Note: this script was originally used to find any layer with 'Copy' in its name and remove with anything after (to correct the problem of duplication of layers by adding this text).

    This is why the function is named removeCopy. It works for renaming layers also - just not a layer of text unfortunately.

    #target illustrator

    function removeCopy() {}
    If (app.documents.length == 0) return;
    var app.activeDocument = docRef;
    recurseLayers (docRef.layers);
    }
    removeCopy();
    function recurseLayers (objArray) {}
    for (var i = 0; i < objArray.length; i ++) {}
    ObjArr [i] .name = ObjArr [i].name.replace (/ \s*current name\s*\d*/, 'new name');
    If (objArray [i] .layers) recurseLayers (. layers.length > 0 ObjArr [i]);
    }
    }

    I finally found something after searching forums for a week. My confusion was related to the way Illustrator treats real layers against text/path/object "layers." Instead of layers, I had to use the pageItems in the script. The code below works. Thanks to Gustavo for his answer in another thread and Carlos I thank you for this looking too good! You're great to be ready to help models do more advanced things with Illustrator.

    var doc = app.activeDocument;
    var items = doc.pageItems;
    for (var g = 0; g)
        elements [g] .name = elements [g].name.replace ('Century Schoolbook text line', ' MonogramText: Century Schoolbook ");
    };
    App.Redraw ();
  • Need help to modify the findchangebylist.jsx script

    I alternate the same script vbs to meet my needs and I was happy about it (likeChild when you give him his favorite toy) but I run into som problems with when I copy and place the script vbs on another computer I want to using it called CS6 instead of CC... I tried everything I could think of but no luck... same thing happens whenever I try to use CS6 open rather CC in which I run it... on the computer I write the script running like charm (on both computers, I have CS6 and CC)... so I decided to use the same script jsx version...

    then, when I try this script:

    1. the dialog box opens only when my cursor is textframe allowing me to select what I want to change the selected item 2. 1 document. 3 selection

    2. when I select 2 blocks of text and document I have 3 or more, the script does not change in 2 pictures selected instead she does in all settings

    I need to rotate this script

    When I select the text block to open dialogbox allow me to take 2/3 of the options mentioned above, the number 2 and 3

    He doesn't find it and change only in blocks of text I selected (when it is selected with the Selection tool) not in all settings

    I tried to do it my self, but a little short of knowledge im

    I tried to switch the dialog case is open, adding the line case 'TextFrame': in this part of the script

    If (app.documents.length > 0) {}

    If (app.selection.length > 0) {}

    {Switch(App.Selection[0].constructor.) Name)}

    case 'PointInsertion ':

    'character ': case

    case "word":

    case 'TextStyleRange ':

    case "line":

    stops of the "Point":

    case "TextColumn":

    case 'text ':

    case "cell":

    case "column":

    case 'Row ':

    case 'Table ':

    myDisplayDialog();

    and it works to call the dialog box when the text block is selected, but then he didn't make changes textframe don't debut not overall selected...

    So I tried to experiment with this line

    if(myResult == true) {}

    {Switch (myRangeButtons.selectedButton)}

    case 0:

    myObject = app.documents.item (0);

    break;

    case 1:

    MyObject = app.selection [0] .parentStory;

    break;

    case 2:

    myObject = app.selection [0];

    break;

    }

    myDialog.destroy ();

    myFindChangeByList (myObject);

    }

    else {}

    myDialog.destroy ();

    }

    by changing the number 1, 2 or 3, but that only the script says that if I have 2 block of selected text to search in the second block of text (incase of number 1) or if I have selected 3 and if numer 2 only script in text 3

    I need help please

    Hello

    I ment something like this:

    //...
    var myResult = myDialog.show();
      if(myResult == true){
           switch(myRangeButtons.selectedButton){
                case 0:
                     myObject = app.documents.item(0);
                     myFindChangeByList(myObject);
                     break;
                case 1:
                     if (app.selection[0].constructor.name == "TextFrame")
                          for (var b = 0; b < app.selection.length; b++)  {
                               myObject = app.selection[b].parentStory;
                               myFindChangeByList(myObject);
                          }
                     else {
                          myObject = app.selection[0].parentStory;
                          myFindChangeByList(myObject);
                          }
                     break;
                case 2:
                     myObject = app.selection[0];
                     myFindChangeByList(myObject);
                     break;
                }
           myDialog.destroy();
           }
           else {
                myDialog.destroy();
           }
    //...
    

    App.Selection is a table, but its length is always a number.

    If the 1st element of selection is a TextFrame (or more) ==>, we get into a loop

    on the other ==> we call a function that had been initially.

    Jarek

  • Need help with Java Script to perform a calculation in the form of Adobe Acrobat Pro 9

    I have a form (test) I created in Adobe Acrobat 9 Pro.

    I need help to create a custom JavaScript, so I can get the desired response.

    1) there are several questions in each group requiring a numeric response between 0-4

    2) there is a total set up field to calculate the sum of the responses of all of the above questions

    (3) the final "score" takes the answer in step 2 above and divide by the total possible response

    Any help to what Java Script I need to fill it would be greatly appreciated!

    I have attached a spreadsheet "" which shows more in detail as are the result of what I used in Excel to get the desired end formulas.

    Thanks in advance.

    Have you tried the "field is the average of:"?

Maybe you are looking for