Jump to content

heck of a time with a simple script.


Lance
 Share

Recommended Posts

I am using autoit to installing a driver through device manager. I have successfully written the script to install the driver. The problem I am having is closing the window when the install is finished. I tried using...

Sleep(10000)

Send("{ENTER}")

Send("{TAB}")

Send("{TAB}")

Send("{ENTER}")

Send("!f")

Send("x")

But nothing happens. I am fairly sure the install from the previous step is much less than 10 seconds and the window still has focus after the install is done.

Any help would be greatly appreciated!

Link to comment
Share on other sites

Sleep(10000)

Send("{ENTER}")

Send("{TAB}")

Send("{TAB}")

Send("{ENTER}")

Send("!f")

Send("x")

On my system, (after launching Device Manager), all this would do is select the root item, then quit.

What state is device manager in when your script runs?

Also, why not install from an .INF or Devcon?

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Link to comment
Share on other sites

Here is the whole script if it helps

*** Starts Device manager

Opt("SendKeyDelay", 50)

run(@comspec & ' /c ' & @SystemDir & "\devmgmt.msc", @SystemDir, @sw_hide)

Sleep(3000)

*** Goes to the correct device and opens the properties

Send("{TAB}")

Send("o")

Send("{RIGHT}")

Send("m")

Send("{ENTER}")

*** Launches reinstall driver, browses to driver inf folder, and starts the install

Send("{ENTER}")

Send("!t")

Send("!n")

Send("!s")

Send("!n")

Send("!o")

Send("!r")

Send("m")

Send("{RIGHT}")

Send("b")

Send("{RIGHT}")

Send("w")

Send("{RIGHT}")

Send("t")

Send("{RIGHT}")

Send("h")

Send("{RIGHT}")

Send("m")

Send("{RIGHT}")

Send("wintv-pvr-250mce")

Send("{ENTER}")

Send("!n")

*** Waits 10 secs for install to complete, supposed to hit enter for highlighted finish button, and close program manager -- This is the only part that doesn't work

Sleep(10000)

Send("{ENTER}")

Send("{TAB}")

Send("{TAB}")

Send("{ENTER}")

Send("!f")

Send("x")

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...