|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Read another applications textboxes (VB 2005)I have created my first real life application, that runs in the system tray and monitors changes to the clipboard, then depending on the content it may search our stock file and display the current stock situation in a balloon (using balloontiptext). I now want to add extra functionality to my program by making it read text from any other application without the user having to copy text to the clipboard. I have a timer that runs every couple of seconds and I have managed to get the windows title from any program that is currently running, into a variable in my application, but I can't figure out how to read other fields on the users application (ideally which ever has the focus) Ideally I want to copy the entire content of an email body into a vairable in my application, so I can then search it for product codes, and then if necessary provide stock info in a bubble. Can anyone help ?, sample code much appreciated as I am new to VB.net and I have previously only worked with MSAccess VBA. Thanks Paul The down and dirty way I'd try to do it would be by simulating a mouse
click in the text box, then sending a "ctrl-A" for select all, then "ctrl-c" for copy - your app should take care of the rest. I would image this would be disruptive to an end user though. Brad Paul wrote: Show quoteHide quote > Hi everyone, > I have created my first real life application, that runs in the system tray > and monitors changes to the clipboard, then depending on the content it may > search our stock file and display the current stock situation in a balloon > (using balloontiptext). > > I now want to add extra functionality to my program by making it read text > from any other application without the user having to copy text to the > clipboard. > > I have a timer that runs every couple of seconds and I have managed to get > the windows title from any program that is currently running, into a > variable in my application, but I can't figure out how to read other fields > on the users application (ideally which ever has the focus) > > Ideally I want to copy the entire content of an email body into a vairable > in my application, so I can then search it for product codes, and then if > necessary provide stock info in a bubble. > > Can anyone help ?, sample code much appreciated as I am new to VB.net and I > have previously only worked with MSAccess VBA. > > Thanks > > Paul Thanks Brad,
I've just tried this, but its unusable, and I cant find a command to de-select all, so I used the END key. This would also prevent the user from being to use the clipboard for what they want it for. Any other suggestions much appreciated. Paul Show quoteHide quote "Blarneystone" <BradIs***@gmail.com> wrote in message news:1161181774.533842.24090@m73g2000cwd.googlegroups.com... > The down and dirty way I'd try to do it would be by simulating a mouse > click in the text box, then sending a "ctrl-A" for select all, then > "ctrl-c" for copy - your app should take care of the rest. I would > image this would be disruptive to an end user though. > > Brad > > > Paul wrote: >> Hi everyone, >> I have created my first real life application, that runs in the system >> tray >> and monitors changes to the clipboard, then depending on the content it >> may >> search our stock file and display the current stock situation in a >> balloon >> (using balloontiptext). >> >> I now want to add extra functionality to my program by making it read >> text >> from any other application without the user having to copy text to the >> clipboard. >> >> I have a timer that runs every couple of seconds and I have managed to >> get >> the windows title from any program that is currently running, into a >> variable in my application, but I can't figure out how to read other >> fields >> on the users application (ideally which ever has the focus) >> >> Ideally I want to copy the entire content of an email body into a >> vairable >> in my application, so I can then search it for product codes, and then if >> necessary provide stock info in a bubble. >> >> Can anyone help ?, sample code much appreciated as I am new to VB.net and >> I >> have previously only worked with MSAccess VBA. >> >> Thanks >> >> Paul > You may take a look at the following thread:
http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/acc3bb53e6ffa572/4b97ddccb84315be?lnk=gst&q=read+text+in+other+application&rnum=3#4b97ddccb84315be Thanks, Seth Rowe Paul wrote: Show quoteHide quote > Thanks Brad, > I've just tried this, but its unusable, and I cant find a command to > de-select all, so I used the END key. > > This would also prevent the user from being to use the clipboard for what > they want it for. > > Any other suggestions much appreciated. > > Paul > > > "Blarneystone" <BradIs***@gmail.com> wrote in message > news:1161181774.533842.24090@m73g2000cwd.googlegroups.com... > > The down and dirty way I'd try to do it would be by simulating a mouse > > click in the text box, then sending a "ctrl-A" for select all, then > > "ctrl-c" for copy - your app should take care of the rest. I would > > image this would be disruptive to an end user though. > > > > Brad > > > > > > Paul wrote: > >> Hi everyone, > >> I have created my first real life application, that runs in the system > >> tray > >> and monitors changes to the clipboard, then depending on the content it > >> may > >> search our stock file and display the current stock situation in a > >> balloon > >> (using balloontiptext). > >> > >> I now want to add extra functionality to my program by making it read > >> text > >> from any other application without the user having to copy text to the > >> clipboard. > >> > >> I have a timer that runs every couple of seconds and I have managed to > >> get > >> the windows title from any program that is currently running, into a > >> variable in my application, but I can't figure out how to read other > >> fields > >> on the users application (ideally which ever has the focus) > >> > >> Ideally I want to copy the entire content of an email body into a > >> vairable > >> in my application, so I can then search it for product codes, and then if > >> necessary provide stock info in a bubble. > >> > >> Can anyone help ?, sample code much appreciated as I am new to VB.net and > >> I > >> have previously only worked with MSAccess VBA. > >> > >> Thanks > >> > >> Paul > > I have read this but I still can't manage to get it to work (Mainly because
I'm a beginner who's bitten off more than I can chew !) Any chance anyone out there can supply a .NET example of how to take the text from a notepad txt file when it has focus and put it in a vairable in my app, I should be able to convert that to work with my app then. Again a big Thanks to all. Paul Show quoteHide quote "rowe_newsgroups" <rowe_em***@yahoo.com> wrote in message news:1161186753.682830.191370@k70g2000cwa.googlegroups.com... > You may take a look at the following thread: > > http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/acc3bb53e6ffa572/4b97ddccb84315be?lnk=gst&q=read+text+in+other+application&rnum=3#4b97ddccb84315be > > Thanks, > > Seth Rowe > > > Paul wrote: >> Thanks Brad, >> I've just tried this, but its unusable, and I cant find a command to >> de-select all, so I used the END key. >> >> This would also prevent the user from being to use the clipboard for what >> they want it for. >> >> Any other suggestions much appreciated. >> >> Paul >> >> >> "Blarneystone" <BradIs***@gmail.com> wrote in message >> news:1161181774.533842.24090@m73g2000cwd.googlegroups.com... >> > The down and dirty way I'd try to do it would be by simulating a mouse >> > click in the text box, then sending a "ctrl-A" for select all, then >> > "ctrl-c" for copy - your app should take care of the rest. I would >> > image this would be disruptive to an end user though. >> > >> > Brad >> > >> > >> > Paul wrote: >> >> Hi everyone, >> >> I have created my first real life application, that runs in the system >> >> tray >> >> and monitors changes to the clipboard, then depending on the content >> >> it >> >> may >> >> search our stock file and display the current stock situation in a >> >> balloon >> >> (using balloontiptext). >> >> >> >> I now want to add extra functionality to my program by making it read >> >> text >> >> from any other application without the user having to copy text to the >> >> clipboard. >> >> >> >> I have a timer that runs every couple of seconds and I have managed to >> >> get >> >> the windows title from any program that is currently running, into a >> >> variable in my application, but I can't figure out how to read other >> >> fields >> >> on the users application (ideally which ever has the focus) >> >> >> >> Ideally I want to copy the entire content of an email body into a >> >> vairable >> >> in my application, so I can then search it for product codes, and then >> >> if >> >> necessary provide stock info in a bubble. >> >> >> >> Can anyone help ?, sample code much appreciated as I am new to VB.net >> >> and >> >> I >> >> have previously only worked with MSAccess VBA. >> >> >> >> Thanks >> >> >> >> Paul >> > >
Need a tip: How do you streamwrite from two different db tables?
UTF-8 encoding problem On Error Goto Next Loop using a triple-nested for...next loop How to simulate Application.DoEvents in a DLL Bootstrapping .NET 2.0 Dispose problem/crash with maximized MDI child windows need help!! VB2005 - Split Files Visual Basic Programming - Reference to fpPublishLogInTempDir uri - ADVANCED question |
|||||||||||||||||||||||