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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Should I Try Windows Scripting For This?

Status
Not open for further replies.

Felgar

Programmer
May 17, 2001
17
CA
I have a problem, and I'm not sure the best way to solve it. First, I have a wireless USB keyboard, that uses native windows drivers. Don't expect this to come into play, but you never know. Also, I have a TV that I am trying to control with my computer.

The idea is that there are picture size and position settings that I would like to change on the fly easily. For instance, when a widescreen show like west wing comes on, I need to adjust the picture so that the 16:9 aspect ratio fills my 16:9 tv. And for other 4:3 shows, I have another list of settings. So right now, there are certain commands that I can send to the TV through my COM port. As it stands right now, I can use hyperterminal and connect on com1, (9600 baud, 1 stop, no parity, no flow control) and then I can simply send a host of commands. (ussually 6 or 7 for a complete picture setting) I also have a delay set in hyperterminal to give the tv to respond to each command before the next one is sent.

Now for the goal... I would like make my computer monitor ALL incoming keystrokes, and based on the keys that come in, write this data to the com port. I would probably make 6 or 7 F keys that I could press from the wireless keyboard, causing my computer to send the commands down com1 to my tv. I would also like to be able to turn this on and off easily, but I don't want to have to make sure that a special program has focus... So for instance, if I were to make a little app, it should still be working even if I happen to have a browser open and being the active window instead of the app. I envisioned a tray icon that would appear if the keys were being monitored.

What should I pursue to try to accomplish this? I have Delphi, so I could use that... But I thought that maybe windows scripting would provide a means to do this as well. Would windows scripting work well for this task?
 
Felgar,
I suppose you will need to fiddle with the keyboard driver!
If you don't, your program will need to be the active one when you press the special keys ...

I don't think you can go to the level of drivers with scripting. I think you'll need C++ for this one :-(

Something else you can try (if you keyboard supports it) is to re-program it. Most of the modern keyboards have an internet-, volume-,mail, etc.-button that can be reprogrammed.
You could try to attach a script to such a button. This would eliminate writing your own driver.
 
Hmm, there are a lot of macroing programs out there that sit on the tray and detect keystrokes. Are you saying that they are all installing their own keyboard drivers? Perhaps that is the case, but I figured that it would be relatively simple given the number of apps out there that do this. Thanks for your input, maybe back to the drawing board.
 

This is a tool like the one you discribe (macro-ing)
if you install it and look in the menu "Tools/Restore Keyboard hooks" it shows you a message that sometimes the hook gets lost when installing another tool that hooks onto the keyboard driver. This menu option lets you restore the hook ... try it out and read the message completely

I'm quite sure now that I'm on the right track with my previous answers ...
 
I'll look into those. Thanks for your help.
 
I have a Gps sendind data thru com1 to a software displaying some map with points that come from Gps. I need to record all this data passing thru com1. Is anybody has a idea. Hyperterminal, etc.
Thank you !
[blush]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top