Jump to content

Mouse coordinate capture


Recommended Posts

Hi all ,

Need help regarding the Vi i have made which works fine with labVIEW pane.Which i need to capture in windows screen.

I have attached the vi which works great in labVIEW pane and records each event of click inside the pane.i haven't find any options in event structure for capturing mouse events out side the pane (ie which captures windows UI ) .  I know i could make it with while loop capturing mouse coordinates still i feel its not a reliable way to record .So please let me know how to make it in Event structure or is there any reliable way to make without event structure.

 

 

 

 

 

 

Capture tool LabVIEWpane.vi

Edited by Jillu Pravin
Link to post

I was considering that the normal OS behaviour, for clicks outside a window in foreground, in a windowed OS, is to bring to foreground another application. In such case LV keeps running as a background application, having no notion of concurrent processes and composting of windows assigned to them by the OS. So no wonder that LV itself has no notion of "my window is not anymore in foreground", but only, at best, of "Is the front panel of this VI the frontmost among all LV windows". So trapping of external mouse clicks might be possible only through OS calls, polling the focus assigned to application windows by the OS.

What is the UI effect sought, though? If it is preventing or trapping outside clicks, what about workarounds like a) make the said FP modal, b) create a dummy transparent VI (not available in linux, I fear) with a FP devoid of any toolbar and scrollbar, which fills the screen for the sole purpose of trapping clicks?

w.png

Link to post
On 8/2/2016 at 7:49 PM, ensegre said:

I was considering that the normal OS behaviour, for clicks outside a window in foreground, in a windowed OS, is to bring to foreground another application. In such case LV keeps running as a background application, having no notion of concurrent processes and composting of windows assigned to them by the OS. So no wonder that LV itself has no notion of "my window is not anymore in foreground", but only, at best, of "Is the front panel of this VI the frontmost among all LV windows". So trapping of external mouse clicks might be possible only through OS calls, polling the focus assigned to application windows by the OS.

What is the UI effect sought, though? If it is preventing or trapping outside clicks, what about workarounds like a) make the said FP modal, b) create a dummy transparent VI (not available in linux, I fear) with a FP devoid of any toolbar and scrollbar, which fills the screen for the sole purpose of trapping clicks?

w.png

Thanks a Lot..  The snippet you have provided seems higher version. could you provide me 2012 version..

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By torekp
      Supposedly there are Labview tools available at
      http://www.lvs-tools.co.uk/software/utilities/
      But whenever I try to register or login, nothing happens.  (Also, I try to think, but nothing happens.)  Are there any other Labview codes that use the Windows Memory-Mapped Files functions, or should I just reinvent this wheel?  By the way, here is a Microsoft document on the subject: https://msdn.microsoft.com/en-us/library/ms810613.aspx
    • By _Y_
      We use USB-connected Microsoft Smart Card Reader. The devise crashes sometimes. It does not happen often thus search for the reason could take time.
      The only way to get the devise functioning again, is to open Device Manager, click Uninstall then Scan for hardware changes (that installs the Reader again).
      Is there any method to do this from LabVIEW? I.e. send commands to reinstall the USB device?
      I know this could be a bad fix. However, it can help in long-time tests (while we are searching for reason of these crushes).
      Thank you
    • By dhakkan
      Hello,
       
      I'm experimenting with porting my existing LabVIEW application from Windows to Mac OS X. The code uses several instances of 'Build Path' function in 'File I/O' functions sub-palette. The 'Name or Relative Path' input is being connected with a 'string' data type rather than a 'file path' data type. With some quick code change and checks, I've realized that it's better to use the latter data type, so that the separator character '\' in Windows is automatically interpreted as ':' in Mac OS.
       
      Some parts of the code, however, build up the string. E.g. a 'Format Into String' is used to output based on a format string, e.g. 'Images\%s.jpg'. Doing a 'String to Path' after this function does not automatically interpret the '\' in Mac OS to ':'. (I can imagine that it would be difficult for the compiler to recognize that a specific character is meant to be a separator and not part of a file/folder name.)
       
      I can write more complicated code where the format string is itself concatenated based on the execution platform. Are there any easier or recommended approaches? Also, does LabVIEW have any 'File Constant' that provides the equivalent string character depending on the platform?
       
      Thank you.
       
    • By Kunal Nayak
      Hy Everyone,
      I want to do speech recognition using windows speech in labview. Any great way to start this? Or is there any way I can do that.
       
      Kind regards
      Kunal
    • By Remarq
      Hey guys.
      I need a simple game(not 15 puzzle,snake or tetris). Just need a link,no matter  who create.
      I will be very grateful
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.