Xcode/AppleScript App - bring window to front

i have built an xcode/applescript wrapper application which executes a unix shell script. while the shell script is running (downloading + installing stuff, takes several minutes), the wrapper application is displaying an animated NSProgressIndicator (spinning circle). the idea behind this is that the user knows: as long as i see this progress indicator, the shell script is still busy. this all works fine.
however, as soon as a different application is covering the window of my wrapper application, i cannot bring my app's window to the front again by clicking on its dock icon or pressing cmd-tab. using exposé (mission control) it works fine. as soon as the shell script has finished, everything is back to normal.
it seems like the app is not responding to some events while waiting for the shell script to finish. what am i missing, any ideas?

Your application won't be able to respond to events if you are blocking the UI, such as running a long shell script or AppleScript without periodically giving the run loop a chance to do its thing.  You might take a look at running the shell script in the background by using NSTask.  Shane Stanley also has a chapter about doing this in his AppleScriptObjC Explored ebook.

Similar Messages

  • [AIR] May I catch "bring window to front" event?

    Hi,
    I wonder who is responsible for bringing windows to front when user click on that window (application contains more Windows components inside). Is it operating system or AIR runtime? Or perhaps AIR runtime send event to operating system which does it? In this case there would be some chance to catch and stop propagation of that event not to let operating system bring that window to front. Am I right? Any idea how to do it?
    //pyso

    This thread explains my experiences with the toFront() method on Windows 98. It works, but only if the frame has been hidden for about 20 seconds.
    http://forum.java.sun.com/thread.jsp?forum=57&thread=426257

  • Automator: Bring Window to Front

    I have been looking for a workflow that can bring a non-active window into active view e.g. bring a window that is in the background to the front view.
    There is no workflow in automator for this action but i wondered if anyone has come across some apple script that is capable of doing this? I could work the apple script into automator.
    Thanks,
    Adrian

    The window i am trying to bring to the front is called 'WorkflowServiceRunner'. Its not an application in the available list in Launch Application action.

  • How bring window to Front?

    Hi again,
    I just have one more question, regarding manipulation the z-order of different stages. As I stated yesterday, I am developing a chat application.
    I have my mainScene bound to an instance of jfxPanel and set this to a Jframe, to register AWT D&D events this way. Receiving a new message,
    i get a notification via a TrayIcon bubble. I attached an action listener to it, that should bring the requested chat window of the specific user to front,
    but it simply doesnt work. How can one basically bring a window in front of all other open windows on the screen in JavaFX? I tried a lot like :
    chatStage.setVisible(true);
    chatStage.toFront();
    responseArea.requestFocus();
    with chatStage being the stage of the chatwindow, and response area being the textarea one can write in..but actually i dont get it...

    Sure...check out this thread:
    How to keep a Stage always on top...
    Basicly I set up a WindowManager that is used to create all new stages, this manager has a collection of all live stages and sets listeners to properties like focus and iconized and handles
    the reordering to the "correct" z-order each time something changes and affects it.
    So each time the focus is changed, I run through all live stages and call .toFront() on them in the order I want them to appear on the z-axis.
    Cheers,
    Nuwanda

  • Bring window to front

    I have a JFrame in my application and I want to bring to front to other frames in my application when some event occurs.
    Any combination of frame.toFront(), frame.requestFocus(), frame.show(), frame.setVisible(true) didn't work.
    Only this code worked:
    frame.setExtendedState(frame.getExtendedState() | JFrame.ICONIFIED);
    frame.setExtendedState(frame.getExtendedState() & ~JFrame.ICONIFIED);
    But this isn't quite elegant as the window gets minimized and then normalized and a lot of graphics are generated :).
    Plus using this code seems not always to work when using frame.requestFocus() after it.
    Thanks,
    Adrian.

    This thread explains my experiences with the toFront() method on Windows 98. It works, but only if the frame has been hidden for about 20 seconds.
    http://forum.java.sun.com/thread.jsp?forum=57&thread=426257

  • Bring window to front - appactivate does not help :(

    Hello
    I am coding with vbscript.
    I have a need to make certain that sendkeys commands are sent to the proper program.
    I can use this to activate a window:
    success = WshShell.appactivate("MyProgram")
    if success then WshShell.sendkeys "(% ) N"
    But in Windows XP and 7 the window does not come to front. The program is activated, BUT left blinking on the taskbar below. And the key N is sent to any program that is currently open on top, for example windows explorer, which now minimizes.
    How can i make sure that the command "(%) N" is sent to MyProgram? I have not been able to find a solution for this dilemma.

    Thanks for the info
    The developer replied the situation cannot be changed.
    Is there other, a better way, i could send key commands to the program, instead of sendkeys?
    The concensus here is 'No'.  You cannot do what yo aretrying to do.  The developer should be able to explain why.  We have tried.
    Window sprotect its programs well.  It attempts to prevent rogue capture of teh mouse input while allowing for a certain amount of automation.  SendKeys is rapdly coming into disuse due to changes to the way Windows forms are generated and managed.
    If a developer wants to allow remote control then they will provide an automatin intreface that will allow you t ocommunicate with teh program.. Ideas like 'SendKeys' are a leftover from DOS basic and Windows 98 and earlier.  Microsoft has made no attempt
    to keep thi sworking in newer systems while it still supports most existing use of teh feature.
    What you are trying to do is 'LEGACY'.
    Perhaps if you reqord your question to ask how to accomplish some objective then we can point you at a solution.  SendKeys is not that solution.
    jv

  • Ask one/first time for password in Xcode/applescript app?

    Hello,
    I've an app, that's replacing/deleting/copying files a lot.
    The annoying thing is that each time finder (or gives my app finder the command to) replaces/deletes/copy files,
    finder(/my app) ask for the user password... And 'each time' is a lot in my app...
    I understand I can't disable this security measure, but is there a way it only ask when my apps starts?
    I know it's possible, because I saw it somewhere in a app...
    Thanks in advance,
    Isaiah
    P.S. Isn't it weird, the 'asks for password'-dialog says 'Finder wants to replace/delete/copy files', but when you do that trough Finder, the dialog doesn't show up ...

    It looks like you are placing your application support files in a location that the user doesn't have access for - normally, you should be using the acount that is running the application.  See the File System Programming Guide.
    There are methods (both Cocoa and Standard Additions) to get paths to the various default locations that you should look at using.  For example, my startup disk is not named "Macintosh HD", so your application fails at just about everything on my machine.
    BTW, using NSOpenPanel will avoid that annoying choose file bug.

  • Bring All App Windows to Front Setting (?!)

    Please tell me I changed a setting somewhere and this can be fixed.
    If I have twenty windows open - and I want to get back into my two pages documents - what is supposed to happen when I click on the Pages app icon in the dock?
    The only information I know at the moment is that I /know/ Pages is open because I see the little spotlight under it in the dock. I can also see the TOOLBAR PULLDOWNS for Pages.
    HOWEVER, there are no minimized icons on the right hand side of my dock for these OPEN DOCUMENTS. Which I understand because they are not minimized I guess...
    Is this a problem in terms of how the OS is set up? Is there a setting somewhere that will clear it up?
    Why don't my two open documents automatically pop to the front? And how on God's Green Earth am I supposed to know they are there if they don't identify themselves somehow?
    Thanks for anything constructive on this.
    - Jon

    AFAIK, when you click on the window's yellow minimize button, the minimized window reverts to a Dock icon. I use Unsanity/s WindowShade X prefpane, which changes the app's Window->Minimize behavior. You'll just have to experiment.
    Since you're new to Macs, see these:
    Switching from Windows to Mac OS X,
    Basic Tutorials on using a Mac,
    Mac 101: Mac Essentials,
    Mac OS X keyboard shortcuts,
    Anatomy of a Mac,
    MacTips, and
    Switching to the Mac: The Missing Manual, Snow Leopard Edition.
    Additionally, *Texas Mac Man* recommends:
    Quick Assist.
    Welcome to the Switch To A Mac Guides,
    Take Control E-books, and
    A guide for switching to a Mac.

  • How to bring the new window in front of old window

    Hi everyone,
    Here is what I have:
    there is a hyperlink on Page1.jsp, which opens another page Page2.jsp through onclick=
    window.open('./faces/Page2.jsp','mywindow','width=500','height=600');
    However, after Page2.jsp is opened in a new window, it is always behind the old window with Page1.jsp. That is, Page1.jsp always gets the focus. I have to click Page2.jsp at windows' bottom bar in order to bring it up.
    How to set Page2.jsp window in front of Page1.jsp window as default?
    Thanks in advance,

    it should have the focus
    jsut tried your code and my browser keeps focused on the other window
    i would be looking elsewhere for your problem
    maybe in your browsers setup?

  • Bring window to the front

    Hi,
      I want to bring the window to front when it is behind the window as well as when it is minmized. I have done for minimized state. But i was not able to bring the window to front when it is behind some window.
    Thanks & Regards,
    Jayagopal.

    Hi guys,
                  I found solution for this.
                   this.alwaysInFront=true
                   this.alwaysInFront=false;
    this will fix the problem.
    Thanks & Regards,
    Jayagopal.

  • How can I keep windows in front while using other apps?

    I want to keep a Preview window in front of all windows while I work in photoshop, how can I do that? I know it is possible, because I saw an artist do it on youtube. He had his references opened up in Preview, while working photohsop, and the Preview window some how stays above the Photoshop window. I know I can just have them side by side by using photoshop in window mode, and shtinking it into a half sized window, but I have porblem rotating the canvas and it is just to small to work when it is like that. He mangaed to use phoshop in full window mode (fills the whole screen) and still have his preview window stay in front. I asked him but I got no reply. So I was hoping some here would know.

    Yeah, I was also using Afloat before updating to Lion, but now it seems it is not compatible anymore. Mac should have that function (keep a window on top) built in - such an easy thing and so helpful, much more than all claimed "productivity" apps etc. Linux has it since always...

  • Xcode AppleScript Application: 2 Sent Actions To 1 Button

    Hello,
         I am making a Xcode AppleScript application, and when I press a button, it opens a new window. I open the new window with the sent action makeKeyAndOrderFront and set it to another window. However, the main window is still open. I want to connect the same button that opens the new window to the sent action perfromeClose but it completely changes the sent action instead of adding another one. Also, the window I want to close is the main window the application starts with and the release application when closed setting is off. If there is any way to open a new window and close another at once, I would like to know. 

    Okay. So this is what I have for the switchWindow:
    on switchWindow_(sender)
            current application's NSApplication's mainWindow's orderout:me -- close main app window
            otherWindow's makeKeyAndOrderFront:me2 -- bring some other window to the front
        end switchWindow:
    When I change the makeKeyAndOrderFront:me to the me2 identifier since that is the identifier I set for the window, it still does the same thing when it is just me, it seems to close the main window and the open it again. I tried looking at makeKeyAndOrderFront on the Class Reference and it only says to put the where me is. Also the me by itself is a purplish colour, but me2 is just black.

  • Forbid sending window to front after clicking on it.

    I have application with main window in AIR which is maximized on whole screen and a few "small" windows which are created from Window component (Window was the only option 'cause times to time I need move it out of main application) and live above main app window.
    I would like to have main app window always in the back and all other "small" windows in front of it. The problem is that whenever I click on main window system brings it to the front. So the question is how can I force AIR not to bring newly focused window to the front? I tried to set alwaysInFront=true on each "small" window (Window.NativeWindow.alwaysInFront) which worked but in the end it brought other problems and I didn't really liked the fact that they were always above all other application windows.
    I know that I could use NativeWindow.orderToFront() method and after clicking on main app window send it behind all others but all sent windows into front then blink. Perfect would be to suppress default behaviour and don't let system bring clicked window to front.
    Any idea?
    //pyso

    See if any of these provide pointers.
    *Various causes of sleep issues in Macs*
    [Post by Dale Weisshaar|http://discussions.apple.com/message.jspa?messageID=8980488] - general post on sleep issues.
    [Logitech keyboard drivers out of date after updates|http://discussions.apple.com/message.jspa?messageID=8999415]
    [Try safe boot, then rebooting normally|http://discussions.apple.com/thread.jspa?threadID=1906841]
    [Mac OS X: Why your Mac might not sleep or stay in sleep mode|http://support.apple.com/kb/HT1776]
    [A long list of sleep issue reports and comments|http://www.macintouch.com/readerreports/macosx10_4tiger/topic3083.html ]
    Check if third party USB devices or cards are causing problems.

  • What is "bring all to front"

    Under the Window menu is the item "bring all to front" and I have no idea what that means.  I thought it meant to get current windows shown but so far nothing happens when I click on that option.  ??????????????

    For the application showing in the upper left-hand corner, selecting that option brings all of its open windows to the front or on top of any other app's open windows.

  • App for Windows 8 are really bad

    The apps Microsoft made for Skype are really bad.
    Any chance for a update so you have some chance of getting to things like call and chat and make it more clear who are online.
    Out of a lot of bad apps for windows 8 this take the cake!!

    Is there a reason "Elaine" (http://community.skype.com/t5/user/viewprofilepage/user-id/88058) had to edit/moderate EVERY one of the posts here?
    This thread started some time ago, so please correct me if I'm wrong, but it looks like the word "sucks" was replaced with "are really bad" in the last 12 hours.
    The only reason I bring this up is because this is censorship and let me tell you Elaine that it is NOT helping Microsoft/Skype's case here!
    If something SUCKS it means it IS REALLY BAD. The word "sucks" is VERY well known throughout the english speaking world to mean this. Any moderation on the grounds that the moderation was done "In deference to international sensibilities" is ridiculous! This stinks of corporate censorship!
    Rather than censor everyone's comments, how about you (the company) just fix the issues and let us know they are fixed OR if fixing them isn't going to happen in the near future at least let us know that you're working on it!
    I have not seen even one official comment by Skype or Microsoft staff regarding this issue! NOT ONE! That implies to me that there is something seriously wrong and its almost definitley not going to be fixed any time soon!
    Perhaps after all these years of being a happy customer it is time to start looking at moving away from Skype to another service...

Maybe you are looking for

  • ITunes 9 Genius Mixes (having issues)

    I turned off Genius, turned it back on to get Genius Mixes and have not been able to actually play a Genius Mix yet! When I go to the Genius Mix icon and then try and select a Mix, I hit the Play button that appears in the middle of the 4 random cd c

  • BI setup: WebAS ABAP Setting - Java to ABAP communication problem

    Hello, i've got a problem during intallation of BI in Netweaver 2004s. The Diagnostics & Support Desktop Tool reports errors in WebAS ABAP Settings. These errors are: - "Web Template Validation failed due Java to ABAP communication problem (return co

  • Can I Download an HTML Web Photo Gallery?

    New iPad owner here. I have put up on my own web site several photo galleries - html rather than flash, most (but not all) created with Adobe LightRoom. Can I download them to my iPad for viewing when I am offline? Thanks, --Bob

  • RAM and processor in a IBM Thinkpad 380D

    Hi, I'm wondering how much RAM i can put in my IBM Thinkpad and if possible, can i put a new processor in it? Jamos

  • Mouse Won't Scroll Both Ways

    The wireless Apple mouse on my late 2007 Mac Book all of a sudden will only scroll down, not up. It was that way this morning in 10.4.11 and still this afternoon after upgrading to 10.5.1. Any thoughts on how to get my up-scroll back?