Welcome!

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

Sign up now!

Question Referencing Client PIDs?

Joined
Jun 17, 2018
Messages
3
Question:
Is there a way access client PIDs automatically and accurately, before logging into the client? (For example: a command line argument, Runemate backend, etc)?

Background:
I'm currently building a management system for my bots and accounts. Each account has its own proxy, and each proxy is tied to a specific official 07 launcher (1, 2, 3, etc) using Proxifier. The process involves picking an account and bot, then having my management system find which proxy and launcher is associated with the account, launching the correct client, and using Runemate's command line arguments to run a bot using the correct client. However, to do this, I need the PID of the correct client. The process is outlined below:

Account 1 ---> Proxy 1 ----> Launch Client 1 ----> Get Client PID ----> Run bot using command line arguments for the specified PID

Problem:
I have not found a viable way for my program to automatically reference the PIDs for each client.

Solution Attempts:
I've found there are three ways to find client PIDs:
  1. View them manually in Runemate's interface
  2. Running Environment.getRuneScapeProcessId() while already logged in. (Not viable for my setup as this would leave me vulnerable to logging the wrong account into the wrong proxy)
  3. I built a very rugged Python script that involves:
    1. Launching Runemate
    2. Launching an OSRS client
    3. Taking a screenshot of Runemate's interface
    4. Using pyautogui to navigate the app and take a screenshot
    5. Using pytesseract to convert the picture to text
    6. Searching the text for the PID numbers (the overall process is only around 60% accurate)
None of these options seems to work for my project.

Question (Again): Is there a way access client PIDs automatically and accurately, before logging into the client? (For example: a command line argument, Runemate backend, etc)?
 
Last edited:
Mod Automation
Joined
Jul 26, 2013
Messages
3,012
Are you asking how you can identify process IDs of running RuneScape clients on a computer? If so, this can be done at the operating system level by filtering the running processes by the criteria of interest, e.g. processes of a Java runtime with a window title starting with "RuneScape". The way to do this will be different depending on operating system.
 
Joined
Jun 17, 2018
Messages
3
@Arbiter Thanks for this. This had been racking my brain for much more time than I'd like to admit. I was under the impression that PID was assigned by RuneMate, but it turns out it's assigned by the OS (Windows in my case).

For anybody that has the same misunderstanding as me, I found what I was looking for in:
Task Manager ---> Details ---> JagexLauncher.exe ---> PID (second column)
 
Top