Re: C++ Script for USB scheduling

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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





.



Relevant Pages

  • Re: C++ Script for USB scheduling
    ... here is the script for whacking the USB. ... Opens/runs Device Manager disables a USB hub then quits. ... compiled with autoit, ...
    (microsoft.public.windowsxp.general)
  • Re: C++ Script for USB scheduling
    ... Script Function: Opens/runs Device Manager disables a USB hub then quits. ... compiled with autoit, ... If anyone knows the commands to do what my first post sed that would be great. ...
    (microsoft.public.windowsxp.general)
  • Re: AutoIt
    ... Digging through the AutoIt Newsgroup I ... To answer your questions the script does run in SMS's context and the ... uninstall string of an application. ...
    (microsoft.public.sms.installer)
  • Re: Lock the keyboard
    ... will let you block keyboard input and/or screen output. ... you can't use an ActiveX, you can use AutoIt's own script, which can also ... Will prevent any user input via the mouse or keyboard. ... Windows 2000 User input is blocked and AutoIt can simulate input. ...
    (microsoft.public.scripting.vbscript)
  • Re: Import text file into a field
    ... I know I can do this with Import Folder, selecting text files, but is ... and write a simple script in any text editor and compile it. ... Let FMP open any text editor with the wanted file as the argument; ... Now run that compiled AutoIt script from FMP: ...
    (comp.databases.filemaker)