Mcbovice Posted July 31, 2014 Share Posted July 31, 2014 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? Link to comment Share on other sites More sharing options...
Danp2 Posted July 31, 2014 Share Posted July 31, 2014 Take a look at ProcessList. It will return an array with the information you need to work with both app instances. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Solution computergroove Posted July 31, 2014 Solution Share Posted July 31, 2014 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 Link to comment Share on other sites More sharing options...
Mcbovice Posted July 31, 2014 Author Share Posted July 31, 2014 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 ......... Link to comment Share on other sites More sharing options...
ZacUSNYR Posted July 31, 2014 Share Posted July 31, 2014 Because it's a 2d array ToolTip($pList[1][0],0,0, "Random") Link to comment Share on other sites More sharing options...
Mcbovice Posted July 31, 2014 Author Share Posted July 31, 2014 Thank you all for the help. Much appreciated. Everything is working smoothly now. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now