How to invoke an application when another applications is started

  Hi All,
    Good day. I am a newbie to AppleScript and writing down this seeking your kind help here.
Making my question detail here,
Applcation 1 :  Consider this to be some thing kind of server stuff which is running.
Application 2:  Consider this to be an application like Automator or any other automation tool for example Sikuli or Squish
My actual scenario is that, When Application 1- is still running and upon its completion I want to instruct to another application to start.
Suppose consider that Application 1 is running and when it is finished I want to invoke another application via apple script.
So here, I want both the scripts from you people that can do this.
> Script for -
1. Invoke Application 1 (via Applescript itself) let it run for few minutes(as it is server kind of stuff, i want it to run) when this is complete then I want to invoke the application 2
2.  I am manually invoking the application 1 and I am going away,  as it will run for few minutes then on Application completes its job I want Application 2 to be Invoked.
I believe, I am pretty explanatory here, so please help with these
Regars,
OsmanBerg

Does Appliction 1 quit by itself when it's done? If so a simple loop should do the trick - periodically check to see if the app is still running:
-- start App1
tell application "App1" to activate
-- we know it's running
set isRunning to true
tell application "System Events"
  -- do this until the app is no longer running
          repeat until isRunning is false
  -- has the app quit?
                    if (exists application process "App1") = false then
  -- if so, set our flag accordingly
                              set isRunning to false
                    end if
  delay 2 -- wait 2 seconds before checking again
          end repeat
end tell
-- if we get here we know the first app has quit, so:
tell application "App2" to activate

Similar Messages

  • Question on "How-to invoke a method once upon application start"

    Hello everyone.
    I'm trying to implement what the article "How-to invoke a method once upon application start" by Frank suggests.
    https://blogs.oracle.com/jdevotnharvest/entry/how_to_invoke_a_method
    Suppose that I'm having a single point of entry, so in my login.jpsx I have the below:
    <f:view beforePhase="#{login.onBeforePhase}">In the method "onBeforePhase" I have to pass the phaseEvent, since the signature is the following:
    public void onBeforePhase(PhaseEvent phaseEvent)but how do I know the phaseEvent when calling the login.onBeforePhase? How the call should be?
    Thanks a lot!
    ps. I'm using jDev 11.1.2.1.0

    You need not pass anything to this method , this method will get called before every Phase except ReStore View
    Just write the logic as Frank suggested for the phase in which you want the code to execute. You can get the PhaseId's like
    PhaseId.RENDER_RESPONSE
    public void onBeforePhase(PhaseEvent phaseEvent) {// from Frank's doc
    //render response is called on an initial page request
      if(phaseEvent.getPhaseId() == PhaseId.RENDER_RESPONSE){
    ... etc

  • Can itunes playback be paused when another application (such as Quicktime) plays audio?

    I listen to music using iTunes all the time on my Mac. However I am constantly having to listen to snippits of audio from recordings that I have made, and I would ideally like to briefly pause iTunes during playback.
    Is there a way to automatically cause iTunes to pause its playback when another application generates audio output? When you make a call on Skype this seems happens, and so I just want to replicate this functionality on other applications that can play back audio files.
    PS: I know I can simply go to iTunes and pause it, but hey, this is all about finding really easy ways to do things you do a lot and it's annoying (and distracting) to have to do all those extra keystrokes.
    thanks
    Steve

    Hate to say it but its still a problem with iTunes although better with 7.0.1.... at least on the Win side of things.

  • Error while copying a page from one application to another application

    Hi All
    I am using Oracle Apex 4.0
    I getting the error ORA-06502 Pl/Sql Numeric error character string buffer too small when i copying a page from one application to another application.
    Thanks & Regards
    Srikkanth.M

    I'm having the same issue. How did you solve this?

  • Using class from one application in another application

    How can I use a class deployed as part of an application in another application withour putting the jar files in the classpath? For example, there two application deployed: app1 and app2. An EJB in app1, app1_ejb1, uses an class, app2_class1. In order for this work, I have to include app2 in the classpath. If not I get a class not found exception. If I put app2 in the classpath, then I can not use hot deploy for app2. I can put the class in both the applications but that means if the code changes I have to build and deploy both the applications. Any ideas?

    Brilliant! Thank you.
    If the Mileage table does not have a location in yet (if I've not entered it into the table yet) how can I get the result to enter an error or an oops rather than the number to the one nearest to it?
    I've looked on the function descriptions but none of it is written in english
    Thanks
    Paula

  • Copying single page ,region from one application to another application

    Hi,
    I need information regarding How to copy single page or region from one application to another application in the same workspace

    Hi - have a look at this thread: -
    Synonyms
    Cheers,
    Mike

  • Move data from one Application to another Application.

    Hi All,
    I have a requirement to move data from one Application to another Application(we are working on SAP BPC 5.1/7.1 MS version).
    Can anybody please mention all the possible ways to achieve it.
    Thanks in advance.
    Regards
    Vani

    Hi,
    The best way to do this would be to use destination_app statement. Please refer to the below link from help.sap:
    http://help.sap.com/saphelp_bpc75/helpdata/en/79/b299446e02478fa5eca684d1297ef3/content.htm
    Alternatively, you can definitely export the data from one application and import it to the second.
    Hope this helps.

  • HT4199 how do I fix it when "another device is using computer IP address" and I can't get wireless to work anymore? It used to work fine.

    How do I fix it when "another device is using computer IP address"? Airport used to work fine. I've already tried turning everything on and off several times.

    I would recommend that you do the following as a minimum:
    Power-down the modem, AirPort base station, and computer(s).
    Power-up the modem; wait at least 10-15 minutes to allow it adequate time to initialize.
    Power-up the AirPort base station; wait at least 5-10 minutes. Note: The AirPort's status light may continue to flash amber after it has intialized. That is because, there may be some additional configuration items necessary, like setting up wireless security, before the overall setup is completed to get a green status.
    Power-up your computer(s).
    If the above steps do not solve the problem, start over with step 1 above, but then perform the next steps between steps 1 & 2. above.
    Disconnect the AirPort base station from the Internet broadband modem.
    While all of the devices are powered-down, perform a "factory default" reset on the base station. This will get it back to its "out-of-the-box" configuration and make setting it up much easier, especially if you use the "Assist me" process within the AirPort Utility. (ref: Resetting an AirPort Base Station or Time Capsule)
    After the base station resets, go ahead and power it back down.
    Reconnect the AirPort base station to the Internet broadband modem. For the Extreme and Time Capsule, be sure to connect the cable to the base station's WAN (circle-of-dots) port.
    Continue with step 2 in the first set of steps.
    In this basic configuration, the AirPort base station will broadcast an unsecured wireless network with a Network Name (SSID) of Apple Network NNNNNN. Network clients, connected to the base station either by wire or wireless, should now be able to access the Internet through the ISP's modem. Once Internet connectivity has been verified, you can use the AirPort Utility to configure the base station for wireless security and any other desired options. Please post back your results.

  • How to invoke A CORBA-Java Client Application, from Oracle???

    Hi,
    I have a CORBA-Java Client Application, which takes the input parameters from a Oracle table and calls the CORBA Server, passes these parameters to the C++ Server Application and gets the results back thorugh CORBA.
    My problem is, this java application needs to be invoked, when ever there is a new record in the Oracle table.
    I am not sure if i can use Java Stored Procedures in Oracle in this case, because my app is in Sun JVM and i am using BEA WebLogic Enterprise 5.1 for the CORBA.
    Is there any other way by which i can invoke this app, when a new record is updated in the Oracle table?
    Currently, i have just put a TIMER in my java App, to check the oracle table in every few seconds, to see if there is a new reocrd. If it finds a new record it invokes the corresponding class(corba class), or else just keep sending a messsage that no new record is available.
    The problems i am facing in this method are as follows;
    1. Unnecessarily, the application has to keep on running if there is no request coming frequently.
    2. When there is a new record found, the Corba Class is called and the whole process (till it gets the result back from the server) takes about 20 - 30 secs. But within this period, if there is another record coming into Oracle table, my timer class doesnt invoke another corba class....(though i am using multithreading by using the RemidTask method in the timer.schedule.
    (timer.schedule(new RemindTask(),10,5*1000);)
    3. Also, if during the first call, there is some error, then the whole process exits, instead of another process running parallely (when a second new record is found).
    So how does this timer class act like a multithreading process?
    Well, i hope i am not confusing....Please let me know if anyone wants bit more elaboration on this.
    It would be really helpful if someone can suggest some answer to my problem.
    Thanks in advance.

    Thank you very much Keith.
    Though i am really getting a hope of solving this problem, from you answer, i am actually not 100% sure if i understood your reply properly.
    First of all, about
    1. "use the update stored procedure to place the updated record (or unique index) onto an Oracle Application Queue."
    -- Why do i need to put the record in the AQ. (Frankly speaking, at this moment i dont have much idea about AQ, probably i can learn more about it from oracle technet site? Or would u suggest anything else?)
    Then,
    2."Your app then waits on this queue and for each new message, consumes it, gets the data required from the AQ load (e.g the index and or record), and fires off the CORBA class"
    -- How does my application stay in the queue? and gets the data from the queue?
    Of course, as far as i understand, i am going through the same principle...keeping on running a timer class, which keeps on checking the table for a new record, and when it finds, it calls the CORBA class.
    Of course, i feel there should be a difference in running the timer continuosly and staying in queue. However i am totally unaware, how can i make my java app to wait in the queue and waits for a new record?
    Can you please elaborate your answer a bit more, because i dont know about the AQ, that you have mentioned.
    Thank you very much in advance for your time. But please know that it will be of great help to me and hence will be higly appreciated.
    Regards,
    Subhasree.

  • How to call Oracle form .from another application like VB 6.0

    Dear ALL,
    I want to call oracle(Developer) form ,from another application (VB 6.0).I want to call the form in such
    a way that user dont need to enter login and password.I will hard code the username and password
    in my VB 6.0 application.User only press a button on Visual Basic 6.0 form and and that button will
    open required Orcale form.How can I DO this.PLEASE HELP............
    Regards

    You have the command in VB 6.0 to run any exe files right (I think it is the system command). Next to that command place the following code to run your forms application
    ifrun60.EXE <forms.fmx with complete path> userid=<username>/<password>@<connection string>.
    Regards,
    Senthil .A. Perumal.

  • How can I make links in another application (say thunderbird) open with a specific Firefox profile

    Having several different Firefox profiles, clicking a link in another application (for instance,a link in Thunderbird,or in a email message,generally speaking) brings up the profile manager:is there a way to bypass it and force all links to open with a specific Firefox version\profile?

    A way to do that is to edit the registry and add the -p "profile" switch to those protocol links. There is however no guarantee that such a change stays after an update and Firefox may complain.<br />
    Another way is not to use the profile manager, but select the profile for the default browser once in the PM to set the profile for the default browser, so that profile is marked as Default=1 in profiles.ini. Then place a checkmark in the box to never ask and use a desktop shortcut to start each Firefox version with its own profile, so you do not have to use the PM as that would set another profile with Default=1
    * http://kb.mozillazine.org/Shortcut_to_a_specific_profile
    * http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox

  • Can't select items on desktop via finder window when another application opens that finder window

    When another program (like premier pro, or gmail with chrome) opens a finder window (in order to import files, or make attachments), I am unable to select items on my desktop.
    My workaround is to open an independent finder window, add a tag to the file or folder i want to use, then go back to the 'import' window in premier pro, or the attachment window in gmail in chrome, and select the relevant tag in the lefthand column, then select the file or folder in the righthand column. This seems slow and frustrating and unnecessary.
    Is there a really obvious thing I'm missing? Please be merciful, Apple Support Community...

    Hi Sue, if you can navigate in Finder do this:
    navigate to yourhome/library/preferences and trash these two files:
    com.apple.finder.plist
    com.apple.sidebarlists.plist (if this exists in 10.2 - not sure)
    (You will have to reset a few finder prefs the way you like them.)
    Then log out and back in again. Or restart.
    Good luck, let us know.

  • OID Realm Setup for Partner Application in another application server

    This message was also posted under the Identity Management thread.
    We currently have 10.1.2 SSO running and configured to accept a partner application from another app server (10.1.3). A sample application attempts to authenticate a user and then use JAZN to confirm whether the user is in the correct OID group. The user can authenticate successfully, which shows up in the SSO audit table, but the group check fails. I believe this is due to the realm not being visible to the other app server? How do I go about setting up the app server or application on the 10.1.3 platform to be able to check the 10.1.2 SSO server for the right OID group when the user authenticates? I have tried to set up the file-based permissions through the EM console, but seems to be only valid for the local setup. My thought was that the system-jazn-data.xml file would need to identify and point to the SSO server? When I troubleshoot that file, I see the correct realm entry and also the correct JAZN group and the OID GUID for the group. Any suggestions?
    Thanks,
    Leif

    Hi Amit,
    I am also facing the same issue. Could you please share the work around you around to get rid of this issue?
    Mahendra.

  • How to invoke BPMN processes in another project in JDeveloper?

    I have imported two BPMN diagrams from the Oracle BPA to JDeveloper. After importing I ended up with two projects each containing the first and second diagram. The problem now is in the final product, the user should be able to go through the tasks and other stuff in the first diagram and proceed to go through the task and other stuff in the second diagram.
    JDeveloper only allows me do this if the two BPMN diagrams are in the same project. By doing so I can use the throw message events in the first diagram to invoke the second diagram using the second diagram's message catch event.
    I can manually copy the second diagram to the first project but when I have 100+ diagrams I will have a big problem.
    Anyone know how can one BPMN diagram in one project invoke a diagram in another project?

    Know this is cryptic - if you want a step-by-step I'll be glad to give you more details.
    Add a Message start event to the process that you want to make the called child process. Deploy the project and copy the WSDL of the new process that is now exposed as a web service using Enterprise Manager.
    In the calling parent process, open the composite and add the service. In the calling process, add a Service activity that invokes the web service you just exposed.
    Hope this gets you going,
    Dan

  • Passing the values from one application to another application using mvc

    Hi sdn,
    Iam new to bsp.i created one application zappl1 in that i created one controller and one view.in that view i created 2 input fields.and also  created another application zappl2 in that also created one controller and one view. wai i want to enter in the inputfileds of first application view that values will be display in second application view.Please help out of this.

    Hi,
    I can see 2 ways of doing. Either you use parameters in the URL from the first application to the second, as any web application would do.
    Or, you can think of using the Web Application Server let :
    - the first application store the values
    - for the second application to retrieve
    Personnally, I would tend to suggest the first solution as it allows both applications to be replaced later on.
    Best regards,
    Guillaume

Maybe you are looking for