Jump to content

Steam logon script help


 Share

Recommended Posts

I have a couple of steam accounts on my computer, and want an easy way to switch between them on my HTPC, where I don't have a keyboard.

I'll figure out how to launch the script from the gamepad later, but for now I've hit a problem.

Here's the script as I have now:

Dim $user = "user"

Dim $pass = "pass"

Run ("G:\Steam\Steam.exe")

WinWaitActive("Steam Login")

Send($user)

Send("{TAB}{DEL 8}")

Send($pass)

Send("{ENTER}")

When steam launches, if the focus is on the username box, this works perfectly. But sometimes (if say there's been a network glitch and failed logon), it will be on the password box.

I can't figure out how to detect which it is, and handle it appropriately.

The AI window spy doesn't help much - the steam form is not a windows form, and the username and password boxes don't seem to be recognised controls.

Any ideas?

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...