Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Request Easier automation integration

Joined
Jan 28, 2017
Messages
492
@Arbiter
Use case: I want to schedule my bot to start at 2pm every day via Windows Task scheduler via a powershell script:

I could use something as following:
(this in my opinion is already too cumbersome. but it's managable)
Code:
$gameMode = "osrs"; #"osrs" or "rs3"
$username = "Negrita";
$password = "MySecretPassword";
$accountAlias = "Junker3";
$botName = "ChickenFighter";

$jagexAppletViewer = "";

if($gameMode -eq "osrs"){
    $jagexAppletViewer = Get-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\jagex-jav\shell\open\command;
}  elseif($gameMode -eq "rs3"){
    $jagexAppletViewer = Get-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\jagex-javs\shell\open\command;
} else {
    Write-Error("UnSupported game types: osrs|rs3");
    return;
}


$pclass = [wmiclass]'root\cimv2:Win32_Process'
$rs_pid = $pclass.Create($jagexAppletViewer.'(default)', '.', $null).ProcessId;


$command = [string]::Format("C:\Program Files (x86)\RuneMate\RuneMate.exe -login={0}:{1} -autostart={2}:{3}:{4}", $username, $password, $rs_pid, $accountAlias, $botName);

$rm_pid = $pclass.Create($command , '.', $null).Process

Great this works.
But I have no way of tracking multiple things:
  • Bot succesfully started
  • Bot still doing something (useful)
  • Bot crashed (unless the bot would call System.exit(exitCode))
  • Bot completed (could check RS Highscores) (unless the bot would call System.exit(exitCode))

In my particular case:
O hey I'm banned, but the bot keeps running (and charging).
2018-09-03 01_02_50-Start.png


Other suggested improvements:
Bot name:
* Disallow space (not feasible?)
* Allow wild cards or substitude "_" for a space
* Display the internal ID of a bot somewhere (not wanted? Even if displayed > allows spaces)
* Support quotes to provide arguements to autostart

Account alias:
* similiar problem > disallow space when entering an account alias
* Support quotes to provide arguments to autostart
 


//Rant - part 2
Probably going to be rejected because "there is a way...", I think handling RM via command arguments can use a serious upgrade.

  • I need to start a new RuneMate.exe process for each RS instance (eating up a lot of CPU)
  • I barely have a way of tracking what is going on
  • It's in general super sensetive to spaces and uncommon chars
  • I have to kill both the RuneMate & RS spid to stop an instance. Some more graceful shutdown would be cool.

Ideally I'd like to just be able to run one command:
runemate.exe -autostart=OSRS:"some store bot with space and &é&)'(!(àç§":"my account
and when it finished, the process just kills itself.

AND/OR
query the current running instances via a URL.
Add instance(s) to my running RuneMate process via command line/scheduler
 
Last edited:
Top