07-30-2010 02:16 AM
Hi ,
I need to programatically open the Note pad and move the mouse pointer to the specified location .
- I was able to open the Note pad programatically ,But i am unable to move the mouse pointer to the specified location ,
Please tell me how to do this this is very urgently required .
07-30-2010 02:45 AM
Hi prithviraj
I'm assuming you are on a Winodws OS. To change the mouse pointer location you call the functions SetCursorPos and ClientToScreen located in user32.dll. You can call dlls from LabVIEW using Call Library Function nodes. What parameters to call the functions with can be found on MSDN and a lot of examples in textbased code can be found by googling "move mouse pointer programmatically".
Best Regards
David
NISW
07-30-2010 05:43 AM
i feel i need to give more information for my question ,
below is the notepad snap shot attached , here the coursor is pointing to the first position , i need to move it progrmatically to my desited position ,
thanks in advance ,
07-30-2010 05:44 AM
sorry i didnt send the attachment , please see the attachment in this mail
07-30-2010 05:48 AM - edited 07-30-2010 05:51 AM
Hi prithviraj,
no snapshot...
Edit: Now you added a snapshot - and even without downloading it I know it's a BMP renamed to JPG... DON'T DO THAT! Use Paint to convert your pic to a real JPG!
I don't think Notepad is providing an interface to control it from other programs. But you can get the window position, move the mouse to the correct position and simulate a mouseclick - all using Windows functions like mentioned above
07-30-2010 06:07 AM - edited 07-30-2010 06:08 AM
Hi prithviraj
What are you trying to accomplish with the textfile? The position to move to in notepad will be very difficult to obtain since it depends on many different factors, such as font size, position of windows etc. If you are certain of the all factors the solution with moving the mouse and clicking works, but if the endresult is to have the user select one line or someting it will be much easier to read file into LabVIEW and let them choose there. So what are you after?
Best Regards
David
08-01-2010 09:34 PM
Hi David ,
what you are saying is right . user inputs the line number depending on the line number the cursor should be moved to that position of the text file , is this possible to do , if yes kindly send me the code , or else ways to do .
kindly reply urgently
Best Regards,
Prithviraj
08-02-2010 02:40 AM
Hi Prithviraj
Please explain a bit more what you want the code to do. Do you to use the text inside your VI? Do you want to let the user edit the in the file? Would an exceptable solution be to read the data into the VI, have the user select the row on the frontpanel, do some edits and then write the data back to the textfile?
Best Regards
David
08-03-2010 02:19 AM