-
Read string in other process
Some games uses strings to store data about the game.
For this reason I often want to search for substring and then read in the whole string.
Using botkitty it is done like this:
Code:
public static class ProcessOps
{
public static string[] MemFullStrings(this IProcess process, string substring)
{
var matches = process.MemFind(substring);
var result = new string[matches.length];
for(var i = 0; i < matches.length; ++i)
result[i] = process.MemReadString(matches[i]);
return result;
}
}
This is an extension method allowing you to call it like this:
Code:
IProcess process = ...;
var full_strings = process.MemFullStrings("substring");
Have fun
-
Post Thanks / Like - 2 Thanks
Neer,
Willy (2 members gave Thanks to Kickupx for this useful post)
-
This is great! You should also link to this thread from the BotKitty thread so that people can find some examples
-
Post Thanks / Like - 1 Thanks
Kickupx (1 members gave Thanks to Willy for this useful post)
-
Originally Posted by
willy t3h whale
This is great! You should also link to this thread from the BotKitty thread so that people can find some examples
Thanks for your support man!
Will do it