Mouse Clicks/Positons in Pictures!

Even a guru learns new things...
I just discovered the use of a picture control/indicator to detect mouse positions and clicks! What a wonderful thing. I have LabVIEW 6.0.2, and have, up to now, not known about this. To all those out there who I recommended to use the mouse click API for Windows, I apologize. This is such a marvelous way to get Mouse information. It's easy, efficient, and completely held within LabVIEW.
If anyone is wondering what I am talking about, go to Help>Examples in LabVIEW and go to the Examples>Advanced Examples>Picture Control Examples>Mouse Control.vi to see what I mean. I didn't realize that if you dropped a picture control (even as an invisible object!) on the front panel that you could use prop
erty nodes to get x and y positions, and also the left, right, shift left or right, and third mouse button click information.
Of course, I hear that this may all be somewhat obsolete in LabVIEW 6.1, but for those still using 6.01 or earlier, it's a great tool that means you don't have to mess with API, MFC or dlls.
Any comments or questions?

Hi,
This is ideal for some applications, you can even build drag/drop functions
into a picture control using this. But there are some backdraws (or one very
big one);
The picture control needs to be the control on front.
The picture control needs to cover the entire area you need information on.
This implies that normal functions of controls and indicators cannot be
used, not even simply clicking on a button...
It also makes the screen updates take a lot more proccessor time, because
controls/indicators are overlapping. In the example for instance, the charts
are not clear to read, because they're flickering.
Regards,
Wiebe.
"Labviewguru" wrote in message
news:[email protected]..
> Even a guru learns new things..
>
> I just discovered the use of a picture control/indicator to detect
> mouse positions and clicks! What a wonderful thing. I have LabVIEW
> 6.0.2, and have, up to now, not known about this. To all those out
> there who I recommended to use the mouse click API for Windows, I
> apologize. This is such a marvelous way to get Mouse information.
> It's easy, efficient, and completely held within LabVIEW.
>
> If anyone is wondering what I am talking about, go to Help>Examples in
> LabVIEW and go to the Examples>Advanced Examples>Picture Control
> Examples>Mouse Control.vi to see what I mean. I didn't realize that
> if you dropped a picture control (even as an invisible object!) on the
> front panel that you could use property nodes to get x and y
> positions, and also the left, right, shift left or right, and third
> mouse button click information.
>
> Of course, I hear that this may all be somewhat obsolete in LabVIEW
> 6.1, but for those still using 6.01 or earlier, it's a great t
ool that
> means you don't have to mess with API, MFC or dlls.
>
> Any comments or questions?

Similar Messages

  • Event on Mouse Click Released in a Picture ring

    Hello All.
    I have a picture ring in my program. I have made its callback function and the default event i.e. EVENT_COMMIT occurs behind the code and it actually performs event on click. Now i want to make its action happen not on click but when i release my mouse click. i,e, i want to make event happens when i release my mouse click. Is there any other event for that or what should i do
    Regards.

    What about EVENT_LEFT_CLICK_UP?

  • 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

  • A script that captures the coordinates of the mouse clicks and saves them into a file

    Hello,
    I'm trying to create a cartoon taking a movie (I've chosen blade runner) as base. I've got the real movie and I've exported all the pictures using VirtualDUB. Now I have a lot of images to modify. I would like to modify the actors faces with the faces generated by Facegen modeller. I'm thinking how to make the whole process automatic because I have a lot of images to manage. I've chosen to use Automate BPA,because it seems the best for this matter. I'm a newbie,so this is my first attempt using Adobe Photoshop and Automate BPA. I wrote a little script. It takes a face generated with Facegen modeller and tries to put it above the original actors faces. But it doesn't work very good and I'm not really satisfied,because the process is not fully automated. To save some time I need to write a script that captures the coordinates of the mouse when I click over the faces and that saves them into a file,so that Automate BPA can read these coordinates from that file and can put the face generated with Facegen Modeller above the original face. I think that Automate BPA is not good for this matter. I think that two coordinates are enough,X and Y. They can be the coordinates of the nose,because it is always in the middle of every face. It is relevant to knows how big should be the layer of the new face,too. This is the Automate BPA code that I wrote :
    <AMVARIABLE NAME="nome_foto" TYPE="TEXT"></AMVARIABLE>
    <AMVARIABLE NAME="estensione_foto" TYPE="TEXT"></AMVARIABLE>
    <AMSET VARIABLENAME="nome_foto">br</AMSET>
    <AMSET VARIABLENAME="estensione_foto">.jpeg</AMSET>
    <AMVARIABLE NAME="numero_foto" TYPE="NUMBER"></AMVARIABLE>
    <AMVARIABLE NAME="coord_x" TYPE="NUMBER"></AMVARIABLE>
    <AMVARIABLE NAME="coord_y" TYPE="NUMBER"></AMVARIABLE>
    <AMWINDOWMINIMIZE WINDOWTITLE="Aggiungere_layer - AutoMate BPA Agent
    Task Builder" />
    <AMWINDOWMINIMIZE WINDOWTITLE="AutoMate BPA Server Management Console
    - localhost (Administrator)" AM_ONERROR="CONTINUE" />
    <AMENDPROCESS PROCESS="E:\Programmi_\Adobe Photoshop
    CS5\Photoshop.exe" AM_ONERROR="CONTINUE" />
    <AMRUN FILE="%&quot;E:\Programmi_\Adobe Photoshop CS5\Photoshop.exe&quot;%" />
    <AMPAUSE ACTION="waitfor" SCALAR="15" />
    <AMSENDKEY>{CTRL}o</AMSENDKEY>
    <AMPAUSE ACTION="waitfor" SCALAR="1" />
    <AMINPUTBOX RESULTVARIABLE="numero_foto">Inserire numero FOTO di
    partenza -1</AMINPUTBOX>
    <AMINCREMENTVARIABLE RESULTVARIABLE="numero_foto" />
    <AMPAUSE ACTION="waitfor" SCALAR="1" />
    <AMMOUSEMOVEOBJECT WINDOWTITLE="Apri" OBJECTNAME="%nome_foto &amp;
    numero_foto &amp; estensione_foto%" OBJECTCLASS="SysListView32"
    OBJECTTYPE="ListItem" CHECKOBJECTNAME="YES" CHECKOBJECTCLASS="YES"
    CHECKOBJECTTYPE="YES" />
    <AMMOUSECLICK CLICK="double" />
    <AMPAUSE ACTION="waitfor" SCALAR="10" />
    <AMSENDKEY>{CTRL}+</AMSENDKEY>
    <AMPAUSE ACTION="waitfor" SCALAR="20" />
    <AMSENDKEY>l</AMSENDKEY>
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSEMOVE MOVEX="429" MOVEY="281" RELATIVETO="screen" />
    <AMMOUSECLICK />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSEMOVE MOVEX="659" MOVEY="281" RELATIVETO="screen" />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSECLICK />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSEMOVE MOVEX="659" MOVEY="546" RELATIVETO="screen" />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSECLICK />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSEMOVE MOVEX="429" MOVEY="546" RELATIVETO="screen" />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSECLICK />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSEMOVE MOVEX="429" MOVEY="281" RELATIVETO="screen" />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSECLICK />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMSENDKEY>v</AMSENDKEY>
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSECLICK CLICK="hold_down" />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSEMOVE MOVEX="131" MOVEY="99" RELATIVETO="screen" />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSEMOVE MOVEX="99" MOVEY="162" RELATIVETO="screen" />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSECLICK CLICK="release" />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMINPUTBOX RESULTVARIABLE="coord_x">Inserire coordinata X</AMINPUTBOX>
    <AMINPUTBOX RESULTVARIABLE="coord_y">Inserire coordinata Y</AMINPUTBOX>
    <AMMOUSEMOVE MOVEX="200" MOVEY="200" RELATIVETO="screen" />
    <AMMOUSECLICK CLICK="hold_down" />
    <AMMOUSEMOVE MOVEX="%coord_x%" MOVEY="%coord_y%" RELATIVETO="position" />
    <AMMOUSECLICK />
    and this is a short video to explain better what I want to do :
    http://www.flickr.com/photos/26687972@N03/5331705934/
    In the last scene of the video you will see the script asking to input the X and the Y coordinates of the nose. This request is time consuming. For this reason I want to write a script that captures automatically the coordinates of the mouse clicks. The only thing to do should be click over the nose and the script should make the rest. As "c.pfaffenbichler" suggested here : http://forums.adobe.com/thread/775219, I could explore 3 ways :
    1) use the Color Sampler Tool’s input with a conventional Photoshop Script.
    2) use After Effects would provide a better solution.
    3) Photoshop’s Animation Panel might also offer some easier way as it might be possible to load two movies (or one movie and one image) and animate the one with the rendered head in relation to the other.
    Since I'm a totally newbie in graphic and animation,could you help me to explore these ways ? Thanks for your cooperation.

    These are the coordinates of the contours of the face that you see on the picture. Can you explain to me how they are calculated ? The coordinates of the first colums are intuitive,but I'm not able to understand how are calculated the coordinates of the second one.
    Thanks.
    1 COL     2 COL (how are calculated these values ?)
    307.5000 182.0000 m
    312.5000 192.0000 l
    321.5000 194.0000 l
    330.5000 193.0000 l
    335.0000 187.0000 l
    337.0000 180.5000 l
    340.0000 174.0000 l
    338.5000 165.5000 l
    336.0000 159.0000 l
    331.5000 153.0000 l
    324.5000 150.0000 l
    317.0000 154.0000 l
    312.5000 161.0000 l
    309.0000 173.0000 l
    307.5000 182.0000 l
    Message was edited by: LaoMar

  • How do I Get the value from a mouse click - on a waveform graph?

    If I have made a plot into a Waveform Graph and later want to do a zoom of my data
    (Not zoom into the Waveform Graph, but regenerate the data). How do I read the mouse
    coordinate if I click on the graph window. I know how to put up the horiz and vert
    cursors but don't know how to just read the mouse click. I would really like to
    follow the windows standard that identifys a rectangle by clicking and draging and then
    be able to read the corners of the rectangle. Thanks, Rick
    PS: Using Labview 6i

    I would recommend to 'translate' your graph in a picture and dislay it in a picture control (see picture examples in LV6).
    Once you did it, pictures have an extremely useful property called Mouse that returns the mouse coordinates and click events when you place the cursor on the picture.
    By this you can re-arrange the graph on picture appearance.
    There are also other methods such as using a Window's API that returns the mouse position referred to the whole screen window, but I believe this would be much more difficult to implement.
    Let me know if this was clear and if you need an example vi.
    Good luck,
    Alberto

  • Touch screen mouse clicks

    Hi, id firstly like to begin by saying i am only learning Labview at the minute so i appeal for some patience,
    I have done the relevant searchers also but i am unable to find an answer to my question.
    Ok i am using a 17.5" resistive touchscreen to track the path of a ball which is placed on the screen..I want the screen to communicate the x-y co-ordinates to an x-y graph on the front panel of my program. In my attemp at doing this i have used a previous labview example which uses a mouse click event structure. However this means the touchscreen acts as a second mouse. My problem is that the touchscreen is not communicating with the graph directly as it is controlling the entire pc screen meaning it can interfere with the program.
    I have included a two page word doc with screenshots which hopefully can explain better what i mean. One screen shot is the display result of the Labview program, the second resembels the path of the ball on the touch screen
    Page one of the doc shows the ball tracking when only the first quadrant of the screen is used.
    Page two of the doc shows the result when the full touchscreen is used. as the touch screen acts as a mouse it is only able to track the ball when it is in the same locating as the graph on the screen.
    I have found it difficult to explain my problem but i hope you gurus can understand and provide me with a solution!
    I am hoping someone can give me an answer that will allow the touchscreen to communicate with the labview x-y graph only.
    Thanks in advance for any help.
    Attachments:
    Doc1.docx ‏277 KB

    Please do not embed screenshots inside of Word documents. Not everybody has Word, and even if they do, most people don't like using Word 2007+. Attach the screenshots as PNG files. DO NOT ATTACH BITMAPS OR CHANGE THE EXTENSION OF BITMAPS TO GET AROUND THE BAN ON BITMAPS. Don't worry I'm not screaming specifically at you. It's just my normal scream sentence.
    As for your issue, there's a couple of things that are unclear from your description. Before offering a solution it's better to understand the objective here. The example you are using was specifically designed to only track mouse movements over the graph. However, your description seems to imply that you want to draw on the graph regardless of where the mouse is on the screen. Is this correct? If so, then you need to use the Input Device Control VIs to poll the position of the mouse, as that returns the mouse coordinates globally (search the examples for "mouse" and look at the "Basic Input Demo" example). Second, why an XY graph? Are you drawing a bouncing ball over some graphs? I would think you'd want to use the picture control.

  • Why does the ALT key disable mouse clicks on some machines?

    I have a drawing program, the main Window of which extends JFrame and contains a Canvas, which extends JPanel. The Canvas has a MouseAdapter, KeyAdapter and JMenuBar. It also has a Tools palette, which extends JDialog and has Buttons, which extend JToggleButtons.
    One button is called Zoom. After pressing this button, you can Zoom In and Zoom Out by clicking the mouse on a point of the illustration. It differs from pressing Ctrl Plus and Ctrl Minus, because the point where you click is kept in place, and only all the other points move.
    Zooming In is done by clicking the mouse and Zooming Out is done by pressing the ALT key and clicking the mouse. The Zooming In works on all computers, but for some strange reason, the Zooming Out doesn't work on all computers. The computer where it doesn't work, after pressing the ALT key and clicking the mouse, it does not recognize the mouse click, and never reaches the mousePressed method in my debugger.
    The computer where it doesn't work has the Windows XP Professional operating system. But some computers where it does work have the same operating system. The problem also does not depend on the keyboard or mouse, because I tried a different keyboard and mouse, and it still didn't work.
    I wonder if the reason why it doesn't work on some computers has to do with that the ALT key is also used differently (which might depend on the operating system)? Pressing the ALT key and clicking the mouse Zooms In a picture by keeping the point in place and only moving all the other points
    I do not want to use a different key, since one release of my program is a plugin for Photoshop, and Photoshop also uses the ALT key to achieve the same thing.
    Thanks for checking on this! I will appreciate your help!

    Ok, I did apply KeyBindings. Since the AnanyaCurves class extends JFrame, I couldn't apply KeyBindings there, but I could apply KeyBindings to my CurveCanvas class, which extends JPanel, which extends JComponent. However I still have my first two problems:
    1) After pressing the ALT key, clicking the mouse doesn't get recognized. You never reach the mousePressed method, where it's supposed to exit the program.
    2) After opening a menu, such as the Nothing menu by pressing ALT and N, pressing a key which is not an accelerator key of a menu doesn't get recognized, such as pressing the E key. You never reach the actionPerformed method of the exitF action, where it's supposed to exit the program.
    Here is my SSCCE with the KeyBindings:
    import java.awt.*;
    import java.awt.event.*;
    import java.lang.*;
    import java.lang.reflect.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.plaf.*;
    public class AnanyaCurves extends JFrame
      CurveCanvas canvas;
      JMenuBar menuBar;
      Command quitCmd;
      JMenu fileMenu, nothingMenu;
      JMenuItem quitItem, nothingItem;
      boolean alt;
      public AnanyaCurves(Dimension windowSize)
        Font boldFont = new Font("Verdana", Font.BOLD, 12);
        Font plainFont = new Font("Verdana", Font.PLAIN, 12);
        Object top;
        Basics.ananyaCurves = this;
        alt = false;
        try
          UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
          SwingUtilities.updateComponentTreeUI(this);
        catch(Exception e)
        UIManager.put("MenuItem.acceleratorFont", new FontUIResource(UIManager.getFont("MenuItem.acceleratorFont").decode("Verdana-PLAIN-12")));
        Basics.ananyaCurves = this;
        enableEvents(AWTEvent.WINDOW_EVENT_MASK);
        setTitle("Ananya Curves");
        Dimension docSize = new Dimension(274, 121);
        canvas = new CurveCanvas(docSize);   
        menuBar = new JMenuBar();
        setJMenuBar(menuBar);
        fileMenu = new JMenu("File");
        fileMenu.setMnemonic('F');
        fileMenu.setFont(boldFont);
        quitCmd = new Command("quit", "ctrl Q");
        quitCmd.putValue(Action.NAME, "Quit");
        quitItem = new JMenuItem(quitCmd);
        quitItem.setFont(plainFont);
        fileMenu.add(quitItem);
        menuBar.add(fileMenu);
        //fileMenu.setVisible(false);
        /*JMenuBar hiddenMenuBar = new JMenuBar();
        hiddenMenuBar.add(fileMenu);
        getContentPane().add(hiddenMenuBar, BorderLayout.CENTER);
        getContentPane().add(new JPanel(), BorderLayout.CENTER);*/
        nothingMenu = new JMenu("Nothing");
        nothingMenu.setMnemonic('N');
        nothingMenu.setFont(boldFont);
        nothingItem = new JMenuItem("NoAction");
        nothingItem.setFont(plainFont);
        nothingMenu.add(nothingItem);
        menuBar.add(nothingMenu);
        addMouseListener(new MouseAdaption());
        addKeyListener(new KeyAdaption());
      public static void main(String[] args)
        Dimension windowSize = new Dimension(300, 200);
        AnanyaCurves ananyaCurves = new AnanyaCurves(windowSize);
        ananyaCurves.pack();
        ananyaCurves.setBounds(0, 0, windowSize.width, windowSize.height);
        ananyaCurves.setVisible(true);
        ananyaCurves.requestFocus();
      public void exit()
        this.dispose();
        System.exit(0);
      class MouseAdaption extends MouseAdapter
        public void mousePressed(MouseEvent e)
          if (AnanyaCurves.this.alt == true)
            AnanyaCurves.this.exit();
      class KeyAdaption extends KeyAdapter
        public void keyPressed(KeyEvent event)
          /*int keyCode = event.getKeyCode();
          if (keyCode == KeyEvent.VK_ALT)
            AnanyaCurves.this.alt = true;
          else if (keyCode == KeyEvent.VK_E)
            AnanyaCurves.this.exit();
        public void keyReleased(KeyEvent event)
          AnanyaCurves.this.alt = false;
    class Basics extends java.lang.Object
      public static AnanyaCurves ananyaCurves;
      public Basics()
    class Command extends AbstractAction
      String name; // the command name (not the menu item string)
      String accelerator;
      public Command(String name, String accelerator)
        super();
        this.name = name;
        if (accelerator != null && !accelerator.equals(""))
          this.accelerator = accelerator;
          KeyStroke k = KeyStroke.getKeyStroke(accelerator);
          putValue(Action.ACCELERATOR_KEY, k);
      public void quit()
        Basics.ananyaCurves.dispose();
        System.exit(0);
      public void actionPerformed(ActionEvent actionEvent)
        try
          Method f = getClass().getMethod(this.name, (Class[])null);
          f.invoke(this, (Object[])null);
        catch (NoSuchMethodException e)
        catch (InvocationTargetException e)
        catch (IllegalAccessException e)
    class CurveCanvas extends JPanel
      public CurveCanvas(Dimension docSize)
        super();
        Action altF = new AbstractAction()
          public void actionPerformed(ActionEvent e)
            Basics.ananyaCurves.alt = true;
        Action exitF = new AbstractAction()
          public void actionPerformed(ActionEvent e)
            Basics.ananyaCurves.exit();
        this.getInputMap(WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ALT"), "alt");
        this.getActionMap().put("alt", altF);
        this.getInputMap(WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("E"), "exit");
        this.getActionMap().put("exit", exitF);
    In the getInputMap method I was trying to use the condition WHEN_IN_FOCUSED_WINDOW, hoping that the bound key would be recognized, but it didn't work. And, by the way, I still used the KeyAdapter so that the alt attribute of AnanyaCurves can be set to false when the ALT key is released.
    I will appreciate your help very much! Thanks for your time!

  • Using Firefox 3.6 after a few mouse click/ keyboard input the firefox window is no more active, mouse click and keyboard input is inactive ; then I click on the taskbar and the keyboard is active again during a few click then it stops again etc.

    Using Firefox 3.6 after a few mouse click/ keyboard input the firefox window is no more active, mouse click and keyboard input is inactive ;
    to solve it I click on the taskbar and the keyboard is active again during a few click then it does not work any more and I click again on the task bar etc.
    after several repetitions, I have to call the task manager alt+del+ctrl, then come back to the firefox window to be able to use keyboard and mouse again

    Attaching the picture for the tab shape I want...

  • Capture right mouse click in image

    I would like to capture a right mouse click while pointing into am image window.
    So far I've come only to the possibilty to capture events that originate somehow with the left mouse click.
    Or
    Are specific to the front panel of the currently active VI
    Or
    Detect whether at the time of calling a subVI the button is down or up, with all the usual hazzel of detecting the transition (plus the necessity of depending on MS Driect X).
    What I would like to have is a signal that describes the right click in an image window.
    Thanks for any ideas
    Gabi
    7.1 -- 2013
    CLA

    Hi,
    If you use LV7, you can use the event structure. Add an event or filter
    event "Mouse down" for the picture. The "button" value indicates 2 for the
    right button, 1 for the left.
    Regards,
    Wiebe.
    the picture control has a property "Mouse". This is a cluster, that includes
    "Gabriela Tillmann" wrote in message
    news:[email protected]..
    > I would like to capture a right mouse click while pointing into am
    > image window.
    > So far I've come only to the possibilty to capture events that
    > originate somehow with the left mouse click.
    > Or
    > Are specific to the front panel of the currently active VI
    > Or
    > Detect whether at the time of calling a subVI the button is down or
    > up, with all the usual hazzel of det
    ecting the transition (plus the
    > necessity of depending on MS Driect X).
    >
    > What I would like to have is a signal that describes the right click
    > in an image window.
    >
    > Thanks for any ideas
    > Gabi

  • When-Mouse-Click does not fire if When-new-item-instance exists

    We are using Forms 6i Patch 12.
    The When-Mouse-Click trigger (at block level) is not getting fired when a When-new-item-instance trigger exists on a given item on which mouse is clicked.
    We need to synchronize keyboard and mouse events such that if the validation on certain key items fails, the cursor should go to one of the specified items as per the validation rules.
    The validation rules are different on leaving from different items. Complex validation rules require cursor to go to a different item than the current item on which the validation fires.
    Since go_item cannot be used in when-validate-item, we are using a combination of key-next-item and when-mouse-click.
    But, this strategy seems to fail if mouse is clicked over an item having a when-new-item-instance trigger.
    Also, we need the When-mouse-click trigger to fire before When-new-item-instance.
    Any pointers to solving the firing of trigger or strategy will be appreciated!
    Regards,
    Sanjiv

    This solution we have tried and it works also.
    However, we end up in another problem in the form. For overall picture, please see my latest post for "Forms Valid status" at Forms Valid status
    Regards,
    Sanjiv

  • On right mouse click, there is no "save as" or "copy image" when I want to save a pictureon line. I have to go back to IE to access this option. Is this not available? Many thanks, Joy

    On right mouse click, there is no "save as" or "copy image" when I want to save a picture on line. I have to go back to IE to use this option. Is this not available? Many thanks, Joy
    There are so many occasions on line when I want to save an image that I can't believe I can't do so using Firefox, which I find so good in all other ways. I can Bookmark, save a page or send a link, but not take a simple copy image.

    Hi, Many thanks for replying, it's much appreciated. I started Firefox in safe mode and found I had the full right click menu on a pic on my home page. However, after moving around the web, I've found that the problem still occurs in eBay and it doesn't make any difference in safe mode. still no full menu. After returning to normal mode, I find that this still stands i.e. I do get the full menu on other sites but not in eBay. As I often want to save a pic in Ebay and can do so in IE, I'm baffled as to why this one site is giving problems. As this is where I've mostly been trying to save pics, I didn't realise that it was a "one site" problem and not applicable to everywhere else. If IE didn't work in this respect, I could blame the eBay site, but it does, so that just makes it more puzzling - and very annoying! I have tried accessing Ebay direct, rather than clicking on the toolbar, but this makes no difference. Any further thoughts would be much appreciated. Joy

  • Inconsistent mouse clicks on MAC

    I'm recording a demo on a MAC and sometimes it captures a picture on mouse click and sometimes it doesn't. It is inconsistent. I can do the same process and get different results each time. Recording type is Automatic Demo. Version is Captivate 5.5.
    Any ideas what is going on?
    Thanks,
    K.

    Captivate must be experiencing difficulty 'hearing' the on screen events that trigger captures.
    Automatic capture is not a guaranteed solution for every situation. In almost any software there will be some things you need to capture manually to get all the shots you want for the simulation.  So keep your finger near the manual capture key as you work through the task and hit it at any time you hear Captivate did not pick up the change.

  • Find option to get secondary mouse click back from Spaces

    I have OX 10.6.8 and a Mac Book Pro. Recently I had a bluetooth apple trackpad connected to my Mac and I was experiementing with Spaces. Right now, I do not have the bluetooth apple trackpad. Anyway, when I use the two-finger tap to do a secondary mouse click, Spaces activates.
    I read that there should be an option in the Spaces control panel to activate Spaces with a secondary mouse click. However, in the Spaces control panel there aren't any options at all for activating it with a secondary mouse-click. It is currently set to activate with F8. Do I need to have the external bluetooth trackpad connected in order to find the option in Spaces for dis-associating Spaces with the secondary mouse click?
    John

    Take a look at my trackpad settings in the picture "MBP Trackpad Settings.jpg" at <http://homepage.mac.com/WebObjects/FileSharing.woa/wa/default?user=wbdeville&t emplatefn=FileSharing5.html&xmlfn=TKDocument.5.xml&sitefn=TKSite.2.xml&aff=consu mer&cty=US&lang=en>.
    I actually prefer the trackpad to a mouse. Works great!
    The default setting for Dashboard is F12. Look in System Preferences at the Dashboard & Expose prefs and see how you've got that set. It's easy to go back to F12 as the trigger to see Widgets.
    I've got a rather low opinion of Widgets. Some of them are poorly written and can cause heat problems (excessive CPU use) or WiFi slowdowns (constant polling of the Net).

  • Trigger event on mouse click over image window

    How can I use an event structure to pick up on a mouse click on an IMAQ window in Labview. Specifically, I want to pick up a click with the 'select point' tool.

    To work in a Winddraw window, will not want to use the Event Structure, but instead the WindLastEvent. This will allow you to capture the events that occur in the Winddraw window. Attached are two examples, one I wrote using events so users can set up ROI's and the other is using events in LabVIEW with a picture control on the front panel so user can select an ROI.
    I hope this helps!
    Chris D
    Ni Application Engineer
    Attachments:
    Line_Profile_of_Live_Image.vi ‏145 KB
    ROI_from_Picture_Control_using_Events.vi ‏111 KB

  • Mouse over and Mouse Click function

    Hi,
    I have to add a mouse over event and mouse click event in my rectangles that I draw while taking the values from an input file. Now since I am taking rectangle height and width from the input text file as well I also want to take a text value to be shown while moving a mouse over a particular rectangle from my input file. Also when he clicks on that rectangle the height and width of that particular rectangle only should be displayed (re-adjusted).
    Like suppose my input file has 3 fields:-
    Height   Width  Test_To_Show
    10          23         Hello
    20          44         ByeNow When my paint component draws these 2 rectangles and a user moves his mouse over the rectangle he should see text message attached to it:- Like for first row 10, 23 he should see "Hello". In this case when he clicks on this rectangle the picture should read just to show only 10 and 20 as height and width. Now the problem is I am confused where to add the mouse and mouse click event function.
    Some of my code looks like this in paintcomponent method:-
            for(int i=0; i<myobject.size(); i++){
                Coloring fc = myobject.get(i);
                GradientPaint gpi = new GradientPaint(0, 0,c.getColor() , 0, 20, Color.white, true);
                g2d.setPaint(gpi);
                g2d.drawRect(fc.value1, 29, fc.mywidth, 83);
                g2d.fillRect(fc.value1, 29, fc.mywidth, 83);
                                                }Where should I attach the mouse event to g2d object / fc / myobject ? I am not sure since I am using mouseover function for the first time.
    Thanks

    I am planning to add these 2 in my paint component method
                fc.addMouseMotionListener(this);
                fc.addMouseListener(this);and then create 2 functions like this :-
          public void mouseEntered(MouseEvent e) {
                  //I will be reading from a file and then pass the string that I want to show as text while mouse over
                   String s = // takes value from the inpuf file.
                      fc.setText(s);
    public void mouseClicked(MouseEvent e) {
                 //same way reading from the file ... Not sure how I will do this one
                 }Would it be the correct way to do it ? I am doing mouse over functions for the first time so donno much about there usage.
    Thanks

Maybe you are looking for