sshrum Posted August 17, 2006 Share Posted August 17, 2006 This is just a general 'scratch your head and ponder for a cheap solution' sorta question. I've written simple one-liner exe files using send() that send the hot-key combination that toggles my flat panel's screen orientation. What I'm looking to do is set up some sort of usb toggle switch on the back of the monitor to trigger one of the 2 exe's that will automatically change my screen orientation as I manually rotate my screen. Granted, I have shortcuts to the exe's on my desktop but I'm all about automation. I've done a priliminary search and found nothing that meets my requirements (a 2 position switch). Anybody have any ideas? Mice are cheap and easily mod'ed but aren't 2-position. Once I find a USB device/toggle switch, I'll need to write something in autoIT to capture the state and launch the app of my choosing. Any ideas? Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
Lakes Posted August 18, 2006 Share Posted August 18, 2006 How about this? http://www.vellemanusa.com/us/enu/product/view/?id=500349 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
sshrum Posted August 18, 2006 Author Share Posted August 18, 2006 (edited) That just might work...just need to get pricing to make sure it's feasible. One of my co-workers was recommending a keyboard encoder. Set it up to send the keystrokes I want when it's toggled. He also recommended a servo drive so it would automate the actual rotation of the screen for me too Sounds like a hackaday project to me I'll check them both out. Thanks for the tip Edited August 18, 2006 by sshrum Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
blademonkey Posted August 18, 2006 Share Posted August 18, 2006 (edited) Why dont you just remap scrolllock for your toggle. The Servo idea sounds great. You may want to talk to ZeroCool about that, he's done similar projects. Edited August 18, 2006 by blademonkey ---"Educate the Mind, Make Savage the Body" -Mao Tse Tung Link to comment Share on other sites More sharing options...
Confuzzled Posted August 18, 2006 Share Posted August 18, 2006 I vaguey recollect some rotating screens actually have a mercury switch inside to do exactly what you want, and feed the orientation back to the video card as part of the PNP signal response, triggering the appropriate driver. In my case, I just have two screens, one of each orientation. The vertical one displays an A4 page in one gulp - great for Internet (and autoIT forum) browsing. I keep them in the one orientation to preserve their life. Swivelling your screen many times a day will possibly result in the mountings becoming worn in a short time and any flexible wiring between the fixed and roating parts would be taking a pounding. A mercury switch could be hooked directly to any unused printer port, serial port, or joystick port and read directly by software. Mount the mercury switch somewhere on the screen rear in a horizontal orientation: If it is shorted, treat the orientation as vertical, else treat it as horizontal. Code to read ports can be found by searching the forums here. Link to comment Share on other sites More sharing options...
sshrum Posted August 18, 2006 Author Share Posted August 18, 2006 (edited) Mercury switch...I like that even more. Just need to find one that is wired for connection to a PC. Guuna make a run to Orvacs for the mercury switch and wire it to a 9-pin com port plug. Then write the AutoIT script to test the port for open/closed. Oh joy Edited August 18, 2006 by sshrum Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
JoeCool Posted August 18, 2006 Share Posted August 18, 2006 Mercury switch...I like that even more.Just need to find one that is wired for connection to a PC.Guuna make a run to Orvacs for the mercury switch and wire it to a 9-pin com port plug. Then write the AutoIT script to test the port for open/closed. Oh joy I think mercury switch is one of the best solution ;-)If you want to go with USB check at http://www.elexol.com/USB_Modules/they aren't expensible and they are really easy to interface with everything, software drivers are free from FTDI. You can get USB to parallel fifo (than what Im using), or USB to RS232 etc .. :-)Really crappy video on mine http://www.youtube.com/watch?v=UAzWsvPob7A:-) Link to comment Share on other sites More sharing options...
sshrum Posted August 18, 2006 Author Share Posted August 18, 2006 I can't seem to find anything in the forums or in the help file that deals with port reading (com ports that is...found a bunch of stuff on TCP and UDP ports). Any help directing me in the right direction would be greatly appreciated. TIA Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
sshrum Posted August 19, 2006 Author Share Posted August 19, 2006 (edited) Oh my Gawd...the shiet worked!I used a 9 pin d-sub and hooked pins 2 and 3 to the mecury switch. Using a freeware OCX called Netcomm recommended in another thread here I was able to test for a open or closed circuit by simple sending a string and testing for it on the response!Freaking sweet!In all: Total cost: $5 = $1.80 for the mercury switch, $3.50 for the 9-pin d-sub (I got the fancy one ) Total time: < 1 day from idea to product! (10 minutes to put together)Hell yes!I'll still have to write a small app to configure what apps to launch when the circuit is open and closed but that's cake!I'll do a formal write up with photos later.Thanks to everyone for the help.Now that the h/w part is done, I've started another thread on the s/w aspect of this project here: http://www.autoitscript.com/forum/index.php?showtopic=31212 Edited August 19, 2006 by sshrum Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now