Mouse clicks on windows without focus

Is there a way to recognize when a user is clicking on a defocused JFrame, to bring it to the front, as opposed to clicking to set a text cursor position within the JFrame? For example, if I click on a terminal emulator I've developed, the text cursor within the emulation window goes to the click, even if the emulator is only being clicked to give it focus. (I've also noticed a similar phenomenon with JBuilder, by the way.)
By comparison, look at any native Windoze or Macintosh application; very few (if any) behave that way.

This must be very hard for LabView to do.  I just need to use LabView to run another application. Then have labview emulate a mouse click on that application. I have found out the windows message using Spy++ for the mouse click.  Now in LabView I need to move the mouse to a certain position on that application.  How could LabView know where to move the mouse cursor.  I found some move cursor vi on this forum, then the coordinate of the position on the application (the active window) is not known.  Do I need to map out the position in advance using Spy++?  That seems not reasonable as later on the position may change. 
LabView is indeed good for Hardware automation and data acquisition, but when it comes to performing some software automation tasks (i.e., runing a couple of other applications automatically), it doesn't seem to be powerful at all, unless the other applications are ActiveX capable, or you have their code to build Dlls.  Most of time, one only need to automate the process of running a couple of other programs, then have data presented.

Similar Messages

  • Running bootcamp and right mouse click on windows

    Hi all, I was just looking to setup WinXP on my machine and wanted to know how my macbook pro laptop mouse would deal with the right mouse click on windows? If I dont have an external mouse plugged into the laptop is there no right mouse click available?
    Thanks!

    Download a program called AppleMouse at http://www.softpedia.com/get/Desktop-Enhancements/Other-Desktop-Enhancements/App le-Mouse-Utility.shtml. Unzip it the copy-and-paste "applemou.exe" to this directory through Windows Explorer: C:\Documents and Settings\YOUR USER NAME\Start Menu\Programs\Startup. Once copied, restart your computer back into Windows and login. You'll be able to right-click by holding down the control (ctrl) button and clicking.
    MacBook Pro 17" 2.16GHz, 120GB, 2GB, Matte, 120GB USB Western Digital HDD   Mac OS X (10.4.6)   Windows XP Dual-Boot, Toasting Over 189.6 degrees Fahrenheit in CoreDuoTemp

  • Activating a Window Without Focus

    Hello,
    I'm using LabVIEW 8.6, I would like to give an unusual behavior to a subVI window when opened: I'd like the window to be activated without giving focus to it. What I mean, is that I would like the window to be able to catch even on the front panel like keystroke or mouse click without giving focus to this window. I'd like the focus to stay on another window.
    A good example of what I want to do is the microsoft visual keyboard installed with Windows: when the visual keyboard in open you can press any button without giving focus to the window. I'd like to reproduce the same behaviour with a labview window.
    I don't think it's possible with properties or invoke node, I think there might be something to do with the use of user32.dll. If anyone as already done that, or knows how to do it, it would be great.
    Thanks for helping.
    Clément
    DAM

    Hi,
    - Have you tried making the main VI modal? Steps are described in this KB
    - To do this programmatically, you will need to use the lvwutil32.dll like here 
    I googled your question and I found some good information this MSDN forum, I think it may help you to apply it to your code.
    Hopefuly this helps.
    Regards, 
    Steve M.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> Vidéo-t'chats de l'été : présentations techniques et ingénieurs pour répondre à vos questions

  • Automator - How do I: Mouse Click, Move Windows, and more

    Hello,
    I am attempting to create my own Automator programs and for a while I had some that worked nicely. I have recently been tweaking my iMac so that it can "think" on its own (by automator of course) and do things for me. However, I've run across a block with Mavericks (I believe it's due to Mavericks).
    1. How can I get Automator to register a mouse click? "Watch me do" does not seem to want to work for me at all. I also would prefer if it would just be a registered mouse click, but not actually use the mouse (I know this is possible) so that if I'm doing something and it runs, it won't disturb my mouse and I can keep working.
    2. How can I register a keyboard stroke? Same as above
    3. How can I have automator move windows? I have two monitors and there are times when I may want it to move a window from one mintor to another
    The following is a list of all the things I'm attempting to accomplish at the moment (with other things when I think of them) with automator (either through applications, folder actions, or ical actions):
    1. Register a mouse click at a given area or on a given element in a safari page
    2. Register a keyboard stroke in a given program (be able to focus on a program and then do the keystroke)
    3. Move windows from one location to another
    4. Full-screen and Un-full-screen iTunes at certain times of day
    5. Download all purchased items on iTunes that aren't on the computer (sometimes iTunes doesn't download stuff if it was downloaded on my MacBook Pro first)
    6. Automatically voice read reminders (that I've set in Reminders) each day at a given time (I can use loop to repeat it to make sure I hear it all)
    I'll think of more of course, but the mouse click, keyboard stroke, and moving windows is the big thing I'm trying to figure out how to do. Can anyone help?
    Also, I am not a computer tech. I am tinkering with this because it's fun and helpful, but an answer of "just use applescript" or "just use java" will likely just give me a headache. I know that it's going to be one of those codes, but I'm hoping someone has a "base" code that can be copied and pasted that's just a standard click that I can adjust for where I need to click and what process I need to click on.
    If there is an Action Pack that includes a "Register Mouse Click" and/or "Register Keyboard Stroke", then that would work great, but the only action packs for automator I've seen that work with Mavericks is for photoshop.

    You're asking for a lot in one post.  It would be better to break your requests down a bit. 
    For example, to deal with mouse clicks, you can use the Automator Action Run Shell Script with this python script:
    import sys
    import time
    from Quartz.CoreGraphics import *
    def mouseEvent(type, posx, posy):
            theEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonLeft)
            CGEventPost(kCGHIDEventTap, theEvent)
    def mousemove(posx,posy):
            mouseEvent(kCGEventMouseMoved, posx,posy);
    def mouseclick(posx,posy):
            mouseEvent(kCGEventLeftMouseDown, posx,posy);
            mouseEvent(kCGEventLeftMouseUp, posx,posy);
    ourEvent = CGEventCreate(None);
    # Save current mouse position
    currentpos=CGEventGetLocation(ourEvent);
    # Click the "Apple"
    mouseclick(25, 5);  
    # 1 second delay       
    time.sleep(1);        
    # Restore mouse position
    mousemove(int(currentpos.x),int(currentpos.y))
    It will look like this in Automator:
    To drag something (i.e. a window, a file icon) from position 40,60 to 60,300:
    import time
    from Quartz.CoreGraphics import *
    def mouseEvent(type, posx, posy):
               theEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonLeft)
               CGEventPost(kCGHIDEventTap, theEvent)
    def mousemove(posx,posy):
               mouseEvent(kCGEventMouseMoved, posx,posy);
    def mouseclickdn(posx,posy):
               mouseEvent(kCGEventLeftMouseDown, posx,posy);
    def mouseclickup(posx,posy):
               mouseEvent(kCGEventLeftMouseUp, posx,posy);
    def mousedrag(posx,posy):
               mouseEvent(kCGEventLeftMouseDragged, posx,posy);
    ourEvent = CGEventCreate(None);
    # Save current mouse position
    currentpos=CGEventGetLocation(ourEvent);
    # move mouse to upper left of screen
    mouseclickdn(40, 60);
    # drag icon to new location
    mousedrag(60, 300);
    # release mouse
    mouseclickup(60, 300);
    # necessary delay
    time.sleep(1);
    # return mouse to start positon
    mouseclickdn(int(currentpos.x),int(currentpos.y));
    For keystokes in AppleScript (which can be added to Automator with the Run Applescript Action) see: http://dougscripts.com/itunes/itinfo/keycodes.php

  • Window without focus

    Hello!
    Can i build in Forms 11g window that will not get a focus by mouse?
    The window will show a canvas with buttons.
    Thanks!

    Resolved by myself.

  • Mouse click on graph without event handling

    Is there a way to detect mouse click on a graph without the event handling? My base version of LabVIEW does not have event handling features.
    Thanks,
    Ryan
    Solved!
    Go to Solution.

    Leaving out the Event Structure seems like cruel and unusual punishment.  My scorn is divided about 80/20 between NI for selling it and whoever tried to save a few bucks by buying it and then sticking it to you to workaround.  Perhaps you are a student in which case you are free labor and it is all good.
    Maybe your boss is a purist and dislikes Event Structures because they break the dataflow paradigm.  The alternative is of course polling, and in this case you have plenty of data flowing!  Unfortunately 99.9% of it is worthless.  Here is a little example in LV8.2 (don't know your version) that uses polling to check on the mouse button.  I only added a simple check for the button being pressed, if you want to know click (down/up) you can add a shift register and look for transitions in the button.  I do check that the front panel is up front, otherwise it will still register clicks even though you may be surfing the web.
    Hopefully everything is in the base package.
    Attachments:
    MouseClickNoEvent.vi ‏26 KB

  • OPENING A NEW BROWSER TAB/WINDOW WITHOUT NAVIGATING TO IT

    Hello there,
    I am using flex navigateToUrl( urlRequest, "_blank"); function to open a new browser window. What it does is it also navigates to newly opened window by default. I want to remain in the same page, but still open this new window without focusing it.
    Is there a way to do that
    Thanks.

    I would update your Adobe PDF plug-in first - it is 10.1.7.x and my version says 11.3.x) To do this, go to the [http://mozilla.com/plugincheck Mozilla Plugin Check site].
    Once you're there, the site will check if all your plugins have the latest versions.
    If you see plugins in the list that have a yellow ''Update'' button or a red ''Update now'' button, please update these immediately.
    To do so, please click each red or yellow button. Then you should see a site that allows you to download the latest version. Double-click the downloaded file to start the installation and follow the steps mentioned in the installation procedure.

  • How to simulate mouse click

    Hello,
    is it possible to simulate and control a mouse click in windows with labview 7.1. I am able to control the mouse coordinates but not right and left mouse click. Is there a available VI that can do that?
    Lukas

    I have answered this in the other thread where you asked this. Please don't post the same questions to multiple threads.
    After looking at the VI there, it uses the PostMessage function to post a mouse down message to a specific window. You can try using MouseEvent or SendInput to simulate a general mouse click (One of them is no longer supported, I can't remember which. You can find the details in the MSDN).
    Try to take over the world!

  • Changing focus of windows without mouse click (X-mouse)

    X-mouse allows you to, with mouseover, activate and use windows without having to draw them to the front. So you can, for example, hover your cursor over a window that's only partially visible type to it without it coming to the front. It was one of my favorite add-ons in Windows (I used TweakUI to activate it).
    However, despite looking long and hard, I have not seen anything remotely like it available for Mac. I know that the capability exists, because occasionally it works automatically (for example within the Finder).
    Has anyone found a way to do this in Leopard?

    Thanks for the tips; I did know about them and use them frequently.
    My problem is that often I like to keep track of multiple windows, and it's just annoying to be shuffling through them all the time -- one is often just a background window that I want to type things into time and again.
    Well, I suppose I should write to feedback sometime.

  • How can i open a link in new window (shift + Mouse Click) while not switching to the new window

    I want to open a new window (shift + Mouse Click) while not switching to the newly opened window. The focus should remain on the window from where i have opened the link.

    You can do that with tabs, but not with windows AFAIK.

  • Lose of focus (mouse click/enter key)

    Hello,
    we have a problem customers are complaining about for quite a while now, but despite our efforts, we can not fix it or at least determine with certainty the problem cause.
    We have an application launching forms apps, and from time-to-time we completely lose the focus on this form (generally after typing ENTER in a filter), I mean by focus, we cannot click anymore (cursor seems to stay on a object), we cannot press enter anymore (we get a 'Not defined key function') and so on...
    I heard somewhere that it could be due to 'KEY-OTHERS' trigger not handling correctly the ENTER-KEY. But I need this trigger for my filters, or is there another way? KEY_ENTER does only navigate from field to another.
    I found something which was able to remove focus lost (kind of a hack while trying to fix this on an on), but the problem is I had to remove this, because it blocks the opening of new windows or popups. It was a mouse-click trigger on forms triggers level:
    Go_Record(:System.Mouse_record);
    Go_Item(:System.Mouse_Item);
    But this blocks any window opening, and it also blocks some other tools we have developed.
    Thanks,
    Best regards,
    G.
    EDIT: Forms 11g, and I am pretty sure we had not that much problems with 10g
    EDIT2: I read the same kind of topics in the forum, but no patch seems to help
    AND we use JRE 1.7....
    Edited by: lakers on Jan 14, 2013 11:56 PM
    Edited by: lakers on Jan 14, 2013 11:59 PM

    this problem occurs with some of versions of JRE. Try with JRE JInitiator 1.3.1.22. Also unstalled all others JRE if exists.
    A file called fmrpcweb.res has also been provided which gives the Microsoft Windows client/server keyboard mappings. To use this file, rename fmrpcweb.res to fmrweb_orig.res, and copy fmrpcweb.res to fmrweb.res. Alternatively, use the term parameter as described above.
    By default, whether deploying client/server or over the Web pressing the ENTER key takes the cursor to the next navigable item in the block. To override this default behavior it is necessary to modify the forms resource file to revise the key mapping details.
    Modify fmrweb.res and change the Forms Function Number (FFN) from 27 to 75 for the Return Key. The line should be changed to the following:
    10 : 0 : "Return" : 75 : "Return"
    By default, the line is displayed with an FFN of 27 and looks as follows:
    10 : 0 : "Return" : 27 : "Return"
    This line should NOT fire the Key-Enter trigger since the Return or Enter key is actually returning the Return function represented by the FFN of 27. The FFN of 75 represents the Enter function and fires the Key-Enter trigger.
    http://docs.oracle.com/cd/E24269_01/doc.11120/e24477/configure.htm#i1077054
    please mark correct/helpful if problem is solved..
    Edited by: Askdineshsinghminhas on Jan 15, 2013 5:28 AM

  • No KeyDown detected on a new Window presented with ShowDialog (a mouse click is required before working)

    Hello,
    I shorter the code.
    In MainWindow I have a button to open a SecondWindow 
    private void ButtonNextWindow_Click(object sender, RoutedEventArgs e)
                WindowState = WindowState.Minimized;
                var secondWindow = new SecondWindow();
                secondWindow.ShowDialog();
                WindowState = WindowState.Normal;
    In the second window class I declared a KeyDown event called onKeyDown
    private void onKeyDown(object sender, KeyEventArgs e)
                MessageBox.Show("Key Pressed");
    well... it works only if I first click in the Second Window with the mouse, wherever I want.
    I would avoid this click; seems something related with the Keyboard focus.
    Thanks in advance,
    Vincenzo

    Set second window to focus after you set first window state to normal
    private void ButtonNextWindow_Click(object sender, RoutedEventArgs e)
                WindowState = WindowState.Minimized;
                var secondWindow = new SecondWindow();
                secondWindow.ShowDialog();
                WindowState = WindowState.Normal;
    secondWindow.Focus();

  • Focus should not be lost on mouse click

    hai,
    i have a problem with validating a jtextfield,
    i wrote a code for that jtextfield,such that if any error occurs while entring the message is shown on focus is gained on to that textfield,even if user tries to move to the next component using tab he should correct the entry only then focus is shown to the next component on pressing tab,but this failed with mouse click,i mean other than tab if he uses mouse and click on the next component it goes to the next componenet without validating the textfield entry.
    so please help me in disabling mouse click event.

    how are you validating it then? Using a focus listener for focuseLost() shouldn't care about tab or mouse clicks.

  • How to speed up Windows 7's reaction time to my mouse click

    Hi.  We just got new computers at work.  They have approximately 4 gigs of RAM and have Window's 7 on them.  Prior to that we had abysmally old computers running Windows XP.  We have Microsoft Office 365 on them (Not sure how much
    that matters) and it is connected to both an older server and SharePoint.
    I'm positive that there isn't actually a problem with the computer or Windows 7 - it might be really basic harware, however it is brand new.  But everything lags.  Its extremely minor and no one else in the building notices it.  My co-workers
    all say the entire system is faster in every possible way.  However, I get the same problemwith other computers in the building, at least four others.  It lags just slightly when I click on anything, anywhere (Left and Right click).  Letters
    appear to lag behind my key presses, just enough for me to notice and no one else (I do wonder if this is caused by Microsoft Office, since it is so clunky).  I also think the mouse pointer moves slower than the pointers on XP.  Its difficult
    to tell though since I no longer have the old computer to compare. 
    This lag did not exist with the old computers.  My clicks were instantaneously carried out and the appearance of the letters I pressed was immediate.  It might be very minor, but it is driving me insane.  I can't watch the screen when I type
    because it makes me slightly nauseous.  And the click lag slows down my entire process.  I'm pretty sure it isn't actually a problem with Windows 7, I think the OS is just like this.  Is there a way to speed up the reaction time of the mouse
    click and keyboard button presses?
    Thank you for the taking the time.

    1. Use performance monitor for analysis. Without knowing processes that influence response it is hard to give any reasonable advice.
    2. In my experience computers with integrated video card are generally slower. (One such example sits on my desk. It is based on D2700 processor and chipset. 4GB RAM, usable 3.23GB. )
    3. There are several tweek procedures that may increase the response. Start with Win+Pause/Break -> Advances System Settings -> Advance -> Performance -> Performance Options and look here for optimal, disable autotuning, sometimes QoS, prefer
    IPv4 over IPv6 (if you still use IPv4, set bit 5), etc
    4. Perhaps Performance forum is better fit for your problem.
    Regards
    Milos

  • In Windows Vista 7, SP2, Firefox takes several minutes to launch, is non-responsive, hangs sometimes launches additional windows without my clicking. I get error code 10003.

    I'm using Firefox 6.0.2 in Wndows Vista 7, SP2. I'm using Norman Security Suite anti-virus software. Firefox behaves erratically. Sometimes it takes several minutes to launch. If I launch an new window it sometimes hangs. It launches two extra windows without my having clicked to launch. Always two. I get an error code 10003 but when I search for this I get no information about it.
    Windows Task Manager shows plugin-container for Firefox running in addition to firefox.exe.

    Troubleshooting extensions and themes
    * https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes
    Restore the default home page
    * https://support.mozilla.com/en-US/kb/How%20to%20set%20the%20home%20page#w_restore-the-default-home-page
    Clear Cookies & Cache
    * https://support.mozilla.com/en-US/kb/Template:clearCookiesCache
    Clear the Network Cache
    * https://support.mozilla.com/en-US/kb/How%20to%20clear%20the%20cache#w_clear-the-cache
    Check and tell if its working.

Maybe you are looking for

  • Issue Integrating with spaces

    I am integrating Web center portal and web center spaces, we created some spaces in web center and trying to get the space details into out web center portal using space Web services. But not able to succeed even after doing the security configuratio

  • Shared Calendar Interoperability (2013 / 2007)

    Hello, We have two Exchange servers in our Organization, a 2007 where most mailboxes reside, and a 2013 where we are slowly doing a one off user migration here and there to test the waters so to speak. We have users that constantly have/had problems

  • How to transfer playlist from windows xp to Mac

    I purchased some songs in iTunes on a Windows XP system. But my CD burner doesn't work, so now I want to transfer the same playlist to my MacBook Pro so I can burn the CD on the Mac. How do I transfer iTunes Playlist from a Windows XP computer to a M

  • Goods receipt/Stock account

    Dear all!   Say i am purchasing a ROD. I am raising a PO in KGs and receiving it in MM. i.e., I am maintaining the unit conversion in the material master (in additional data of Purchasing view) as below..     1KG = 100MM. Where KG is ordering unit am

  • Simple webDynpro - RFC dont show the Data in table

    Hello all. I`m develop a simple application test in NWDS. This application execute data in a table from the standard function module BAPI_COMPANY_GETLIST. simple return the list of companys. But when i execute the application, its dont shw any errors