How to switch to an already open app?

Hello folks, using 10g and on app startup I need to see if the app is already running and if so, switch to it but don't start another instance of the app. I can't seem to find an example of this. I swear I have done this before but can't find an example in any of my apps! How are you folks doing it?
Thanks for any info,
Gary

I swear I have done this beforeReally? I would say that its a complicated task to do. I can only think of a solution including java-beans.
My idea:
-Create a java-bean which implements a socket-server which listens on a specific port on localhost.
-On application-startup, try to connect to that port,
+ if unsuccessful, launch the application and start the socketserver
+ if successful, "tell" the already running socket-server that it somehow has to bring itself to the front, then quit the newly started application again
The socket-server-thing is quit easy to implement, for the "bring itself to the front" you have to do some research.
If aou also want to go to a specific module, things get more complicated

Similar Messages

  • Can I prevent Mac OS from switching spaces to already-open apps?

    I want to move to a space, and regardless of whether an app is open in another space, open a new window in the current space.  My context is that I'm setting up Automator workflows to open apps for each of my common tasks, and I want a space per workflow, but several workflows use some of the same apps. I'm using 10.9.4.

    Uncheck:

  • Is there a way to stop the OS from switching to a newly opened app?  I would like to be able to continue what I'm doing while I wait for an app to launch and not get interrupted by a forced entry into the app.

    Is there a way to stop the OS from switching to a newly opened app?  I would like to be able to continue what I'm doing while I wait for an app to launch and not get interrupted by a forced entry into the app.
    As an example, I'm going to my email in safari, while I wait for it to load, I open an excel document, and the OS decides excel should be the front app, so I go back to safari so I can enter my login info, but halfway through my password the OS decides that excel is where I should finish typing my password.
    VERY ANNOYING.  Can I open apps in the background?

    Thank you everyone for the suggestions. J D, I'm not a terminal fan, but I'm sure it works.  I found a solution that I can use in the dock from another post. 
    Annoyed by Mac OS
    Works great and allows me to maximize those multitasking minutes.

  • HT5927 how do i delete or disable open apps with the ios7 software?

    How do I delete or disable open apps with the ios7 software?

    Closing open apps:
    double tap home button, swipe up on the app window to close
    To delete its the same as always, hold down the icon until it wiggles then tap the x

  • How to show up all the open Apps in this new iOS 7?

    Mine iPad2.
    When i was on the previous iOS 6.. I could press on the home button and it will display all the opened up Apps. I could then close what ever Apps I wish to close.
    Since updating to the latest iOS 7 I do not get opened up Apps displayed on pressing the devices home button. How could I get my iPad 2 to show up all the opened Apps? Double tap on the home button does not work in this new iOS 7.
    Any clues
    Your advice would be greatly appreciated.
    Regards

    Thanks so much this works. **** apple. Every time they update one has to learn how to do simple tasks all over. I appreciate you giving me/us the answer. By the way, I hate the new operating system. It ***** on all level. Icons look like they belong in a preschool.

  • How to switch the location of my app ID? I apply it at uk. But I'm in china currently.

    Can't download Chinese things, warn me to switch to uk App Store ,but how?

    How to Change Your App Store Account Location | eHow.com
    Your Apple ID, including the payment method, has to also be associated with China and you have to be in China to use the China iTunes and App store.

  • HT203167 How to switch back to the Australian Apps Store?

    Somehow my iphone account is connected to the Canadian Apps store.
    How can I switch back to the Australian Store? That is where I have my account.
    Thanks for any help.

    Go to settings/iTunes & App Store then tap on Apple ID and then view account and change region

  • E90 - How to switch off GPS and other apps etc and...

    I have just got my new E90 a few days ago, it is back on the market, so far it is terrific, no issues what so ever. However I thought I had exited the GPS app correctly, but the battery drained quite quickly as I think it was on ( few hours). How does one know what is running, eg is there is an equivalent Task manager like in Windows ? When I reboot and dont start the GPS the phone battery has lasted for days.
    By the way - initally my E90 GPS took less than 1 minute to lock in, and thereafter it takes seconds. Quite amazing.

    07-Oct-200708:40 PM
    wolf666 wrote:
    07-Oct-200705:45 PM
    tonyl wrote:
    Another Question - can I use the phones USB port to access an external memory device such as a 40G or 120G HD or even the solid state USB memory sticks ?
    PS I am really enjoying this phone compared to my previous SE P910i, and others.
    Not sure what you mean, you can only connect to a PC running PC suite and having the usb drivers installed.
    More then this, access is triggered in one way PC to E90, not in the reverse !
    I didn't event tested it, but almost sure it won't work.
    Domdom

  • How to switch my previous purchase to App Store

    I bought Aperture before App Store launch, any way I can make App Store recoganize it and start auto update it?

    No, there is no way to switch.  You'll have to ontinue to update via Software Update....

  • When I open a new window (App etc) the windows already open disappear. How can I fix this ?, When I open a new window (App etc) the windows already open disappear. How can I fix this ?

    When I open a new window (App etc) the windows already open disappear. How can I fix this ?

    Back up all data.
    Please triple-click anywhere in the line below on this page to select it:
    defaults delete com.apple.dock single-app && killall Dock
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing the key combination command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    Wait for a new line ending in a dollar sign ($) to appear below what you entered. You can then quit Terminal. Test.

  • Error message to close firefox appears upon app launch and indicates that a copy of firefox is already open. How do I find the open copy and close it permanently?

    When I go into my daughter's account and try to launch Firefox (she was previously using Safari) an error message pops up indicating to "Close Firefox: A copy of Firefox is already open. Only one copy of Firefox can be open at a time." Except that I don't see an open copy of the app, unless it somehow is launched at login, a setting I don't see either. Firefox works fine on other user accounts.

    Is there still a default profile folder present?
    * /Users/<user>/Library/Application Support/Firefox/Profiles/<profile>/
    If not then delete the file [http://kb.mozillazine.org/profiles.ini_file profiles.ini]<br />
    That will cause Firefox to create a new default profile.
    * http://kb.mozillazine.org/Recovering_a_missing_profile

  • I think my iphone is overloaded by open apps - i cant remember how to switch them off

    i cant remember how to shut down open apps - i did it last time my phone wasn't working properly and it solved the issue

    Your phone is not overloaded by open apps. Very few, if any, of the recent apps list you are thinking of are open.
    If you feel you must, double-click the home button to see the list of recent apps and delete them in the usual way. But read this as well:  http://whenwillapple.com/blog/2010/04/19/iphone-os-4-multitasking-explained-agai n/  

  • Why does my message app on my mac book pro still say I have 3 new message notifications when I already opened them a week ago?

    The message app on my mac book pro says I have 3 new message notifications and I already opened those messages a week ago. How do I get rid of the notification pop up on the app?

    Please sign out of all the messaging services you use and sign back in. If there's no change, log out or restart the computer.

  • How do I attach a file to an email which is already open on the iphone5?

    How do I attach a file to an email which is already open on the iphone5?  ie I have already opened an email and started typing it.  How do I simply attach a photo to the email?

    Go to the Photos App, select a photo and then select Copy from the Share icon (box with arrow).
    Return to Mail and paste the photo where you want it.

  • I want to switch between 2 open apps using only 1 step, i.e. touch once, tap once, push once, swipe once, etc. Can I do this with a 4s running 6.1.3?

    I want to switch between 2 open apps using only 1 step, i.e. touch once, tap once, push once, swipe once, etc. Can I do this with a 4s running 6.1.3?

    No.  2 steps if the app is already open, double tap the home button and then tap on the app.

Maybe you are looking for