Accessing Properties of Individual Tool Buttons via JavaScript

Hi all!
I am new to both this forum and scripting Acrobat so please excuse me if the question sounds naive.
I am trying to find a way to access the properties of individual tool buttons via JavaScript (if there is one). I could not find it yet in JS API Reference. If anybody can help me or direct me to the right way, I will greatly appreciate that.
For example, in 'Comment & Markup' toolbar one can right-click and change the 'Tool Default Properties' of various markup tools like Highlighter, Line, Rectangle etc. Is it possible to access these properties through JavaScript so that buttons can be added for dynamically changing these? Hope this makes sense!
Thanks in advance for your interest and help.
John.

Hi Andy, thanks for the answer. It was pretty simple - I just added an authorization scheme to the report column, wehre the javascript is executed. Christof

Similar Messages

  • Toggle Image Buttons using Javascript - How?

    Hi,
    Hoping someone can assist me with javascript and how to toggle buttons.
    My scenario is as follows - I have two buttons side by side, say Button_A and Button_B but I also have two other buttons, i.e Button_C and Button_D which are not displayed at start-up, only Button_A and Button_B are displayed.
    With javascript, I need a means of switching buttons over the top of Button_A and Button_B, i.e if I press Button_B, Button_A gets replaced with Button_C and Button_B gets replaced with Button_D.
    At the moment, each button is inside unique div id, and each button is displayed as an image within an img tag.
    Also need a means of accessing buttons via javascript, even if I haven't actually clicked that particular button, i.e if I click Button_B which fires an onclick event, I need to perform operations on Button_A as well. Unsure how to access Button_A object?
    Any assistance on the above would be much appreciated.
    Thanks,
    Tony.

    Hi,
    It sort of helps but lets say in your example you had another image column called IMAGE2, which had a image of a green circle, so that when you clicked on the green tick within your IMAGE column, this changed to a red cross as it does now but at the same time, also toggled the green circle to a blue square, even though you didn't click on this green circle image, just on the green tick.
    How might this be done in Javascript?
    Hope this makes sense.
    Thanks.
    Tony.

  • Access file applet function via javascript

    hi all
    when i want to have access to the method (which in fact read a file) of my applet class via javascript, a java error is raised: access denied
    BUT i have signed the related jar!
    when i want to access the method (which in fact read a file) of my applet class via the normal way (put a button into a frame and....) it works.
    are there more configurations to do or ....?
    Kind Regard Tom
    here is the code
    HTML file
         <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
         <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
         <head>
         <link type="text/css" rel="stylesheet" href="/css/style.css">
              <script type="text/javascript">
              function xclick() {
              alert( document.getElementById('applet').isFileOk());
              document.getElementById('fichier').value = document.getElementById('applet').isFileOk();
              //alert(document.portal.applet.isFileOk(path));
              function checkfile() {
                   //var fichiercacher = document.portal.fichier.value;
                   var fichiercacher = document.getElementById("fichier").value;
                   document.getElementById("fichiercacher").value = fichiercacher;
                   document.getElementById("fichiercacher").value = fichiercacher;
                   document.getElementById("chemin").value = fichiercacher;
                   alert("fichier cacher" + fichiercacher);
                   alert("chemin=" + document.getElementById("chemin").value);
              </script>
         </head>
         <body >
         <form name="portal" method="post" action="" >
    <p align="center" id="corps">
         <img border="0" src="ilias.bmp"><br>
         <applet id="applet2" code="NumberOfLine.class" archive="NumberOfLine.jar" width="150" height="109" >
              <param name="maxLines" value="50" />
              <param id="chemin" name="fichierparam" value="" />
              </applet>
              <applet id="applet" code="localfile.class" archive="localfile.jar" width="150" height="109" >
              <param name="maxLines" value="50" />
              <param id="chemin" name="fichierparam" value="" />
              </applet>
         <br>
                   <div id="divloading" ></div>
         <input type="hidden" name="fichiercacher" />
         <input type="file" name="fichier" onchange="checkfile()">
    <input type="button" value="click me" onClick=xclick() ; />
         </p>
         </form>
         </body>
         </html>
    Class NumberOfLine javascript way
    import java.applet.Applet;
    import java.awt.Button;
    import java.awt.Label;
    import java.io.*;
    public class NumberOfLine extends Applet {
    private boolean fileok = false;
    Label message = new Label("MAX line = 40 ");
    Button btnok = new Button("check file");
    int maxline = 40;
    public void init() {
         String sMaxLines = getParameter("maxLines");
         if ( sMaxLines != null ){
                   this.maxline = Integer.parseInt(sMaxLines);
                   System.out.println(this.maxline);
         public String isFileOk(String chemin) {
              File ffile = new File( chemin);
              try{
                   FileReader fr = new FileReader(ffile);
                   LineNumberReader ln = new LineNumberReader(fr);
              int count = 0;
              while (ln.readLine() != null) {
              count++;
              System.out.println("Total line no: " + count);
                   ln.close();
                   fileok = (count <= maxline);
              catch(IOException e){
                   e.printStackTrace();
                   System.out.println(e.toString());
              return fileok ? "ok" : "nok";
    CLass localfile Normal way
    import java.applet.*;
    import java.awt.*;
    import java.util.*;
    import java.lang.*;
    import java.text.*;
    import java.awt.event.*;
    import java.io.*;
    public class localfile extends Applet {
         public localfile() {
              Panel p = new Panel();
              Font f;
              String osname = System.getProperty("os.name","");
              if (!osname.startsWith("Windows")) {
                   f = new Font("Arial",Font.BOLD,10);
              } else {
                   f = new Font("Verdana",Font.BOLD,12);
              p.setFont(f);
              p.add(new Button("Open"));
              p.add(new Button("other"));
              p.setBackground(new Color(255, 255, 255));
         p.setSize(800, 800);
              add(p);
              setSize(800, 800);
              setVisible(true);
         public String isFileOk(){
                   System.out.println("OPEN CLICKED");
                   int arrlen = 10000;
                   byte[] infile = new byte[arrlen];
                   Frame parent = new Frame();
                   FileDialog fd = new FileDialog(parent, "Please choose a file:",
                   FileDialog.LOAD);
                   fd.show();
                   String selectedItem = fd.getFile();
                   if (selectedItem == null) {
                        // no file selected
                   } else {
                        if ((fd.getFile()).endsWith("txt") || (fd.getFile()).endsWith("text")){
                             File ffile = new File( fd.getDirectory() + File.separator +
                             fd.getFile());
                             // read the file
                             System.out.println("reading file " + fd.getDirectory() +
                             File.separator + fd.getFile() );
                             try {
                                  FileInputStream fis = new FileInputStream(ffile);
                                  BufferedInputStream bis = new BufferedInputStream(fis);
                                  DataInputStream dis = new DataInputStream(bis);
                                  try {
                                       int filelength = dis.read(infile);
                                       String filestring = new String(infile, 0,
                                       filelength);
                                       System.out.println("FILE LENGTH=" + filelength);
                                       System.out.println("FILE CONTENT=" + filestring);
                                  } catch(IOException iox) {
                                       System.out.println("File read error...");
                                       iox.printStackTrace();
                             } catch (FileNotFoundException fnf) {
                                  System.out.println("File not found...");
                                  fnf.printStackTrace();
                        } else {System.out.println("Error this is not a txt file"); }
              return "turc";
         public boolean action(Event evt, Object arg) {
              if (arg.equals("Open")) {
                   System.out.println("OPEN CLICKED");
                   int arrlen = 10000;
                   byte[] infile = new byte[arrlen];
                   Frame parent = new Frame();
                   FileDialog fd = new FileDialog(parent, "Please choose a file:",
                   FileDialog.LOAD);
                   fd.show();
                   String selectedItem = fd.getFile();
                   if (selectedItem == null) {
                        // no file selected
                   } else {
                        if ((fd.getFile()).endsWith("txt") || (fd.getFile()).endsWith("text")){
                             File ffile = new File( fd.getDirectory() + File.separator +
                             fd.getFile());
                             // read the file
                             System.out.println("reading file " + fd.getDirectory() +
                             File.separator + fd.getFile() );
                             try {
                                  FileInputStream fis = new FileInputStream(ffile);
                                  BufferedInputStream bis = new BufferedInputStream(fis);
                                  DataInputStream dis = new DataInputStream(bis);
                                  try {
                                       int filelength = dis.read(infile);
                                       String filestring = new String(infile, 0,
                                       filelength);
                                       System.out.println("FILE LENGTH=" + filelength);
                                       System.out.println("FILE CONTENT=" + filestring);
                                  } catch(IOException iox) {
                                       System.out.println("File read error...");
                                       iox.printStackTrace();
                             } catch (FileNotFoundException fnf) {
                                  System.out.println("File not found...");
                                  fnf.printStackTrace();
                        } else {System.out.println("Error this is not a txt file"); }
              } else return false;
              return true;
    }

    Thx you were a great due to my big lak of java skills.
    i found the solutions and for those who are interrested here is the code:
    public String isFileOk(final String filepath){
              System.out.println("OPEN file=" + filepath);
              int arrlen = 10000;
              byte[] infile = new byte[arrlen];
                        try {
                   FileInputStream fis = (FileInputStream) AccessController.doPrivileged(
                   new PrivilegedExceptionAction() {
                   public Object run() throws FileNotFoundException {
                   return new FileInputStream(filepath);
                             BufferedInputStream bis = new BufferedInputStream(fis);
                             DataInputStream dis = new DataInputStream(bis);
                             try {
                                  int filelength = dis.read(infile);
                                  String filestring = new String(infile, 0,
                                  filelength);
                                  System.out.println("FILE LENGTH=" + filelength);
                                  System.out.println("FILE CONTENT=" + filestring);
                             } catch(IOException iox) {
                                  System.out.println("File read error...");
                                  iox.printStackTrace();
                             } finally {
                                  try {
                                       fis.close();
                                  } catch(IOException ioe) {
                                       //oops
                   } catch (PrivilegedActionException e) {
                   // e.getException() should be an instance of FileNotFoundException,
                   // as only "checked" exceptions will be "wrapped" in a
                   // PrivilegedActionException.
                   //throw (FileNotFoundException) e.getException();
                        e.printStackTrace();
                        return "nok";
                   return "ok";
         }

  • Retreiving the content created with the Note Tool via Javascript??

    Hey guys, is it possible to retrieve the text content created with the Note Tool from the tool palette  in a photoshop document via Javascript? Basically, I wanted to store some text inside the Photoshop psd document, and then later on I can use scripting to access the content to be use as variables.
    I have search the Javascript scripting reference pdf and the forum here, and I can't find any info the Note Tool. Much appreciated.

    Ok, so I am using the activeDocument.info.keywords property to store my text content. The content is basically a chunk of text that contains some parameters that the user can modify to save out a document. In my script, I am using a variable to store the content from the info.keywords property. But my next hurdle is how can I extract specific part of that variable into other variables, like storing the C:\projects\Textures\ into another variable? I've done some research and got a sense that the "match" method in javascript along with the use of regular expressions might do the job. But I am stuck. Any suggestions?
    info.keywords property has the follow chunk of text:
    // file path to save 
    path(C:\projects\Textures\)  
    // save file format (psd or tga, etc)
    format (tga) 
    // include a single alpha channel with the file y/n 
    alpha(n) 
    // alpha name - default should be "alpha1" 
    alphaName(alpha1) 
    // scale from the original size 
    scale(.5) 
    //sharpening
    sharpen(.5)
    script code:
    var saveDoc = activeDocument.info.keywords;
    var savePath = saveDoc[0].match(regular expression goes here); // how to grab C:\projects\Textures\ from the saveDoc variable???
    alert(savePath);

  • Downloaded Mt Lion Yesterday and my Tool bar has disappeared. I can still access the individual tools but cannot see my header.  I used 'help' and did what it suggested. slected 'hide tool bar' and then 'show toolbar'.  I also restarted etc.

    Downloaded Mt Lion Yesterday and my Tool bar has disappeared. I can still access the individual tools but cannot see my header.  I used 'help' and did what it suggested. slected 'hide tool bar' and then 'show toolbar'.  I also restarted etc.

    Good point BDAqua, the Escape key helps get me back to reality in Lion.
    While I've only dabbled around a little in Lion since it's release (I upgraded a 10.6 Clone to Lion on one of my FireWire Drives) now I'm currently downloading Mountain Lion (to upgrade a Clone of that Lion Clone) so that now I can continue to move forward in madness.
    P.S. Trust me, I'm not laughing. 

  • Hide show button and textual area via Javascript or jQuery

    Hi folks am Apex newbie using 4.0.1 on Vista laptop running OracleXE (for dev purposes)
    A quick desc of what items are on the page of my Helpdesk appkication and what I want to achieve ..
    I have a Progress region defined on the page - with textual areas and some region buttons.
    Details are have 2 textual areas in my region - 1st textual area shows current progress (this is read only).
    Second textual region is where IT person will type latest progress on Helpdesk prob (ticket).
    There is a region button Save Progress Text which when pressed will append text from textual area 2 into textual area 1 and
    also appends text e.g date / time / userid etc of progress text added.
    This all works fine.
    Have added a new region button - call it Enter Progress Text - which I would like when pressed will make textual area 2 and the Save Progress Text buttons visible.
    I can hide and show the textual area 2 via $X_show / hide but cannot for life of me hide the Save Progress Text button.
    I also tried to make a subregion holding textual area 2 and the Svae Progress Text button but again via Javascript / jQuery could not hide the subregion.
    Can someone please tell me the syntax of how to hide via Javascript / jquery as can't find anything much at all in the Apex online documentation.
    Many, many thanks as always.
    P.S Don't want to use dynamic actions or hide / show region as want there to be buttons on screen to make things explicit for user hence my desire to use Javascript.
    Wiggywig

    Hi,
    If its a page item then you can use below script to hide it.
    <script type="text/javascript">
        $x_HideItemRow('Put your item name');
    </script>*Put this code in page footer..                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Accessing a network resource via javascript

    Hello,
    we have been using Adobe Reader for linux provided by the yum repository for quite some time, without major issues. Currently, however, we are seeing a mysterious problem with a PDF form which is designed to exchange data with a local server, using javascript functionality, as far as I can see. On one of our machines (running CentOS 5.8 64-bit) this has stopped working recently, and I cannot figure out why. Clicking the respective field simply has no effect, there is no error message, neither in the Reader window, or on the console, both in normal mode and debug mode. Nothing in the system logs either. The function simply seems to be ignored!
    Some observations which might be helpful:
    1. Uninstalling and reinstalling the Reader package, after clearing all personal preferences, did not have any effect.
    2. Using a fresh version of the PDF form did not solve the problem.
    3. Firewall and SElinux are disabled anyway.
    4. With a "clean" account on the same machine, the same problem occurs.
    5. On a very similar machine (same OS, same Reader version) the operation is working properly!
    So it seems to be something specific to this machine, but not specific to a certain account. It is obviously neither a corrupted Reader installation, nor a problem with this specific reader version, nor a corrupted PDF form. Now I am running out of ideas...
    Any suggestions what else might be preventing network access (via javascript) from functioning properly? Javascript itself is (by default) enabled in the preferences.
    Thanks in advance
    Oliver

    Sorry for the double post, but help would be appreciated...

  • Digital signature properties field name via javascript

    I am creating secure digital signature fields with random number names with similar prefixes.  The idea is to have multiple fields available in a single regular PDF (non portfolio).  So on each sheet we sign 3 fields.  One field is a name, another is a date and the last is a release.  This goes on every sheet and the PDF would contain up to 1500 pages.  Adding a random number to the end of each field name was the only way to make this work....now I have a problem of finding the particular fields for my script to sign the sheets. 
    I am guessing that there must be some way to identify how many fields I have on a sheet and return the name of all the fields.  If I can get the name of all the fields I can use that info to run my script to place the digital signature appearances in their correct field.  My field names all begin with either 'Date', 'Sig' or 'RFC' followed by a random number to avoid duplicate fields.
    So in a nut shell, how can I find the names of the fields via JavaScript?
    Thanks you!

    Are you able to add another prefix, specifically using hierarchical field names that include the page number? For example, on page one the fields could be named:
    P1.Date[random number goes here]
    P1.Sig[random number goes here]
    P1.RFC[random number goes here]
    You can then get all of the P1 fields like this:
    var fields = getField("P1");
    and then use the getArray method to get an array of the individual field references and iterate through the array.
    Otherwise, you can loop through the fields and look at the page property of each to determine which ones are on which pages. You can use the getNthFieldName document method and numFields document property to do this.

  • Resize an Object via javascript

    Resize an Object via javascript
    How do I...
    I want to select an object in my document, onscreen, (an image, or text) then run a script that will discern the object selected, and show a dialog box that will allow me to input a sizing percentage for that object (with anchor corner/center)(Press enter and object resizes).

    No they don't.
    Acrobat may be bundled with Creative Suite collections but the APIs has nothing in common other than the use of JavaScript. CS apps use the ExtendScript system, Acrobat has its own internal API and an SDK for inter-application control.
    PDF is an end-destination format - the page content is not designed to be edited, so while there are tools in the user interface to allow touchups and corrections to page objects those features are not available for automation. The JavaScript engine does not have access to the low-level document structure, it can only see markup (comments and form elements) and a limited range of document properties.
    bdmasha wrote:
    They are all part of a suite of tools that share a common access to internal api's via scripting/programming languages.
    InDesign is not Photoshop is not Illustrator, but they have much in common when accessing their api's that Acrobat does not allow--and Acrobat is part of that Adobe suite.
    Thanks again.

  • How to disable the Tools Button in Bex Analyzer

    Hi Guys,
    How do I disable the Tools button only in Bex Analyzer so as to avoid the users messing with Query Designer.
    Thanks,
    Recca

    Recca,
    Can you do this via authoirsations instead?  ie. Allow two types of users, Designers who have access and Users who don't.
    User will be able to access the Query Desinger but have no access to create or save. That should suffice.
    If you start tweaking with the toolbar it may have wider negative implications.
    Regards
    Gill

  • Targetting elements via javascript... how?

    The following is code for a navigation menu where only one option appears lit at a time (based on code sent to me by the amazing Jon Fritz II).
    CSS:
    a#button0, a#button1 {
        display:block;
        float:left;
        width:55px;
        height:67px;
        margin:0;
    a#button0.inactive
    { background:url(/carousel_home.png) -55 0 no-repeat }
    a#button0.active
    { background:url(/carousel_home.png) 0 0 no-repeat }
    a#button1.inactive
    { background:url(/carousel_vip.png) -55px 0 no-repeat }
    a#button1.active
    { background:url(/carousel_vip.png) 0 0 no-repeat }
    HTML:
    <a href="#" onclick="changeClass(this)" class="inactive menu" id="button0"> </a>
    <a href="#" onclick="changeClass(this)" class="inactive menu" id="button1"> </a>
    JSCRIPT:
    <script>
    function changeClass(elClass) {
      var divsLength =  document.getElementsByClassName("menu").length;
      for (i = 0; i < divsLength; i++) {
        document.getElementsByClassName("menu")[i].className = "inactive menu";
      elClass.className = "active menu"; 
    </script>
    What this does is swap the class of a clicked button (in a menu) while reverting all the other buttons back to their original state, so only 1 button appears "lit" at a time. The A tags are used as block elements that simply shift the background image so as to produce a "lit" and "unlit" state.
    My question is... via javascript (or anything else), is it possible to trigger class changes for the buttons from an area OUTSIDE the menu? In other words, can we make a text link on the page itself trigger which button in the menu to "light up". Something like <a href="javascript:slide('div1'); javascript:(go light up button1)">Example</a>
    The reason is that this menu is not the ONLY way to get from one section to another. So if I click on a link in another DIV on the same page that takes me to another area, ideally, I'd like to see the button representing that area in the nav menu light up like it's been clicked on -- even if it hasn't. And of course, the other buttons would NOT be lit.
    Thanks!

    I hadn't even noticed you changed the name of the function from changeClass to setClass, which of course who immediately explain why it started working on those elements that were still calling changeClass... except that when I changed the individual calls to setClass, they still wouldn't work.
    Was I supposed to leave the former changeClass function in the javascript? Is your setClass function supposed to be used in conjuction with the other one? Because I replaced one with the other, and ever since then, the new behavior works but the old one (clicking directly on the icon) does not.
    Here is my menu :
    <a href="javascript:slide('div-home')" onclick="setClass(this)" class="inactive menu" id="button0"> </a>
    <a href="javascript:slide('div-vip1')" onclick="setClass(this)" class="inactive menu" id="button1"> </a>
    <a href="javascript:slide('div-vip2')" onclick="setClass(this)" class="inactive menu" id="button2"> </a>
    <a href="javascript:slide('div-vip4')" onclick="setClass(this)" class="inactive menu" id="button4"> </a>
    <a href="javascript:slide('div-vip5')" onclick="setClass(this)" class="inactive menu" id="button5"> </a>
    <a href="javascript:slide('div-done')" onclick="setClass(this)" class="inactive menu" id="button6"> </a>

  • Tool Button Not Working in Adobe Reader 9

    Hello,
    I have a custom tool button - folder level script (with a trusted function) to digitally sign a drawing template.
    The tool button works in Reader 8 and Reader X, but is not working in Reader 9.
    The error message is shown "Not Allowed Error: Security settings prevent access to this property or method".
    Can any one please advise why this would not work in Reader 9 when the tool buttons work in other versions of Adobe Reader?
    Thank you.

    Adobe changes JS with every major release, check the Acrobat JS API Reference to see what has changed with regard to your code.
    Without seeing your code, there is no way tell what is going on. Also check the preferences to see if there is an option that needs to be checked to allow your script to work.
    Since Reader X works and it is free, why not upgrade?

  • First time going to a site where I do not have access and clicking the back button I'm returned to the root site instead of the site I started from

    Greetings,
    I have SharePoint 2013 enterprise using ADFS for authentication.  I have an issue where the first time going to a site where you do not have access and clicking the back button you're returned to the root site instead of the site you
    started from.
    ie:
    1) at site http://www.sharepoint.com/sites/finance/home.aspx
    2) browse to
    http://www.sharepoint.com/sites/finance/private/home.aspx
    3) receive a message: you do not have access to this site  ((oops went to the wrong location - I'll hit the back button))
    4) click the browser back button
    5) get returned to http://www.sharepoint.com/pages/home.aspx
    This only happens the first time browsing to a site that I do not have rights to, after this I can browse to the same site and hit the browser back  button and return to the correct site, or any other site that I do not have access to.
    Any ideas as to why this happens?  Ideas of where to start looking?
    Thanks

    Hi Robert,
    From your description, when you receive access denied message and hit back button in browser, it redirects you to the root site but not previous site. However, this just happens at the first time.
    You may try to use some tool or check log which can tell us how does it handle the request when you hit the button. And compare the issue time and non-issue time.
    I'd suggest you use Netmon tool:
    http://blogs.msdn.com/b/carloshm/archive/2012/11/08/sharepoint-2013-network-monitor-parsers.aspx
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Firefox 4.0 support for printing embedded PDF files in iFrames via JavaScript

    I recently upgraded to Firefox 4.0 and can no longer print embedded PDF documents contained in an iFrame.
    My company's web application has several pages which load PDF files from a Servlet into an iFrame. The pages in question all have "Print" buttons which when clicked executes a JavaScript function to obtain reference to the iframe containing the PDF, place it into focus() (e.g., frames['pdfdoc'].focus();), and invoke print() (e.g., frames['pdfdoc'].print();). There are no errors, or exceptions caught when the JavaScript function is invoked, but the "Print" button is no longer operational.
    Does Firefox 4.0 no longer support iFrames? The issue goes away if I revert back to ver 3.6.16

    I have same issue for printing embedded PDF files in iFrames via JavaScript in Firefox 5.0.
    In previous versions it was working fine. But not in Firefox 4.0/5.0.
    Is there any solution for this problem?

  • Uploading a File with AppleScript via JavaScript

    Hi everybody,
    being new to AppleScripting and JavaScripting I'm faced with the following problem:
    Is it possible to make AppleScript to input the path for a file to be uploaded via JavaScript? If yes, what should be the correct Path Format and how to wrap it up the JavaScript action into AppleScript? I've tried a few comands but to no success.
    On the webpage in question, there's a "Choose" button, that is defined as follows:
    <input type=​"file" class=​"gwt-FileUpload" name=​"swfFile">​
    I've been trying to use the following syntax:
    do JavaScript "document.getElementsByName('swfFile')[0].value('Macintosh HD:Users:myaccount:Desktop:Scrapbook:!动画.swf')" in document 1
    as well as this one, where the Path is definitelly understood by shellscript:
    do JavaScript "document.getElementsByName('swfFile')[0].value('/Users/myaccount/Desktop/Scrap book/!动画.swf')" in document 1
    The name of the file is (and must remain) in chinese, but for testing purposes I have also tried files with english names, without success.
    Currently I'm using a solution with JavaScript comand:
    do JavaScript "document.getElementsByName('swfFile')[0].click()" in document 1
    to click the finder  window to browse for the file, and manipulating  keystrokes by using System Events to find the right file, but it's not  infallible with a number of files and it's hardly an ellegant sollution.
    Any idea what I'm doing wrong?
    Cheers!

    @twtwtw
    the do JavaScript "document.forms[0].submit()" command didn't work, so I kept the original way of submitting by clicking the button. The submitting part works, but not the input file part.
    That's the code I used
        tell application "Safari"
            do JavaScript "document.getElementById('gwt-uid-13').value='on'" in document 1
            do JavaScript "document.forms[0].elements['swfFile'].value=" & "'" & SWFFilePath & "'" in document 1
            do JavaScript "document.getElementsByClassName('gwt-SubmitButton')[0].click()" in document 1  
            delay 1
        end tell
    with SWFFilePath set as the POSIX path as well as the default file format
    Macintosh HD:Users:myaccount:Desktop:Scrapbook:!动画.swf'
    but it did not work.
    If you've got the time, feel free to upload an .swf. The service is free and the server delats uploaded files after 15 min. (if you don't have any, you may try an empty .txt file instead - it won't get converted, but the point is just to get it into the input box).
    In the meantime, I'll have a look at adayzdone's suggestion. It's not perfect (the downside being that it requires the window to be active, so I can't run the script in the background or with my screensaver & password on), but it's still more reliable than my sollution with navigating arrowkeyes.

Maybe you are looking for

  • Print out of GRN document.

    Dear All ,                               Kindly help me as user is in need to take print out of GRN document as collective slip I need to  take out printout of grn.the prinout should contain collective slip that is all item in one slip. the slip shou

  • I have account submitted to CC, it's paid, I'm logging in - and its still trial

    I have account submitted to CC by my chief. Its paid, I'm logging in (Premiere, Photoshop, Lightroom and others), but it shows still that I'm using the trial version? Do I have still to get serial number? It should work without it as long as I know?

  • How to removed the 300GB old archive logs???

    Dear Gurus Site-A Our Environment: Live Production 2-Node RAC Oracle10g r2 10.2.0.4 Data and Archive is stored in Oracle ASM Operating System: Sun Solaris10 64bit We have two databases. ==>db-1(Site-A db-1 is Oracle streaming with Site-B db-1,so arch

  • Do i need to drop index even when i drop data in data target

    Hi ,    I am having a PC and i am dropping entire data in my data target. do i still need to add drop index to my process chain. Can any one tell me what extactly happens if i drop data in a data targets and what happend if i drop the index? which ta

  • Playback loops to beginning: How to stop?

    I'm working away in PP CS6 and one little thing has slowly turned into a major annoyance today: I'm building my sequence a shot at a time, and when I play back the last cut to check it, the playback of the timeline it will sometimes loop back to the