Jump to content

World of Warcraft install script?


redfive19
 Share

Recommended Posts

Okay so I wanted to make a script for my unattended DVD to install WoW. It gets stuck on the installing part. The window where it installs has no title (unlike the window in back of it). This is where the sleep command halts. What am I doing wrong? Has anyone made a script to do this? If so, can you please post it? (btw, I have all 5 cd's in one folder [i followed a guide on how to put all 5 on 1 dvd] and it works doing it manually)

thanks in advance!!!

Run("Installer.exe")
WinWait("World of Warcraft Installer", "")
WinActivate("World of Warcraft Installer", "")
Send("W")
WinWait("End User License Agreement", "")
ControlFocus("End User License Agreement", "", 1006)
Do
    Send("{PGDN}")
Until ControlCommand("End User License Agreement", "", 1004, "IsEnabled", "")

ControlClick("End User License Agreement", "", 1004)
WinWait("Installation Destination Directory", "")
ControlSetText("Installation Destination Directory", "", 1028, @ProgramFilesDir & "\World of Warcraft")
ControlClick("Installation Destination Directory", "", "Button1")

While WinExists("", "Installing ")
    sleep(100)
WEnd
WinWait("", "Installing ")
WinWaitClose("", "Installing ")
Link to comment
Share on other sites

Okay so I wanted to make a script for my unattended DVD to install WoW. It gets stuck on the installing part. The window where it installs has no title (unlike the window in back of it). This is where the sleep command halts. What am I doing wrong? Has anyone made a script to do this? If so, can you please post it? (btw, I have all 5 cd's in one folder [i followed a guide on how to put all 5 on 1 dvd] and it works doing it manually)

thanks in advance!!!

While WinExists("", "Installing ")
    sleep(100)
WEnd
WinWait("", "Installing ")
WinWaitClose("", "Installing ")
Does the non-titled window with "Installing" as window text go away when it is done? If not, then your While WinExists will loop forever until the window actually vanishes. And what is the point of waiting for it after you have waited for it already? Is there another untitled window which has "Installing" as window text appear after the original window vanishes (if it does)?

I do not play WoW (or any PC games, for that matter). I am just asking questions to help clarify what you are attempting to do.

Link to comment
Share on other sites

Does the non-titled window with "Installing" as window text go away when it is done? If not, then your While WinExists will loop forever until the window actually vanishes. And what is the point of waiting for it after you have waited for it already? Is there another untitled window which has "Installing" as window text appear after the original window vanishes (if it does)?

I do not play WoW (or any PC games, for that matter). I am just asking questions to help clarify what you are attempting to do.

also if it takes a second for said window to appear, the condition would be false at the start of the loop, and the while loop would be skipped... you may want to use a winwaitactive() to make sure the window exists prior to your loop. also instead of using an empty string for title, you may want to set Opt("WinTitleMatchMode",4) at the start of your code, and use the class name to locate the window for the WinWaitActive() and WinExists() calls. full examples are in the help file.
Link to comment
Share on other sites

also if it takes a second for said window to appear, the condition would be false at the start of the loop, and the while loop would be skipped... you may want to use a winwaitactive() to make sure the window exists prior to your loop. also instead of using an empty string for title, you may want to set Opt("WinTitleMatchMode",4) at the start of your code, and use the class name to locate the window for the WinWaitActive() and WinExists() calls. full examples are in the help file.

Opt("TrayIconDebug", 1)
Run("Installer.exe")
WinWait("World of Warcraft Installer", "")
WinActivate("World of Warcraft Installer", "")
Send("W")
WinWait("End User License Agreement", "")
ControlFocus("End User License Agreement", "", 1006)
Do
    Send("{PGDN}")
Until ControlCommand("End User License Agreement", "", 1004, "IsEnabled", "")

ControlClick("End User License Agreement", "", 1004)
WinWait("Installation Destination Directory", "")
ControlSetText("Installation Destination Directory", "", 1028, @ProgramFilesDir & "\World of Warcraft")
ControlClick("Installation Destination Directory", "", "Button1")
Opt("WinTitleMatchMode",4)

WinWait("classname=#32770", "&Cancel")

While WinExists("classname=#32770", "&Cancel")
    sleep(100)
WEnd

Trying this now based on some of your suggestions. Thank you both!! I'll post back and see if it works.

-redfive

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