Automatically Close RuneMate

Discussion in 'Programming & Hardware' started by itscwade, Jun 23, 2015.

  1. itscwade

    Joined:
    Jun 23, 2015
    Messages:
    2
    Likes Received:
    0
    Hello,

    I'm new but am really enjoying RuneMate, so I wanted to share this extremely basic AutoIt script bot that I wrote. This will allow for you to automatically close RuneMate after X amount of milleseconds (I like to do 2 hours). With a little tweaking, this could probably be setup to automatically randomize the amount of time before closing RuneMate.

    1. Download AutoIt
    https://www.autoitscript.com/site/autoit/downloads/

    2. Install AutoIt. Run autoit-v3-setup.exe

    3. Open SciTE script bot Editor and paste the following code:
    Code (Text):
    1. $p = "javaw.exe"; Name of the process for RuneMate
    2. While True
    3.   If ProcessExists($p) Then
    4.     Sleep(7200000); 2 hours
    5.     ProcessClose($p)
    6.    EndIf
    7. Wend
    4. Save as a .au3 file and then launch your AutoIt script bot! It will appear as a taskbar icon if you ever wish to pause the script bot or exit out of it before it finishes executing.

    I'm not even sure how much this will help or not, but regardless, happy botting!
    --- Double Post Merged, Jun 23, 2015, Original Post Date: Jun 23, 2015 ---
    Hello,

    I've made a GUI version in C# for those who did not want to go to the trouble of taking the steps in the first post. Simply launch RuneMate, then launch Kill Manager, then enter a time in minutes and enjoy!

    Screenshot:
    [​IMG]

    Download:
    https://www.mediafire.com/?qxezo7jc7cow0zj

    Source:
    Code (Text):
    1. using System;
    2. using System.Collections.Generic;
    3. using System.ComponentModel;
    4. using System.Data;
    5. using System.Drawing;
    6. using System.Linq;
    7. using System.Text;
    8. using System.Threading.Tasks;
    9. using System.Windows.Forms;
    10. using System.Diagnostics;
    11.  
    12. namespace Kill_Manager
    13. {
    14.     public partial class Form1 : Form
    15.     {
    16.         private int check = 0;
    17.         public Form1()
    18.         {
    19.             InitializeComponent();
    20.         }
    21.  
    22.         private void Form1_Load(object sender, EventArgs e)
    23.         {
    24.             Random rand = new Random();
    25.             int r = rand.Next(0, 120);
    26.  
    27.             Process[] processlist = Process.GetProcesses();
    28.  
    29.             foreach(Process theprocess in processlist)
    30.             {
    31.                 if(theprocess.ProcessName == "javaw")
    32.                 {
    33.                     this.check += 1;
    34.                 }
    35.             }
    36.  
    37.             txtTime.Text = r.ToString();
    38.  
    39.             if(this.check == 0)
    40.             {
    41.                 MessageBox.Show("Unable to detect RuneMate! Make sure that RuneMate is running first, then re-launch this application.", "Can't find RuneMate");
    42.                 btnKill.Enabled = false;
    43.             }
    44.         }
    45.  
    46.         private void btnKill_Click(object sender, EventArgs e)
    47.         {
    48.             btnKill.Enabled = false;
    49.             txtTime.Enabled = false;
    50.  
    51.             Process[] p = Process.GetProcessesByName("javaw");
    52.             int time = int.Parse(txtTime.Text);
    53.             time *= 60 * 1000;
    54.  
    55.             Form1.ActiveForm.WindowState = FormWindowState.Minimized;
    56.             System.Threading.Thread.Sleep(time);
    57.             p[0].Kill();
    58.  
    59.             Application.Exit();
    60.         }
    61.     }
    62. }
     
  2. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,419
    Likes Received:
    1,003
    Reserved post for when I compile and post verified safe mirror.
     
  3. Eagles13

    Eagles13 The only thing Alpha about me is my bots

    Joined:
    Sep 22, 2014
    Messages:
    616
    Likes Received:
    180
    Or you could just create a batch file and type this shit:

    Code (Text):
    1. timeout /t 7200
    2. taskkill /f /im javaw.exe
    (set to 2 hours)

    Obviously the number is in seconds. Functionality is identical when executed, except you don't need the autoit botnet.
     
    itscwade likes this.
  4. itscwade

    Joined:
    Jun 23, 2015
    Messages:
    2
    Likes Received:
    0
    Sweet, either that or the C# is the better bet then. Thanks!
     

Share This Page

Loading...