joew Posted March 19, 2008 Share Posted March 19, 2008 Hello, I am trying to automate the windows registration dialog (without registering, there's no way to get updates, right?) I seems as if M$ has built in some extra hurdles for this: - There's no "visible text", so there's no way to find out the current state of the dialog. - There are extra delays (dimming of the text), so you can't simply send keystrokes as soon as the window becomes active. The keystrokes would simply go to nirvana. - None of the controls have ID's, so you are limited to sending keystrokes to the active window, which is error prone (e.g. when arbitrary windows pop up for arbitrary reasons). - There's no way to find out when the activation is done, so the user has to click on the last "OK" button. This is the closest I could get so far (german version): Run ("c:\windows\system32\oobe\msoobe.exe /A") WinWaitActive ("Windows aktivieren", "") ; Wait for the controls to get "faded in" Sleep (3000) ; "Yes, activate" Send ("!J") ; "Next" Send ("!W") ; Wait again for fading Sleep (2000) ; "Not register, only activate" Send ("!N") ; "Next" Send ("!W") ; Wait until user closes window by clicking away last "OK" button. while WinExists ("Windows aktivieren", "") sleep (100) WEnd Any hints/suggestions/ideas? Link to comment Share on other sites More sharing options...
rudi Posted March 20, 2008 Share Posted March 20, 2008 (edited) Hallöchen Hello,I am trying to automate the windows registration dialog (without registering, there's no way to get updates, right?)I seems as if M$ has built in some extra hurdles for this: - There's no "visible text", so there's no way to find out the current state of the dialog. - There are extra delays (dimming of the text), so you can't simply send keystrokes as soon as the window becomes active. The keystrokes would simply go to nirvana. - None of the controls have ID's, so you are limited to sending keystrokes to the active window, which is error prone (e.g. when arbitrary windows pop up for arbitrary reasons). - There's no way to find out when the activation is done, so the user has to click on the last "OK" button.1st of all I'd never address the windows dir with it's absolute path: Use the macro @WindowsDir instead...2nd use the autoit info tool to check what it can "see" inside the activation window. If nothing is presented there, use windows relative mouse coordinates to do a simple mouse click.Schönen Gruß, Rudi. Edited March 20, 2008 by rudi Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
joew Posted March 20, 2008 Author Share Posted March 20, 2008 1st of all I'd never address the windows dir with it's absolute path: Use the macro @WindowsDir instead...Thanks for the hint, I'll change that.2nd use the autoit info tool to check what it can "see" inside the activation window. If nothing is presented there, use windows relative mouse coordinates to do a simple mouse click.That is exactly the problem: the info tool shows me nothing usable. Looks like M$ has managed to hide everything. There even seems to be no way to find out _when_ to send the clicks/keystrokes. Link to comment Share on other sites More sharing options...
weaponx Posted March 20, 2008 Share Posted March 20, 2008 (edited) I have never had to register to get updates, do you mean activation? Edited March 20, 2008 by weaponx Link to comment Share on other sites More sharing options...
joew Posted March 20, 2008 Author Share Posted March 20, 2008 I have never had to register to get updates, do you mean activation?Yes, you're right. I'm talking about activation. Sorry for the confusion! 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