Launching apps with Applescript

I'm like a drunk driver wheb it comes to Applescript.
I use Final Cut Pro to edit video and have a time tracker program to keep track of the time I spend editing. Is there an Applescript that will launch the time program when I launch Final Cut Pro?
thanks for the help.

I am a bit crippled at the moment when writing scripts as my mac is currently in for repairs, so am using my parents windows pc.
I believe there are a number of ways of attacking this problem. Either have a small program always open checking for final cut launch or have a small application that launches both your time tracking program and final cut.
i prefer the second method as it free up systems resources (not much but i always prefer having as little open as possible in regards to background processes). SO i would use something like this:
tell application "Time Tracker"
activate
tell application "Final Cut Pro"
activate
end
end.
I would save it as an application named so it where final cut pro is, and then always use this applciation to launch final cut pro.
However if you launch final cut another way, for example open up a document file that launches final cut pro then this method will not work and the first method described would be a better way of achieveing this. However i am at best a confident novice in regards to applescript and being hindered by not having my mac to try it out on, i can only give pointers.
I believe this will check every 5 seconds for an instance of final cut pro. You can make the time intveral shorter or longer if you wish. I think the option you want to save it as is called "always open" and then in system preferences - accounts - login items select the script.
if process "Final Cut Pro" exsists then
activate application "Time Tracker"
delay 5
end
As i said before this may not work correctly and can only check when my iMac comes back from being repaired (new screen, logic board and psu, so basically replaced but inside the same case). I am sure someone else will step in and offer help in the mean time if i have got something wrong.

Similar Messages

  • Launch apps with oracle jre 7

    With Apple discontinuing support jre 7 on its mountain lion, i am trying to find a way to launch my mac apps with oracle jre7. There are two situations occuring to me.
    1. Oracle jre7 could be before hand installed and my app should be able to detect and launch
    2 Or Bundle the oracle jre 7 with my Mac app and get into lauching it on mountain lion without any issues.
    Is there a better way or apple providing support in this regards.
    Help appreciated.

    Thanks NickClark_uk,
      I am able to install the java 7, but the Mac app i am trying to launch is unable to detect the oracle jre 7 and works fine with app store jre's. So we may need to bundle the jre or modify our apps to detect the installed JRE.
    I was looking at what would be the better approach in order to have my Mac app run with oracle jre 7.
    Thanks

  • Error "cannot locate object' launching app with Web Start

    Hello,
    I receive the error shown below when launching a Java application and cannot figure out where to begin with debugging. It was developed under Netbeans 5.0.
    You can recreate the error by launching this application:
    http://www.mikenaglich.net/ztest17.jnlp
    Error text and JNLP file follow. I am really puzzled and would appreciate any help. Thanks.
    Mike
    Error Text
    ========
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    The system cannot locate the object specified. Error processing resource 'http://www.netbeans.org/jnlp/DTD/jnlp.dtd'.
    App JNLP File
    ===========
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc.//DTD JNLP 1.5//EN" "http://www.netbeans.org/jnlp/DTD/jnlp.dtd">
    <jnlp codebase="http://www.mikenaglich.net" href="ztest17.jnlp">
    <information>
    <title>ztest17</title>
    <vendor>Mike Naglich</vendor>
    <homepage href="www.mikenaglich.net"/>
    <description> </description>
    <icon href="default"/>
    <offline-allowed/>
    <shortcut online="true">
    <desktop/>
    </shortcut>
    </information>
    <resources>
    <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
    </resources>
    <resources>
    <jar download="eager" href="dist/ztest17.jar" main="false"/>
    </resources>
    <resources locale="" os="">
    <jar download="eager" href="dist/lib/swing-layout-1.0.1.jar" main="false" version=""/>
    </resources>
    <application-desc main-class="ztest17.Main"/>
    </jnlp>

    I receive the error shown below when launching a Java
    application and cannot figure out where to begin with
    debugging. There are a number of problems, potential problems,
    redundancies and illogicalities in that JNLP file.
    ...It was developed under Netbeans 5.0. Uh-Huh. I am coming to recognise those
    (damnable) NetBeans JNLP files.
    You can recreate the error I don't think I need to, your error output and JNLP
    file are quite instructive..
    ...by launching this
    application:
    http://www.mikenaglich.net/ztest17.jnlp
    Error text and JNLP file follow. I am really puzzled
    and would appreciate any help. Thanks.
    Error Text
    ========
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please
    correct the error and then click the Refresh button,
    or try again later.
    The system cannot locate the object specified. Error
    processing resource
    'http://www.netbeans.org/jnlp/DTD/jnlp.dtd'.
    1) Whenever you see a message from Java,
    JavaWS, or an application saying words the the
    effect of 'cannot find..', try checking the URL of the
    resource in a browser. If a browser comes
    up '404' (not found), then the Java tool or app.
    will be unable to access it either.
    That is the first and fundamental problem with that
    JNLP. The DOCTYPE element is not strictly needed
    in a JNLP, and I would recommend removing it entirely
    rather than try and hunt down any NetBeans DTD.
    With the way NB writes JNLP's, I would not trust
    a DTD written or controlled by them, in any case.
    App JNLP File
    ===========OK.. I recommend replacing the current JNLP
    with the one below, here is a summary of the
    changes I made..
    - removed DOCTYPE line with reference to '404' DTD
    - compacted resource elements, removing empty attributes
    - changed ztest17.jar to main='true'
    - removed redundant 'download="eager"' attributes as well
    as main="false" and version="" from swing-layout.. jar element
    - removed broken(?) <icon> element and empty <description>
    - changed homepage href to relative
    Some of them are guesses, but I'd give it a 90%+
    chance of working, if written like this.
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp codebase="http://www.mikenaglich.net" href="ztest17.jnlp">
    <information>
      <title>ztest17</title>
      <vendor>Mike Naglich</vendor>
      <homepage href="/"/>
      <offline-allowed/>
      <shortcut online="true">
        <desktop/>
      </shortcut>
    </information>
    <resources>
      <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
      <jar href="dist/ztest17.jar" main='true' />
      <jar href="dist/lib/swing-layout-1.0.1.jar" />
    </resources>
    <application-desc main-class="ztest17.Main"/>
    </jnlp> Note that a glance inside the ztest17.jar supports
    it contains a manifest file tat specifies the main class,
    so it might be possible to remove main='true'
    altogether - best not for the moment, though.

  • BASH Script - Launch App with

    I'm trying to write a simple BASH script that will laungh an program, but that program needs command line arguments.
    When I put it in quotes it says it can't find the file, if I don't use quotes then it won't run the program with the command line arguments. How can I launch a program using a BASH script with command line arguments?
    Thanks in advance

    #!/bin/bash
    /Users/name/Desktop/Directory/app -f configfile

  • Launching terminal with applescript

    I just recently ventured into the world of MAC, and I am trying to create an applescript (APS) to do the following
    1. Launch Terminal
    2. make terminal a X11 emulator ("/usr/bin/open-x11")
    3. source blah1.sh ("source blah.sh")
    4. source blah2.sh ("source blah.sh")
    5. chage dir to foo1 ("cd foo1")
    6. Leave window open
    i have a good idea on how to use APS tolaunch terminal, but I am not sure if it is reading the source file, because it does not chage directory. Could someone help with an example script.
    Thanks
    MacBook Mac OS X (10.4.8)

    Hi Lanre,
    try this
    tell application "Terminal" to run
    do shell script "/usr/bin/open-x11 ; source blah.sh ; source blah2.sh ; cd foo1"
    or you can make a .term file (search google for how to)

  • BASH - Launch App with arguments

    I'm trying to write a simple BASH script that will laungh an program, but that program needs command line arguments.
    When I put it in quotes it says it can't find the file, if I don't use quotes then it won't run the program with the command line arguments. How can I launch a program using a BASH script with command line arguments?
    Thanks in advance

    Wrong forum. Try https://discussions.apple.com/community/mac_os/mac_os_x_technologies#/?tagSet=10 48

  • Launch App with Native Process

    Hi,
    I want to launch serproxy application (http://www.lspace.nildram.co.uk/freeware.html) using native process in adobe air. But it seems not working.
    Here is my code:
    protected function launchSerproxy():void{
        if(NativeProcess.isSupported){
         var serproxy:File = File.applicationDirectory;
         serproxy = serproxy.resolvePath("serproxy/serproxy.exe");
         var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
         nativeProcessStartupInfo.executable = serproxy;
         var process:NativeProcess = new NativeProcess();
         process.start(nativeProcessStartupInfo);
         // connect to the com port
         setTimeout(connect,1500,"127.0.0.1",5339);
    Flex did not return any error or problem on runtime. What should I do to have Adobe Air load and run serproxy? Thanks.

    I think you just missing the working directory.
    "nativeProcessStartupInfo.workingDirectory = File.applicationDirectory;"

  • Launching RD3 with Applescript causes it to forget passwords

    If RD3 is not running and is asked to execute a script like:
    tell application "Remote Desktop" to control (every computer whose name is "TestMachine")
    It will present a "Do you want to ask permission to control?" dialog.
    In that session, all the computers will have their status as "No User Name and Password" as well.
    If RD was already running it works fine. Is there a workaround to this bug?

    You might try something like this. This will launch the application and give it a chance to "start up" before issuing the control command.
    tell application "Remote Desktop"
    activate
    delay 3
    control (every computer whose name is "TestMachine")
    end tell

  • Trying to launch modal window in safari with Applescript

    Hello,
    I am writing a web-based app that needs to launch a modal browser window from an applescript file. No addressbar, no toolbar, etc. (the pc side uses a .vbs file to do the same thing.) It's like a popup, but this is from my app. Im not launching it from another web page.
    I can do it with applescript and "System Events" :
    tell application "Safari"
    activate
    make new document with properties {URL:"http://IPADDRESS/default.aspx"}
    do JavaScript ("self.resizeTo(500,480);") in document 1
    tell application "System Events"
    keystroke "B" using {command down, shift down}
    keystroke "/" using command down
    keystroke "|" using command down
    end tell
    end tell
    But this affects the entire Safari application so new windows opened by the user appear the same way. I need it to only affect the window that is opened. I tried some JS "toolbar=no" type commands but it did not have any effect. I must admit my JS and AS is very basic at this point so it could have been poor syntax..
    Can any of you fine folks suggest a way to do this?

    It's not what you want to hear, I'm afraid, but as far as I know there's no way to directly access placeholders other than the title and body in Keynote.
    I did see mention of parsing XML to change values of individual items, but it might be overkill for what you want to achieve.
    Perhaps if you explain what you are trying to do someone will come up with a helpful suggestion.

  • I upgraded my new iPad (iPad 3) to IOS 6 and everything went well except Siri won't launch apps. When asked say "launch Facebook" Siri responds with "it doesn't look like you have an app named Facebook" and I get the same results when trying to launch any

    I upgraded my new iPad (iPad 3) to IOS 6 and everything went well except Siri won’t launch apps. When asked say “launch Facebook” Siri responds with “it doesn’t look like you have an app named Facebook” and I get the same results when trying to launch any app. Siri works for everything else it just won’t launch apps. Any ideas? Thanks.

    I have this same problem... Seems like nobody else does. Siri won't launch any apps for me, including native apps.

  • Using SSL with client auth from a JNLP-launched app

    We have an application that is launched by JNLP, and which needs to make a mutually authenticated SSL connection to a server. The client cert and trusted certs that it needs to do this are stored in the Sun\Java\Deployment\security directory where JNLP knows to look for them. And Java WebStart itself seems to be able to use these certs just fine. However, our app seems blithely unaware of the location of the keystore/truststore unless we explicitly set the system properties javax.net.ssl.keystore and truststore. But we don't want to do that (it could be different for different users), and we shouldn't have to do that. So the question is, how can we use the same KeyManager/TrustManager that Java WebStart itself is using? Are they somehow available for the JNLP-launched app to use?
    Failing that, is there a way for a JNLP-launched app to query the deployment properties? There are a bunch of properties to direct the behavior of Java WebStart (see [http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/properties.html]), such as deployment.user.security.trusted.cacerts. These don't seem to be System properties. Can the app see them, or are the "private" to Java WebStart itself?

    HI:
    see also shine enterprise pattern.
    I have worked with it and it helps me and results spead up.
    it has a class which is named "code" and does encryption and ... by md5. it is incredibly secure! tey it.
    you can download it via links bellow:
    http://groups.google.com/group/j2sos.
    http://sourceforge.net/projects/shine-enterpris/
    it has also document

  • Launching a new app with a product for free  app is almost completed where do we start?

    We are going to be launching a new product that needs a code  attached to it for a free app with purchase of product. does anyone know where to start app is almost completed

    Any more detail that anyone can share on buying apps and balk and art is that the only way to sell a product with a free app if you buy the product? were not really looking for the easiest method we will have the app up on iTunes for 1.99 if you do not buy the product.

  • Trying to close an app with a shell script which was launched by same app.

    This may be simple, but is confusing me. I have an app that executes a shell script at launch. The script is designed to check for the existence of files and if not found, I want to display a message and close the application. The problem seems to be that I can't close the app with the script, since the script was called by the app and the shell is tied up. Does that make sense? I can't close the app because the script/shell is still active. Any ideas?

    Just have the script output some value for the app to read and then quit. Once the app reads the value, it will wait for the script to quit (shouldn't take long, especially if the script isn't running anymore) and then, if the value is a flag to quit, quit.

  • Launching apps 11.5.10 with different users

    Is it possible to launch apps 11.5.10 with two different usernames on the same instance?

    Hi,
    Have a look at the following documents:
    Note: 272585.1 - Users Cannot Open Multiple Forms Sessions On The Same PC In Applications 11i
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=272585.1
    Note:375403.1 - How Can I Restrict Applications Users To Be Signed In Only Once At Any Time
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=375403.1
    I have also found one thread which was created by you and cover the same issue.
    Multiple sessions of Oracle APPS open for the same instance? how possib
    Multiple instances of APPS for the same database?
    Regards,
    Hussein

  • PAINFULLY SLOW launch times with MS Office 2004 Apps?

    Anyone else noticing painfully slow launch times with their MS Office 2004 Apps? It seems that each time I restart my machine and try to open any kind of office document the Word icon will bounce at least 15 times and then it takes forever for the application to actually launch. Once launched it seems fast and works fine, but not on initial launch after restart.
    Is this a Rosetta issue? Should I reinstall the MS Office apps?
    -JB

    Seems ok to me. Did you download the latest update which finally allows spotlight to search in Entourage and provide other improvements?
    http://www.microsoft.com/mac/downloads.aspx?pid=download&location=/mac/download/ office2004/Office2004_11.2.3.xml&secid=4&ssid=29&flgnosysreq=True
    "Microsoft Office 2004 for Mac 11.2.3 Update
    After you install this update, you can use Mac OS X Sync Services and Spotlight searches to sync and find Entourage items, use smart cards with Entourage 2004, and enjoy improved overall security and stability when using Microsoft Word 2004, Excel 2004, PowerPoint 2004, and Entourage 2004. This update also includes all of the improvements released in all previous Office 2004 updates.
    Applies to: Microsoft Office 2004 Standard Edition, Office 2004 Student and Teacher Edition, Office 2004 Professional Edition, Entourage 2004.
    Released: March 14, 2006"

Maybe you are looking for

  • World package / Russia city package

    Hello! We have a problem with our skype account. We had the Europe package and used it for calling to the Russian Federation. Everything was fine, but since yesterday its already not possible to call to the Russian Federation with this package. So I

  • 20" w/ fx 5200 PC--resolution problem

    Im trying connect my 20" ACD to a PC with a Geforce fx 5200, but when the computer boots up the resolution is very low. It only allows 4-bit color and the lowest resolution. I cant change the options under control panel--displays--settings. Is the mo

  • How do you limit the number of rows return from query?

    How do you limit the number of rows return from query? Do all databases support this kind of feature?

  • Can't add to ANY playlist?

    Again after having a system restore I re-downloaded Itunes and I was able to extract the music from my Ipod Nano onto my computer and load the songs into Itunes, even thous some of them have different names or the titles have been deleted.  However n

  • To get best database design

    Hello... I am going through one case study for the database design. and for this I want your view / suggestion regarding this. I have one table with 6 column create table test ( id primary key, col1 varchar2(100), col2 varchar2(100), col3 varchar2(10