one-i;25344 wrote:I'm trying to set up my computer to run a script to auto start Hearthstone and then HearthRanger every day after the dailies come out.
Is there a command line parameter to open HearthRanger in a "start" state?
I've tried Macro Recorders and all of them seem to poop themselves the moment the scripts have them clicking on the Hearthranger window.
If anyone has any other work arounds, I am using Windows 8.1
Thanks
Check Crash Ranger Recovery. It can start hearthranger, battle.net and hearthstone.
Then download autoit and copy/paste these lines:
Quote:Opt("WinTitleMatchMode", -2)
If ProcessExists("Recovery.exe") Then ProcessClose("Recovery.exe")
If ProcessExists("HearthRanger.exe") Then ProcessClose("HearthRanger.exe")
If ProcessExists("Battle.net Launcher.exe") Then ProcessClose("Battle.net Launcher.exe")
If ProcessExists("Battle.net.exe") Then ProcessClose("Battle.net.exe")
If ProcessExists("Hearthstone.exe") Then ProcessClose("Hearthstone.exe")
sleep(5000)
run("Recovery.exe",@WorkingDir,@SW_MAXIMIZE)
while 1
sleep(1000)
If WinGetTitle("","Ranger Crash Recovery") then
ControlClick("","Ranger Crash Recovery","[CLASS:Button; INSTANCE:2]")
ExitLoop
EndIf
WEnd
while 1
sleep(1000)
If WinGetTitle("Oops!","") then
ControlClick("Oops!","","[CLASS:Button; INSTANCE:1]")
WinKill("","Ranger Crash Recovery")
If ProcessExists("Recovery.exe") Then ProcessClose("Recovery.exe")
If ProcessExists("HearthRanger.exe") Then ProcessClose("HearthRanger.exe")
If ProcessExists("Battle.net Launcher.exe") Then ProcessClose("Battle.net Launcher.exe")
If ProcessExists("Battle.net.exe") Then ProcessClose("Battle.net.exe")
If ProcessExists("Hearthstone.exe") Then ProcessClose("Hearthstone.exe")
$Random = Random(300000,600000,1) ;mellem 5 og 10 Minutter
sleep($Random )
run("Recovery.exe",@WorkingDir,@SW_MAXIMIZE)
sleep(1000)
If WinGetTitle("","Ranger Crash Recovery") then
ControlClick("","Ranger Crash Recovery","[CLASS:Button; INSTANCE:2]")
EndIf
EndIf
WEnd
Then compile and set this exe in the same folder as hearthranger and recovery. Then you can just use a script to open the newly created exe, like in task sheduler.
Its something I use myself and it works. The code might not be the pretties I don't know, I am not a programmer :).
The last while loop in my autoit code was before the latest update, it handleded a crash I eqpirenced but I think it can be removed.