Jump to content
Sign in to follow this  
Mcbovice

Memory Reading From Two Processes With The Same Name?

Recommended Posts

Mcbovice

I have two programs that I use that connect to a server, however I always have two of them open. They have the same name, now I am able to read to the memory of the first one that I opened with

$iv_Pid = ProcessExists ("TrailerCentral.exe")
$MemoryOpen = _MemoryOpen($iv_Pid)

I then run

$Mem_Read = _MemoryRead('0x' & '0066F5F0', $MemoryOpen)

Which works flawlessly, however how can I read the memory of the other process with the same name?

Share this post


Link to post
Share on other sites
computergroove

Arrays are a bugger to understand. This will help get you started.

#include <array.au3>

$pList = Processlist("TrailerCentral.exe")

If IsArray($pList) then
     _ArrayDisplay($pList)
else
     $iv_Pid = ProcessExists ("TrailerCentral.exe") $MemoryOpen = _MemoryOpen($iv_Pid) \
EndIf

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites
Mcbovice

 

Arrays are a bugger to understand. This will help get you started.

#include <array.au3>

$pList = Processlist("TrailerCentral.exe")

If IsArray($pList) then
     _ArrayDisplay($pList)
else
     $iv_Pid = ProcessExists ("TrailerCentral.exe") $MemoryOpen = _MemoryOpen($iv_Pid) \
EndIf

Thank you, If I run that code exactly above I get the Two Processes with PID's I assume. However if I try to use lets say

.......
If IsArray($pList) then
     _ArrayDisplay($pList)     ; This works fine and gives me info about the two processes
     ToolTip($pList[1],0,0, "Random") ; Why does this throw an error? Array variable has incorrect number of subscripts 
else
.........

Share this post


Link to post
Share on other sites
ZacUSNYR

Because it's a 2d array

ToolTip($pList[1][0],0,0, "Random")

Share this post


Link to post
Share on other sites
Mcbovice

Thank you all for the help. Much appreciated. Everything is working smoothly now.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×