Jump to content

Reading number from calc.exe screen with nomadmemory.au3


pyromus
 Share

Recommended Posts

Hi Friends 
 
I have been trying to get number from calc.exe screen. I have tried some codes. but it does not work. could you say me how i will get data from calc.exe reading from memory ? i could not do this because there is no worked example in this forum.
 
My CODE :
 

#include <Array.au3>
#include <MemoryConstants.au3>
#include <NomadMemory.au3>
SetPrivilege("SeDebugPrivilege", 1)
HotKeySet('{ESC}', '_TerminateLoop')

$exe = "calc.exe";
$pointer = "0031DE4C";

Dim $Offset[2] = [0, 0x0]
While 1
$Process = _MemoryOpen(ProcessExists($exe))
If Not @error Then
  $Value = _MemoryRead($pointer, $Process)
   ConsoleWrite("memory : "& $Value & " error : " & @Error  & @CRLF);
   exit;
EndIf
Sleep(100);<<<<<<< Note this sleep this is how fast we read memory
WEnd
Link to comment
Share on other sites

Is this a real problem you need to solve or just to practice?

IMHO you learn the most when solving REAL problems.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Wouldn't it be easier to directly read the Control?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

as I see, it is possible but there are some delicacy, is it correct ? I have been using autoit for 3 years. i dont know other languages, c or c++ or vb. I love autoit and I would like do my software with autoit. 

if i see example i can do thing i wanted but there is not working examples. I need just one working example.

Link to comment
Share on other sites

on win xp calc you can get data like this coz controll dont hold that text on win info tool

MsgBox(0,'',StringSplit(WinGetText('Calculator'),@CRLF)[1])

for win7 i cant test on this comp

so before someone try to help you with memory part please answer this..

For what project are you trying to read memory?

And why do you think that reading memory is best solution for you?

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...