Using AppleScript "execute" command in Acrobat

Acrobat's scripting dictionary has a cryptic description of an "execute" command that is supposed to execute a menu item "as if a user clicked it".
No information is given as to how to identify the desired menu command except "reference". Huh? Is there documentation or a tutorial on this anywhere?
Related question, how can AppleScript identify auxiliary windows such as the Document Properties window and its various button bar items and other fields?
Here's one simple thing I'm trying to accomplish: I'm using System Events to script some items like keywords in the Document Properties window. Sometimes it takes several seconds for a document to open. Without putting in huge wait loops, I'd like to execute the menu item "File: Properties..." and then wait for the window to open using a loop like this:
repeat until exists <some way to identify the Document Properties window>
end repeat
Any hope of doing stuff like this? I already tore out enough hair trying to get AppleScript's "do script" command to work (only lately having discovered that the script file apparently must be plain text, no Unicode).

The Macintosh keyboard does not have a true "Enter" key any more - not on the MacBook Pro or the iBooks. Modifier keys do not seem to work either. I've turned on the System Prefs > Keyboard & made it appear in the top Menu Bar. From this menu choose "Show Keyboard Viewer" to see how keys + Return are displayed. Only the Function key changes the Return key. Function + Delete is a forward delete. But Function + Return is just another Return. So any highlighted text is deleted! Command + Return stays on the same line and selected text remains. I will try KeyRemap4MacBook utility then consider buying a USB numeric keypad. Urggh.

Similar Messages

  • Problem in using JDBC Execute commands(Update & Delete Only) with af:Table

    HI Everyone,
    I have one issue with Updating and Deleting Row Data using JDBC Execute commands.
    Suppose In My Application i have two pages, in Page 1 I have Two Command Buttons(Delete and Save) and One Input TextBox to write the String to be stored in the Database. and Page 2 where the result Table is shown and table is binded with a ViewObject, Now When User Types some String in InTB and click Save then By Programmatically I'm searching, that string is already present in database or not, if it is already exist then Save button converts in Update button and instead of inserting it allows user to Update the String already exist in database.
    Everything is working fine but the problem comes when i put those all buttons on the same page where result table is present.After putting all things on the same page and When i click save button to insert new String it is Successfully inserting but when any of other action is performed like updating or Deleting the existing one.. then my application just hanged and then nothing I able to do.
    Please Help me to understand this problem and give me the solution for this..
    Thanks
    Fizzz...

    Hi frank,
    Thanks to reply me...
    I'm refreshing table's iterator on each command button's action to reflect the changed result... and i'm sorry i mentioned two pages in my project.. actually these are two forms in the same page..which conditionally changed its renderer properties.. its working fine when only one form is renderred and the otherside when both are rendered then it is not working.
    Hope this change will help you to understand the problem.. if something else you are looking for then please tell me..
    Thanks
    Fizzz...

  • Which user is used to execute command defined in File Adapter?

    Hello,
    in my receiver file adapter I specified a OS command to be executed after message processing. However this command doesn't get executed. After investigation I figure out that it's because the user that is used to executed the command does not have enough authorization to run the program (It's a unix system).
    So anyone knows which user is used to execute the command? Or anyone know how to go around this security issue with OS command in Unix system?
    Thanks
    Eric

    Hi,
    As Bhavesh replied you earlier the OS command is executed by the user <sid>adm in Unix or SAPService<SID> in windows.
    Do check the note 841704 - XI File & JDBC Adapter: Operating system command.
    From Note 841704
    Also note that the command is run as user "<sid>adm" (Unix) / "SAPService<SID>" (Windows).
    Thanks
    SaNv...

  • How do I use AppleScript keystroke command as a speakable item?

    I am attempting to do what I thought was a rather simple task, but have not had success.
    I would like to use the following script as a voice command to speak selected text in a file, opened for example by Preview, when the key is pressed.
    tell application "System Events" to keystroke "." using control down
    I have placed the script application in the System Preferences, Speech, Speakable Items Folder.  The item is being recognized; however, it appears that it is not functioning in the correct window context.  I would like this to work regardless of the application text (hence the Text to Speech option).  How do I set this up before the keystroke command in the script?
    As an aside, is there a way to convert a script file to a SpeakableItems.app document file?

    I am not sure if this is what you are looking for.
    But have you saved the below workflow as a Service and use a keyboad shortcut?
    I have this as a Service and my keyboard short cut is Command-Shift T.
    Once I select a paragraph in Preview and press the short cut it speaks the text for me.
    Maybe you already thought of this. But here you go.

  • Using Applescript to execute a Terminal command

    I've looked at the possible answers that come up when I ask this question here, but none really fit my question.
    I want to automate the Terminal command that cleans out obsolete entries in my right-click "Open with" menu, which I have to do often. Rather than copying the command each time I want it, then opening Terminal, pasting it in, etc., is there a way to automate this with Applescript?  Thanks!

    Thanks for the fast reply, Niel. I understand this is a newbie Applescript question, but over the years I have just never used Applescript and other than this one thing, probably won't again.  So rather than take hours to learn it, I hope you don't mind the additional question regarding this.  Do I just put the following into the main Applescript editor?
    do shell script "ls -l ~"
    /System/Library/Frameworks/CoreServices.framework//Versions/A/\
    Frameworks/LaunchServices.framework/Versions/A/Support/lsregister \
    -kill -r -domain local -domain user;
    killall Finder

  • Terminal Commands Using AppleScript

    Hi,
    I have some AppleScripts that access Terminal to send some commands to an Arduino.
    I'm hoping there's a way to keep Terminal from opening a new window each time
    I access it with a command?
    Thanks,
    Carl

    Are you using "do shell script" to execute your commands?  The "do shell script" does NOT open a terminal window.
    The Terminal does not execute commands, it is just a viewing device and keyboard handler for humans.  The Terminal just passes your keyboard input the the shell and/or programs you run from the shell, and displays what the shell and programs run from the shell return.
    The Terminal itself is not needed to run Unix commands.  The "do shell scrpt" is one way to execute commands without the need for the Terminal.

  • To find whether a form using HOST (Unix) command to exit/execute a process.

    Hi all,
    I have some(Little bit) knowledge on forms.But here I got one requirement which was confusing me .The requirement is ,we have nearly 70 custom forms developed
    using TEMPLATE.fmb.Now I have to open each and every form and have to check whether that form is using any HOST (unix) command to exit to the shell and
    execute a process .I never got this type of requirement previously .Can any one help in how to search for those commands ,I.e is there any standard to use Unix call in
    particular trigger or etc..
    Thanks in advance .
    Regards,
    Gopi.CH

    Your question is a little unclear. The "HOST" command is an Oracle Forms built-in command which allows you to execute OS commands. So the only part of it that belongs to forms is the part that looks like HOST(). The contents within the parentheses would be the command you wanted to execute. For example:
    HOST('/path/to/your/script.sh');Refer to the Forms Builder online help for more information about how to use the HOST command.

  • Executing batch files from websevice using ODI OS Command

    Hi,
    Is it possible to execute the batch files using odi os command from webservices.
    We have developed a webservice, which passess some parameters to one batch file and after that we executing the same batch file in package using odi os command. In opeartor is showing as running, it never ends.
    But if we run the same package from designer, it is executing successfully. Also the same web service is working fine for executing non batch scenarios.
    what could be the problem??
    We got one possible reason for failure...
    For executing the batch from web services, we need read and executable permissions on the drive where batch sits.
    We are logging into ODI using SUPERVISOR. How to give the permissions to SUPERVISOR as we are having windows authentication.
    Edited by: Naveen Suram on Dec 17, 2009 8:07 PM
    As a work around, can we use ODIOSCommand instead of OS Command. But it is asking for starting event? Whether both the commands does the same functionality??
    Edited by: Naveen Suram on Dec 17, 2009 9:08 PM

    From the FAQ:
    2. How do you launch an external program on a Microsoft Windows platform from a program developed on the Java [tm] programming language?
    The following will launch notepad in Microsoft Windows NT:
    Runtime.getRuntime().exec("cmd /c notepad.exe");
    To launch a program in Microsoft Windows 95/98 use:
    Runtime.getRuntime().exec("c:\\windows\\notepad.exe");
    The Runtime class allows interaction between a program and its environment. The first string command instructs the command line interpretor, cmd to open up the calculator application.
    The exec() methods do not use a shell; any arguments must have the full pathname to the shell as well as the command itself.
    For example, to run a shell on the UNIX� platform, type:
    Runtime rt = Runtime.getRuntime();
    Process p = rt.exec("/usr/bin/sh -c date");
    To run a batch file under Microsoft Windows 95/98:
    Process p = rt.exec("command.com /c c:\\mydir\\myfile.bat");
    To run a batch file under Microsoft Windows NT:
    Process p = rt.exec("cmd /c c:\\mydir\\myfile.bat");
    where 'cmd' and 'command.com' are the command-line interpreters for Microsoft Windows machines.
    The Runtime.exec() methods might not work effectively for some processes on certain platforms. Special care should be taken with native windowing, daemon, WIN16/DOS process or some shell scripts.
    regards,
    jarshe

  • Could not execute command "getState" for server server01 using nodemanager

    Hi,
    I have built a weblogic 9.1 env with 2 managed servers running on different boxes from the admin server.
    I am having problems in starting the managed servers using the nodemanager. I get the following error message in the Admin server log:
    <Error> <NodeManager> <BEA-300034> <Could not execute command "getState" for server "******" using the node manager. Reason: I/O error while reading domain directory: java.io.FileNotFoundException: Domain directory '/opt/bea/weblogic91/common/nodemanager' invalid (domain salt file not found).>
    I get the following message on the admin console:
    For server ******, the Node Manager associated with machine ******-machine is not reachable.
    All of the servers selected are currently in a state which is incompatible with this operation or are not associated with a running Node Manager. No action will be performed.
    I can start the managed server using the "startMangedWeblogic.sh" without any issues.
    Any help on this would be greatly appreciated.
    Thanks

    one more thing to add:
    I get the following error in the Managed server log:
    <I/O error while reading domain directory: java.io.FileNotFoundException: Domain directory '/opt/bea/weblogic91/common/nodemanager' invalid (domain salt file not found)>
    java.io.FileNotFoundException: Domain directory '/opt/bea/weblogic91/common/nodemanager' invalid (domain salt file not found)
    at weblogic.nodemanager.server.DomainManager.initialize(DomainManager.java:74)
    at weblogic.nodemanager.server.DomainManager.<init>(DomainManager.java:46)
    at weblogic.nodemanager.server.NMServer.getDomainManager(NMServer.java:239)
    at weblogic.nodemanager.server.Handler.handleDomain(Handler.java:170)
    at weblogic.nodemanager.server.Handler.handleCommand(Handler.java:104)
    at weblogic.nodemanager.server.Handler.run(Handler.java:64)
    at java.lang.Thread.run(Thread.java:595)

  • Acrobat X, using applescript, how do I open the 'Header & Footer'  panel

    G'day from Oz.
    We badly want to update to the CS6 suite, but using the trial version of Acrobat X, I can't find a way of opening the 'Add Header & Footer' dialog panel with applescript. We must add a barcode to pdf's, which was relatively simple using Acrobat 9.
    Anyone know a way to do this please?

    I have been bumping up against this issue in the last few days. I have redone my output as PDF and that works OK - i.e. There are no Safari footer details on the AirPrint printed page.
    But now I find that PDF documents frequently print with white space bands across the page (chopping off some of the text). I can even replicate this when pinch zooming on my iPad with a PDF document. So I suspect a bug in the PDF processing functionality within IOS. I am running IOS 4.3 so I had better update to see if the issue goes away.

  • How I can access "Convert Colors..." button in Adobe Acrobat XI using applescript, or add this button to menu bar?

    Hi, I'm writing applescript to automate Adobe Acrobat XI, I'm missing only one line of code - opening dialog window of "Convert Colors..." tool. It was easy in Acrobat 9 but some reason it's complicated in Acrobat XI.
    Is there an option to add "Convert Colors..." as menu item into menu bar?

    Thanks Gilad D. I created JS file with simple code
    app.addMenuItem({cName:"Convert Colors", cParent:"View", cExec:'app.execMenuItem("ColorConversionMenuItem");'});
    and I added it into acrobat (USER/Library/Application Support/Adobe/Acrobat/11.0/JavaScripts/).
    I enabled menu items JavaScript execution privileges in Acrobat Preferences.
    Now I can open "Convert Colors" from main menu bar, and create applescript which do the same.

  • Using continuation character in EXECUTE command

    In SQL*Plus, the following sample EXECUTE command works fine
    EXECUTE MyProcedure(arg1, arg2)
    But if I try to break it into two lines:
    EXECUTE MyProcedure(arg1, -
    arg2)
    I get a character to number conversion error ORA-06502
    Both of the arguments are of VARCHAR2 type.
    I thought the hyphen character was supposed to let you continue a command on more than one line. How can I break up this command?

    The EXECUTE works with SQL*Plus and does not work from within SqlDeveloper
    The contents of the procedure, which is part of a package, seems to be irrelevant since the problem occurs even with an empty procedure body (just a NULL; statement).
    My platform is Windows2000. Database version is 11g. SQLDeveloper version is 1.2.1
    To reiterate, when I type on command line in SqlPlus there is no problem, when I run it from a script file from within SqlPlus there is not problem. The problem occurs only from within SqlDeveloper. Replacing the EXECUTE command with an anonymous block does work in either environment.
    It is difficult for me to show exactly what is in the called procedure since the machine it is running on is not connected to the internet and would require retyping the whole procedure out here -- that's why I tried the experiment with the NULL body with the exact same results as with the non NULL body.
    Message was edited by:
    user556531

  • Having trouble using applescript to save pdf as excel spreadsheet

    I have been trying to use applescript to create an automator action to convert some downloaded PDF's to .xlsx format.  After reviewing a good bit of the SDK documentation, I came up with the following scripting:
    tell application "Adobe Acrobat Pro"
                                  open theFile
                                  save front document to file theNewFile using conversion "com.adobe.acrobat.xlsx"
      close front document
    end tell
    This script works fine when I use the "com.adobe.acrobat.plain-text" conversion or the png or jpeg conversion. However, I cannot get it to work with "com.adobe.acrobat.xlsx" or "com.adobe.acrobat.spreadsheet".  Note that although I didn't copy the code here that sets theNewFile variable, I have been changing it to the appropriate file extension when changing conversion strings.
    When I execute the script using one of the problem conversion strings, Acrobat opens the file successfully, but it just sits there, as if it does not understand the save command at all.
    I guess I should mention that the whole goal here is to actually convert the PDF's to CSV eventually.  The next step was going to be to open the file in Excel and save as CSV.  If anyone knows a *free* way to go straight from PDF to CSV using Applescript/Automator without having to go through all these other programs, I would be very appreciative for the suggestion.  This conversion is just a small part of a very lengthy workflow but it is causing me the most trouble.

    Hello Jonathan,
    Ok i have only one final question.
    Do you know how to work in photoshop, don't you? Ok i think yes.
    Well i have 2 ways to do that, i did one action from photoshop that will get the image inside folder and will convert this image in pdf. Abouve the line of script
    that you have to attach to folder action and the action for Photoshop.
    About the action for Photoshop give me your email address and I send you, or do it your self. You have to do this: open one image in JPG, go to action, go new set, put your name of set, put the name of action if you like you can change the name, go print with preview, print and set save as PDF close your file and stop the action.
    Now that you have to do is put all your files inside your folder and leave the Photoshop do it for you, ok?
    Good Luck
    Hack
    property speak_alert : false -- if true, the script will speak the alert. If false, the script will display an alert dialog
    property dialog_timeout : 30 -- set the amount of time before dialogs auto-answer.
    property copychecksindicator : false
    property itemcheck_delaytime : 2
    property foldercheck_delaytime : 3
    property speciallabelindex : 7
    on adding folder items to this_folder after receiving added_items
    if copychecksindicator is true then
    set the added_items to my checkaddeditems(the added_items)
    if the added_items is {} then return "no vaild items"
    end if
    tell application "Finder"
    activate
    set this_folder to choose folder with prompt "pdf"
    set these_files to every file of folder this_folder
    end tell
    tell application "Finder"
    repeat with i from 1 to number of items in these_files
    set this_path to (item i of these_files) as string
    tell application "Adobe Photoshop CS2"
    launch
    open file (this_path as string)
    set this_files to current document
    do action "Jpg" from "Jpg para Pdf"
    end tell
    end repeat
    end tell
    end adding folder items to

  • AppleScripting unix commands appears to break in ARD 3.5.

    AppleScripts that involve drawing information using the "execute" unix command task appear to be broken in Apple Remote Desktop 3.5.x. Attempting to execute the command results in a "variable not defined" error.
    tell application "Remote Desktop"
              set sel to the selection
              repeat with s in sel
                        set ux to make new send unix command task with properties {script:"users", showing output:false, user:"root"}
                        set myUx to execute ux on s
                        return myUx
              end repeat
    end tell
    Result:
    error "The variable myUx is not defined." number -2753 from "myUx"
    This might be related to the previously reported issue involving reports, as documented here, because downgrading to ARD 3.4 seems to fix the issue. The instuctions for effectively downgrading as written by the user cathy fasano worked for me. However, this is only a workaround that forces you to use a version of ARD that may or may not work with Lion clients or on Lion systems.
    Under ARD 3.4, the script returns something similar to
    {status:"Succeeded on all", computerStatuses:{{|id|:"(computer ID number)", results:"(username)", output:"(username)", address:"(ip address)"}}}
    Is anyone else suffering?

    It appears the new 3.5.1 update, which claims to fix reporting, does not address this issue.

  • Using unix 'diff' command to publish iweb to non .mac server

    It is a common problem that you can't upload incremental changes to a website a web server that is not a .mac. Recently I found that the unix (shell) 'diff -qr' works nicely for this.
    However I can't seem to get this to work in automator. That is where I need some help.
    What I did :
    I have an iweb website in my directory
    Documents/website
    I made a second directory where I store my uploaded version of the website:
    Documents/websiteonserver
    Using a shell script I want to compare the differences between these two directories using the diff command in a shell script. When I run 'diff -qr websiteonserver website' in a terminal window, it gives a nice overview of which files are changed and which ones are new. When workin with iWeb this saves me a lot of time uploading my homepage to a non .mac server. I can only upload the changed files, which is usually only a few. Diff does not look at timestamps (which are useless in the iweb case) but it actually looks into a file and with the -q option it stops when it finds a difference. With the -r added (-qr) it also looks through all subdirectories and compares files with the same name.
    I like to automate this process so that my wife can update our family homepage with just one mouseclick (or as few as possible)
    Unfortunately the diff command in automator gives an error, and there's no info on why it does this.
    The commands I gave:
    cd Documents
    diff -qr websiteonserver website
    (using PWD i verified that the path is correct like this). The only stumbling block for automator seems to be the diff command. Anybody any suggestions on this?
    The next challenge is to take the diff output and use that to upload only changed/new files to a ftp server.
    Any help / ideas are welcome
    Greetings,
    Adriaan

    Dear Cyclosaurus,
    I used a single command as us specified. It really helped to add the path to the directories I wanted to compare. So now at least I got it two work partly:
    It seems to work only if I compare two files. Comparing directories still does not work. Maybe diff generates some kind of error code when doing this??? It does not do that in the shell.
    If I compare all files in directories + subdirectories , the workflow does not work. It seems as if it only accepts a single output line or so from the diff function. If there is more output (or maybe some newline character) the workflow halts. Very peculiar.
    mmm.... I will try to make a shell script which I can run in automator. In the script file I will then generate a txt file. Then the automator can run the script and then it can open the resulting file in a text editor. See if that works.
    mmm nope. I made a script like this:
    #!/bin/bash
    diff -qr ~/Documents/websiteon_theserver/ ~/Documents/website/ > ~/Documents/logfile.txt
    I modified the atributes to executable and I could run it from the command line. The logfile.txt was created and has the correct info. I could not run it from automator...
    I did copy the last line from the script into automator. And also there it does create the logfile, but the automator still says there was an error and stops.
    maybe I should try Applescript, were it not that I am totally clueless on that language...

Maybe you are looking for