Re: C++ Script for USB scheduling
- From: Bob I <birelan@xxxxxxxxx>
- Date: Fri, 13 Jan 2006 09:56:20 -0600
Sorry, no tutorials, just the documentation that came with AutoIt and poking around in Windows.
Xx Ice xX wrote:
Holy crap Bob I thanks heaps!!!
So the script to turn the root hub OFF is what youve got there, and the script to turn the root hub ON is what youve got there, except I replace Send("d") with Send("e") and remove Send("y") correct?
And ill experiment with the number of U's to hit the right hub. Wow thanks heaps for your time with that. I woulda been stuck lol. You dont know any tutorials that would help me along with that sorta stuff do you?
Thanks heaps!
Ice
"Bob I" wrote:
I got bored, here is the script for whacking the USB. Replace the "Send("d")" with an "Send("e")" and remove the"Send("y")" to turn it back on. Paste the stuff between the "******" lines into notepad and save as a ".au3" file.
*************************** ; ; AutoIt Version: 3.0 ; Language: English ; Platform: XP ; Author: birelan ; ; Script Function: Opens/runs Device Manager disables a USB hub then quits. ; Run Device Manager Send("#r") WinWaitActive("Run") Send("devmgmt.msc{Enter}") WinWaitActive("Device Manager") Send("!v") Send("e") Send("{Tab}u") ; Adjust the number of "u's" to hit the correct hub Send("{RIGHT}uu") Send("{APPSKEY}") Send("d") Send("y") ; Pause to allow you to see the effect Sleep(2500) ; Now quit by pressing Alt-f and then x (File menu -> Exit) Send("!f") Send("x") ; Now wait for Device manager to close before continuing WinWaitClose("Device Manager") ; Finished!
*****************************
Xx Ice xX wrote:
Autoit the program is not a GUI. the script is written in notepad and then compiled with autoit, to RUN the windows GUI. Its not a gui itself. If anyone knows the commands to do what my first post sed that would be great. Thanks
Ice
"Pegasus (MVP)" wrote:
Have you considered following Bob's suggestion of using AutoIt? It uses its own commands, not C++, which are basically a bunch of keyboard & mouse commands.
"Xx Ice xX" <XxIcexX@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:55AFBF4B-E49B-4C54-8FAC-0B52547D5226@xxxxxxxxxxxxxxxx
It was "Bob I" who gave me the idea to schedule a usb start. He said use autoit to design a script that would open the device manager, walk down
the
tree and then enable one of the USB Root Hubs, (so my ipod would start charging when it was enabled). If i could write a script to enable the
root
hub, and disable the root hub, i could schedule this with the task
scheduler
to start and stop when i wanted.
Unfortunatly i have no idea how to use C++ coding. Is the script to do wat
i
want something hard or what? Could some body either point me in a
direction
or write a script if its not hard? Any help, alternatives, or advice much appriciated Thanks heaps Ice
.
- References:
- Re: C++ Script for USB scheduling
- From: Pegasus \(MVP\)
- Re: C++ Script for USB scheduling
- From: Bob I
- Re: C++ Script for USB scheduling
- From: Xx Ice xX
- Re: C++ Script for USB scheduling
- Prev by Date: Re: NTBackup.exe - Same bug as Windows 2003?
- Next by Date: Re: C++ Script for USB scheduling
- Previous by thread: Re: C++ Script for USB scheduling
- Next by thread: Re: C++ Script for USB scheduling
- Index(es):
Relevant Pages
|