Applescript: How to start an application with parameters

AppleScripters,
I am sorry if I have posted this in the inappropriate forum, I saw none with a specific regard to AppleScript.
Let us presume that we have a regular shell script which when initiated from the Terminal has code such as what follows hereupon:
/Applications/SeaMonkey.app/Contents/MacOS/seamonkey -editor /Users/joebuffoon/myhomepage.htm
In order to convert this to AppleScript I was told to use:
activate application "Seamonkey"
This works, but seems not to support the ability to either provision the "-editor" argument (such argument would impel Seamonkey to start in "composer mode"), nor does it seem to provision the allowance of supplying a file to open in "composer mode" as the aforementioned command line in my shell script would.
Can I ask if anyone has any idea how I can do this in AppleScript?
I am also interested to find a good book on Apple Scripting (preferably one available in PDF format as well, if possible).
Thanks in advance,
Stuart

I saw none with a specific regard to AppleScript
http://discussions.apple.com/forum.jspa?forumID=724

Similar Messages

  • How to start an application with parameters

    AppleScripters,
    Let us presume that we have a regular shell script which when initiated from the Terminal has code such as what follows hereupon:
    /Applications/SeaMonkey.app/Contents/MacOS/seamonkey -editor /Users/joebuffoon/myhomepage.htm
    In order to convert this to AppleScript I was told by an associate to use:
    activate application "Seamonkey"
    This works, but seems not to support the ability to either provision the "-editor" argument (such argument would impel Seamonkey to start in "composer mode"), nor does it seem to provision the allowance of supplying a file to open in "composer mode" as the aforementioned command line in my shell script would.
    Thus, my query is if anyone has any idea how I can do this in AppleScript?
    I am also interested to find a good book on Apple Scripting (preferably one available in PDF format as well, if possible).
    Thanks in advance,
    Stuart

    I've had success with the script below, tested using SeaMonkey version 2.0b1 and Mac OS 10.4.11. It may or may not work with earlier versions of SeaMonkey, however, as the new beta version features UI changes.
    No browser window will open as long as SeaMonkey > Preferences > Appearance is set to open Composer exclusively at startup.
    Be advised that the script is meant to run slowly and might appear to be hanging when such is not the case. Adjusting delay times would be key if the script does fail at any point, however. Good luck.
    +Copy the block of code below and paste it into your AppleScript Script Editor:+
    *tell application "SeaMonkey" to activate*
    *delay 4 -- four-second delay; increase if necessary*
    *tell application "System Events"*
    *tell process "SeaMonkey"*
    *if not (exists window "untitled - Composer") then*
    *key code 21 using command down -- makes new window if necessary ("Command + 4")*
    *end if*
    *delay 2 -- increase if necessary*
    *keystroke "o" using command down -- "Open File…"*
    *delay 2 -- increase if necessary*
    *keystroke tab using shift down*
    *keystroke tab using shift down -- brings focus to text field for file search*
    *keystroke "File Name" -- enters file name (you must replace text within quotes with actual file name)*
    *key code 47 -- enters "dot"*
    *keystroke "html" -- enters extension*
    *delay 10 -- ten-second delay could be MININUM; increase if necessary*
    *keystroke tab*
    *keystroke tab -- brings focus to scroll area*
    *key code 125 -- presses down arrow to highlight specified file*
    *keystroke return -- presses "Open"*
    *end tell*
    *end tell*

  • How to start a application with a login window?

    hi there
    does anyone have any idea on how to start an application with a login window? a login window is the first frame or window to be displayed when an application starts running. and only correct login id and password have been entered the real application will start. any sample out there? thank you.

    You can start a new thread by making a thread object and passing it an implementation of a runnable object. Runnable has just one method, public void run(), this is was gets executed in a second thread. perhaps the code you would use would look something like this.
    <code>
    // set up thread for login window
    new Thread(new Runnable() {
    public void run() {
    // construct your login window here
    // when you are done processing the
    // password....
    if(goodPassword) {
    authorized = true; // a global variable
    notifyAll(); // don't forget this
    else {
    System.exit(42);
    }).start();
    // control does not stop this code gets executed while
    // the above thread is running.
    // Set up main program here. This is done in the
    // backround.
    while(!authorized) {
    synchronized(this)
    { wait(50); }
    // now when the user logs in this frame pops
    // up real quick.
    myFrame.setVisible(true);
    </code>
    Hope you can figure it out.. good luck :)

  • Is it possible to start an application with parameters

    Hello together,
    I have written an application which is stored on a network. People from different computer start it to work with it. Now I have the problem, that I need some different configurations on each computer.
    Is it possible to start a labview application with parameters, like: application.exe -User_1
    The application should check the parametes and should switch to the needed configuration.
    Thanks a lot and best regards,
    Michael
    Solved!
    Go to Solution.

    Hi Michael,
    yes it is possible. First you have to activate the data transfer of your parameters. You can do it in the application builder. It is something like "send command line parameters to exe" which you have to activate. You will get the parameter in your program with the property "App.Args". It is an array with the exe name as the first element and one entry for each additional linked parameter.
    Hope it helps.
    Mike

  • Starting AIR application with parameters

    Hi all
    Is it possible to pass the parameters to the AIR application?
    Something like:
    myapp.air param1 param2
    If yes, how can I get those parameters inside the
    application?

    I actually want to post this link:
    http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=4&postI d=8003
    -ted

  • How to call PDF Report with parameters in jdeveloper 10.1.3

    Hi all,
    how to call PDF Report with parameters in jdeveloper 10.1.3
    for example I have Report name is repdept.pdf with parameter as deptno
    and I want call this Report from JSP page ?
    thanks
    frank

    Hi all,
    how to call PDF Report with parameters in jdeveloper 10.1.3
    for example I have Report name is repdept.pdf with parameter as deptno
    and I want call this Report from JSP page ?
    thanks
    frank

  • Examples of 'calling a web dynpro application with parameters'

    Hi!!
    I'm I have been watching manual 'Web dynpro for abap: advanced concepts' in the sections 'url parameters' and 'calling a web dynpro application with parameters'.
    Is there some example where these terms are seen.
    Thanks in advance.

    Hi Ana,
    a window inbound plug can have parameters.
    These parameters are automatically fished out of the URL by the framework.
    So your inbound plug handler method has easy access to the parameters.
    URL
    http://<host>:port/sap/bc/webdynpro/sap/<your application>?param1=xyz&param2=abc
    The application is configured to call an inbound interface(window) and plug.
    The plug can be declared with parameters.
    Double click on window inbound plug and add your parameters.
    The parameters are made available by framework if present in Launch URL.
    You can also call an application that has parameters  directly entered on the parameters tab.
    ie Parameters can be part of the application launch.
    regards
    Phil

  • How to download the application with my apple ID

    how to download the application with my apple ID

    What have you tried or are you asking how to do it from scratch?
    https://itunes.apple.com/us/app/apple-store/id375380948?mt=8

  • How to start java applet with netbeans 6.1

    hey,
    I want to learn how to start java applet (with database) with netbeans.. I'm new to java...can you show me how can i start..if you have any doc about it can you send it to me..thank you..:)

    You really should be asking this NetBeans question at the NB site - these forums are for Java language topics, not NB support.
    [http://www.netbeans.org/kb/61/web/applets.html]
    Almost any NB question you have can be answered by either the NB web documentation or the NB program's Help.

  • How to deploy cairngorm application with FTP support?

    Hi,
    I have a cairngorm application, it works fine in my local
    computer.
    But I need to upload it to a website in my web hosting
    company with FTP,
    but it doesn't work in the hosting server because I can not
    add the cairngorm.swc file to the application.
    Please give me a idea how to deploy the application with ftp
    software.
    Thanks a lot
    Mark

    Any opinions are welcome

  • How I can create view with parameters?

    I have very big query (2000 rows) and 2 parameters.
    How I can create view with parameters?

    If I use this small part of my query than I have error :
    java.lang.NullPointerException
         at oracle.javatools.db.ora.OracleSQLQueryBuilder.buildQuery(OracleSQLQueryBuilder.java:199)
         at oracle.javatools.db.ora.OracleSQLQueryBuilder.buildQuery(OracleSQLQueryBuilder.java:147)
    What does it means?
    select
    ' Payroll ' as Revenue
    , t.umonth, nvl(p.hmy, 0), nvl(t.sMTD, 0), nvl(a.inormalbalance, 0), nvl(T.sbudget, 0), nvl(a.scode, 0)
    from
    acct a, total t, property p, param par
    where
    nvl(t.hacct, 0) = nvl(a.hmy, 0)
    and nvl(par.hretain, 0) <> nvl(a.hmy, 0)
    and nvl(t.iBook, 0) = 0
    and nvl(a.iacctType, 0) = 0 /*Regular accts*/
    and nvl(t.hppty, 0) = nvl(p.hmy, 0)
    and ( nvl(a.scode, 0) between 60000 and 6009000 )
    union all ---------------------------------------------------------------------------------------------------------------------------------
    select
    ' Payroll Taxes '
    , t.umonth, nvl(p.hmy, 0), nvl(t.sMTD, 0), nvl(a.inormalbalance, 0), nvl(T.sbudget, 0), nvl(a.scode, 0)
    from
    acct a, total t, property p, param par
    where
    nvl(t.hacct, 0) = nvl(a.hmy, 0)
    and nvl(par.hretain, 0) <> nvl(a.hmy, 0)
    and nvl(t.iBook, 0) = 0
    and nvl(a.iacctType, 0) = 0 /*Regular accts*/
    and nvl(t.hppty, 0) = nvl(p.hmy, 0)
    and
    (nvl(a.scode, 0) between 60100 and 60690 )
    union all -------------------------------------------------------------------------------------------------------------------------------
    select
    ' Workers Comp/Disability '
    , t.umonth, nvl(p.hmy, 0), nvl(t.sMTD, 0), nvl(a.inormalbalance, 0), nvl(T.sbudget, 0), nvl(a.scode, 0)
    from
    acct a, total t, property p, param par
    where
    nvl(t.hacct, 0) = nvl(a.hmy, 0)
    and nvl(par.hretain, 0) <> nvl(a.hmy, 0)
    and nvl(t.iBook, 0) = 0
    and nvl(a.iacctType, 0) = 0 /*Regular accts*/
    and nvl(t.hppty, 0) = nvl(p.hmy, 0)
    and
    ( nvl(a.scode, 0) between 61200 and 61260)
    union all -------------------------------------------------------------------------------------------------------------------------------
    select
    ' Pension and Hospitalization '
    , t.umonth, nvl(p.hmy, 0), nvl(t.sMTD, 0), nvl(a.inormalbalance, 0), nvl(T.sbudget, 0), nvl(a.scode, 0)
    from
    acct a, total t, property p, param par
    where
    nvl(t.hacct, 0) = nvl(a.hmy, 0)
    and nvl(par.hretain, 0) <> nvl(a.hmy, 0)
    and nvl(t.iBook, 0) = 0
    and nvl(a.iacctType, 0) = 0 /*Regular accts*/
    and nvl(t.hppty, 0) = nvl(p.hmy, 0)
    and
    ( nvl(a.scode, 0) between 61000 and 61550 )
    union all -------------------------------------------------------------------------------------------------------------------------------
    select
    ' Other Labor Costs '
    , t.umonth, nvl(p.hmy, 0), nvl(t.sMTD, 0), nvl(a.inormalbalance, 0), nvl(T.sbudget, 0), nvl(a.scode, 0)
    from
    acct a, total t, property p, param par
    where
    nvl(t.hacct, 0) = nvl(a.hmy, 0)
    and nvl(par.hretain, 0) <> nvl(a.hmy, 0)
    and nvl(t.iBook, 0) = 0
    and nvl(a.iacctType, 0) = 0 /*Regular accts*/
    and nvl(t.hppty, 0) = nvl(p.hmy, 0)
    and
    ( nvl(a.scode, 0) between 616000 and 616400 )

  • Anyone know how to gernerate CRUD applications with flex and coldfusion?

    Anyone know how to gernerate CRUD applications with flex and
    coldfusion? I am working with a remote coldsfusion installation
    with MS SQL and I don't have RDS.

    You might investigate "squidhead". It is CF based. I'm not
    sure if it has any Flex related features.
    http://squidhead.riaforge.org/

  • How to integrate android application with oracle database using oracle mobile database server.

    Hi,
    I developed one web application using oracle database. I want to implement same web application in android. My problem is how to integrate android application with existing oracle database using oracle database mobile server. Can u please guide me how to install oracle database mobile server and how to integrate android app with existing oracle database..
    Thank you.

    In the Database Mobile Doc set there is an entire book that covers the Installation of Oracle Database Mobile Server.   Chap 4 of that book contains screen shots and all kinds of information that will help guide you through the installation.   We also have a doc on the different mobile clients.  Chap 2 of that guide covers installs and integration of an android app. 
    thanks
    mike

  • How to start Integration server with the user XISUPER

    Hi,
    How to start Integration server with the user XISUPER?
    Regards,

    Mahesh,
    In the post installation document, under Creating User XISUPER,
    I see the following,
    1.You must now log on to the Integration server host with the user XISUPER, to switch the initial password to a valid password.
    2.You must restart the J2EE engine to transfer the user creation to the J2EE immediately.
    I am unable to proceed here.Can you please help me to resume the post installation steps ?
    Thanks,

  • How can I start any application with buttons

    Hello, I want to start any kind of applications with Buttons. I want to make me a GUI with buttons and with one button I want to start Outlook, but I dont know how this will work!
    THX for your help

    Runtime class exec methods
    If your Outlook executable is in different path ... import java.io.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Test2 extends JFrame implements ActionListener
       public Test2()
          super("Test");
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          setSize(300, 200);
          JButton b = new JButton("Outlook Express");
          b.addActionListener(this);
          getContentPane().setLayout(new FlowLayout());
          getContentPane().add(b);
       public void actionPerformed(ActionEvent e)
          try{
             Runtime runTime = Runtime.getRuntime();
             Process proc = runTime.exec
                         ("C:\\Program Files\\Outlook Express\\msimn.exe");
             proc.waitFor();
          }catch(IOException ioe){System.out.println("Wham");}
          catch(InterruptedException ie){System.out.println("Bop");}
       public static void main(String[] args)
          new Test2().setVisible(true);
    }

Maybe you are looking for