Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Created a script for switching .tsk (task) files
snowbunny
#1 Posted : Thursday, May 18, 2017 11:39:18 PM(UTC)

Rank: Advanced Member

Groups: Registered
Posts: 35
Man

Thanks: 8 times
Was thanked: 4 time(s) in 4 post(s)
I wasn't sure where to put this, so I'll place this here.

This is a short little batch script that allows you to swap out .tsk files.

Reason?
Well I run multiple hearthstone accounts/bot accounts, and I was previously having a "hearthranger" folder for each one. Then I realized everything else is shared between then except for the "HearthRanger - Bot for Hearthstone.tsk" (as far as I'm aware). So to reduce space being used on my computer, I thought why don't I just switch the tsk files. But instead of bogging JoyAdmin with more feature requests, I decided to write up a script.

Usage:
You can either run this script inside the root Hearthranger folder or within the task folder itself.
Running it inside the main folder gives you the option to run Hearthranger.exe

Since I can't include attachments, I'll just post the code snippet below. Just create a "switchtask.bat" file, paste the provided code in and run it.
Code:

@echo off
set target=HearthRanger - Bot for Hearthstone.tsk

ECHO switches .tsk files for HearthRanger
ECHO existing `.tsk` files:

rem set task=false
if exist "task" (
    set target_path=task\
    dir /b /d /a-d task\*.tsk
) else (
    set target_path=
    dir /b /d /a-d *.tsk
)

ECHO ** enter names ~without~ ".tsk" ending **
set /p input=Enter filename of config to use: 
set /p output=Enter filename to save current as: 

ECHO Moving "%target_path%%target%" to "%target_path%%output%.tsk"
move "%target_path%%target%" "%target_path%%output%.tsk"
ECHO Moving "%target_path%%input%.tsk" to "%target_path%%target%"
move "%target_path%%input%.tsk" "%target_path%%target%"
if "%target_path%"=="task\" (
    goto launch
) else (
    pause
    goto cont
)
:launch
set /p hearthranger=Would you like to launch HearthRanger? (y/n): 
if "%hearthranger%"=="y" (
    if exist "HearthRanger.exe" (
        ECHO Launching HearthRanger.exe
        start "" "HearthRanger.exe"
    ) else (
        ECHO HearthRanger.exe not in current directory
    )
)
:cont


Old Code:
1 user thanked snowbunny for this useful post.
divaeva on 5/24/2017(UTC)
r4nd0m
#2 Posted : Tuesday, May 23, 2017 5:41:34 PM(UTC)

Rank: Advanced Member

Groups: Registered
Posts: 47

Thanks: 2 times
Was thanked: 8 time(s) in 6 post(s)
this is really cool!

i've been messing around with a script to switch accounts, but didn't really work :[

was wondering if you also tried an account switcher? my computer can't really run multiple instances at the same time! :[

snowbunny
#3 Posted : Wednesday, May 24, 2017 9:53:53 AM(UTC)

Rank: Advanced Member

Groups: Registered
Posts: 35
Man

Thanks: 8 times
Was thanked: 4 time(s) in 4 post(s)
Are you referring to bot accounts? If so, your bot account is stored within the .tsk file. So by switching .tsk files you can also switch bot accounts

The xml line is:
<sBotUsername></sBotUsername>
r4nd0m
#4 Posted : Monday, May 29, 2017 5:33:20 AM(UTC)

Rank: Advanced Member

Groups: Registered
Posts: 47

Thanks: 2 times
Was thanked: 8 time(s) in 6 post(s)
actually i meant switching hearthstone accounts.
snowbunny
#5 Posted : Wednesday, May 31, 2017 2:29:30 AM(UTC)

Rank: Advanced Member

Groups: Registered
Posts: 35
Man

Thanks: 8 times
Was thanked: 4 time(s) in 4 post(s)
Ah, no I haven't. I usually run multiple instances of battle.net simultaneously and hit play for the account I want. (Which does get tricky when using auto-scheduling.) If I do try and figure it out, I'll let you know.
r4nd0m
#6 Posted : Wednesday, May 31, 2017 7:40:47 PM(UTC)

Rank: Advanced Member

Groups: Registered
Posts: 47

Thanks: 2 times
Was thanked: 8 time(s) in 6 post(s)
how many accounts can you do simultaneously? also, do you use proxies?
snowbunny
#7 Posted : Thursday, June 1, 2017 8:26:01 PM(UTC)

Rank: Advanced Member

Groups: Registered
Posts: 35
Man

Thanks: 8 times
Was thanked: 4 time(s) in 4 post(s)
I don't use proxies. The number of accounts you can run simultaneously depends entirely on your computer. I have run 2 instances of Hearthstone on my gaming rig without a problem, but I know my cheap laptop can't handle more than one. I usually don't run multiple instances though, and was simply referring to having multiple instances of the launcher rather than the game running simultaneously. The reason I wrote this script though was because I wanted to switch between bot configs corresponding to the account I currently had open (running 1 Hearthstone instance at a time).

If your interested in using one computer and multiple instances simultaneously, the trick is by installing hearthstone in multiple locations on your computer. (If you google you can find a guide.) Then point the different Hearthranger account configs to the corresponding install paths. ( <sGamePath></sGamePath> in the .tsk file)
snowbunny
#8 Posted : Thursday, August 31, 2017 1:11:36 AM(UTC)

Rank: Advanced Member

Groups: Registered
Posts: 35
Man

Thanks: 8 times
Was thanked: 4 time(s) in 4 post(s)
Small update, lists .tsk files in task directory (quality of life fix)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.073 seconds.