Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending string from VB application to the keyboard buffer

Status
Not open for further replies.

DLI

Technical User
Aug 4, 2003
3
US
I am having a VB application, which accepts a data string from a device connected via ethernet. Once the data comes from this device to this VB application, I need to move this data to keyboard buffer, for treatment of this data by another application. To be more specific, when I run this VB application in the background, there will be another application running on the PC, which is expecting an input. And, this input has to come from the VB application running in the background as a data into keyboard buffer.

Thanks in advance.
 
i have no idea what you mean :/ SendKeys perhaps? what do you mean keyboard buffer? do you just mean it needs to send it a string of information? -shrug in the begining man created code.
in the end code will create man.
clones are coming only matter of time.
examples?
 
Let me try to clarify it...

I want to write a VB application which receives a string of data from a device connected to it thru RS232/Ethernet. This VB application will be a background application.

There will be another application running on the PC which expects a keyboard input, that's we can enter some data there using the keyboard.

Now, what I need is instead of somebody entering this data from the keyboard, the background VB application should put the data on to the active application. That is, this VB application should populate the keyboard buffer on the PC...

Is it clear now...?
 
you can do this with send keys..

AppActivate "TheProgram"
SendKeys "Then what to send"



im going to look over exactly how to activate the app you want in a sec.. but you can also use api calls to find the textbox you want it to type the info into and then have it press the button... thats a little more complicated and you will need a API Spy... which well comes with VB Enterprise atleast i dont know about others... i have a FAQ file i can send you if you are intrested in the API stuff.. its a little to much to put in here and the guy did a great job explaining it.. he uses AOL as an example on how he did things.. but you can EASILY compare it with another application.. drop me an email if you wish me to send it... iziunbornizi@aol.com i havent used sendkeys in a LONG time... but heres a little list...


'ie:
' sendkeys &quot;%^{DEL}&quot; <-- alt + ctrl + deletes
'
'^ = Control
'{enter} = Enter
'% = Alt
'{Del} = Delete
'{ESCAPE} = Escape
'{TAB} = Tab
'+ = Shift
'{BACKSPACE} = Backspace
'{BREAK} = Break
'{CAPLOCKS} = Caps Lock
'{CLEAR} = Clear
'{DELETE} = Delete
'{DOWN} = Down Arrow
'{LEFT} = Left Arrow
'{RIGHT} = Right Arrow
'{UP} = Up Arrow
'{NUMLOCK} = Num Lock
'{PGDN} = Page Down
'{PGUP} = Page Up
'{SCROLLLOCK} = Scroll Lock
'{F1} = F1 .......Use {F2} {F3} and so On For others...
'{HOME} = home
'{INSERT} = Insert

ill go check on the app activate thing now.. been so long -scratches head. hope something ive said has helped out.. brb in the begining man created code.
in the end code will create man.
clones are coming only matter of time.
examples?
 
ok... have notepad open... and put this in a vb button and run and then press it


AppActivate &quot;Notepad&quot;
SendKeys &quot;This is a Test!&quot;
SendKeys &quot;^S&quot;
SendKeys &quot;mmonkey.txt&quot;
SendKeys &quot;{ENTER}&quot;


this is just little example.. in the begining man created code.
in the end code will create man.
clones are coming only matter of time.
examples?
 
Thanks 'unborn'... I will check and revert back...

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top