Jump to content

Memory Reading Help


Recommended Posts

#include <Memread&write.au3>


$Process = "Itunes.exe"
$Pid = ProcessExists($Process)
$h_open = _MemOpen($pid)
$Read = _MemRead($h_open,Question?,Question?)
MsgBox(0, "Libary", "Current Track: " & $Read[0])
_MemClose($h_open)

Ok, I understand w0uter code a bit... but I still have a question...

In Itunes... this adress 0x0346B835 .... that gives your you the current song...

Is it possible to have it read that adress... then display in a Textbox the current song? I keep coming up with 83.. instead of the current song. Any help would be great.

Jeff

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

#include <Memread&write.au3>
$Process = "Itunes.exe"
$Pid = ProcessExists($Process)
$h_open = _MemOpen($pid)
$Read = _MemRead($h_open,Question?,Question?)
MsgBox(0, "Libary", "Current Track: " & $Read[0])
_MemClose($h_open)

Ok, I understand w0uter code a bit... but I still have a question...

In Itunes... this adress 0x0346B835 .... that gives your you the current song...

Is it possible to have it read that adress... then display in a Textbox the current song? I keep coming up with 83.. instead of the current song. Any help would be great.

Jeff

i think i remember someone a while back saying that itunes has an object model you can interact w/. i bet memory reading is not the easiest way to do this. especially since those addresses may change as updates/patches are applied to the software
Link to comment
Share on other sites

Well, for the past two updates they havn't.. I understand how to read them, but I don't understand how to display text with w0uter code..

Any help would be awesome.

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Awesome figured it out.

#include <Memread&write.au3>


$Process = "Itunes.exe"
$Pid = ProcessExists($Process)
$h_open = _MemOpen($pid)
$Read = _MemRead($h_open,0x0346B835)
MsgBox(0, "Song Reader", "Current Track: " & $Read)
_MemClose($h_open)

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

i think i remember someone a while back saying that itunes has an object model you can interact w/. i bet memory reading is not the easiest way to do this. especially since those addresses may change as updates/patches are applied to the software

This might not work, I do not have iTunes to test:

$oItunes = ObjCreate ("iTunes.Application")
$oCurrentTrack = $oItunes.CurrentTrack
If IsObj ($oCurrentTrack) = 0 Then
    MsgBox(0, "Error", "No song is currently playing")
Else
    MsgBox(0, "Current Track", "Name: " & $oCurrentTrack.Name & @CRLF & "Artist: " & $oCurrentTrack.Artist & @CRLF & "Album: " & $oCurrentTrack.Album & @CRLF & "BitRate: " & $oCurrentTrack.BitRate & " KBPS")
EndIf

More info here:

http://www.planet-source-code.com/vb/scrip...=64830&lngWId=1

Vb example that accesses the object and displays current track among other things. Look at its source, seems very helpful.

http://blogs.msdn.com/dancre/archive/2004/05/08/128645.aspx

Random page on using the Itunes Object

AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
Link to comment
Share on other sites

This might not work, I do not have iTunes to test:

$oItunes = ObjCreate ("iTunes.Application")
$oCurrentTrack = $oItunes.CurrentTrack
If IsObj ($oCurrentTrack) = 0 Then
    MsgBox(0, "Error", "No song is currently playing")
Else
    MsgBox(0, "Current Track", "Name: " & $oCurrentTrack.Name & @CRLF & "Artist: " & $oCurrentTrack.Artist & @CRLF & "Album: " & $oCurrentTrack.Album & @CRLF & "BitRate: " & $oCurrentTrack.BitRate & " KBPS")
EndIf

More info here:

http://www.planet-source-code.com/vb/scrip...=64830&lngWId=1

Vb example that accesses the object and displays current track among other things. Look at its source, seems very helpful.

http://blogs.msdn.com/dancre/archive/2004/05/08/128645.aspx

Random page on using the Itunes Object

looks good, but i don't have itunes to test either. i just new i remembered someone mentioning it, and i'd rather work with objects than memory addresses any day.
Link to comment
Share on other sites

Same here. Tracking down new memory addresses each update is a pain in the ass.

AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
Link to comment
Share on other sites

Yep, that works great thanks. The memread/write is really neat though. Thanks alot guys.

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Yep, that works great thanks. The memread/write is really neat though. Thanks alot guys.

Each time you get a new version of iTunes the memory addresses could change breaking whatever script you write.

Also, if you plan on doing anything more complicated with iTunes such as getting a list of songs in the library, controlling iTunes (eg, play, previous, next, etc) then it would be smart to use the object model.

Memory reading is what we do when there is no COM object :)

AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
Link to comment
Share on other sites

Each time you get a new version of iTunes the memory addresses could change breaking whatever script you write.

Also, if you plan on doing anything more complicated with iTunes such as getting a list of songs in the library, controlling iTunes (eg, play, previous, next, etc) then it would be smart to use the object model.

Memory reading is what we do when there is no COM object :)

Interesting.. I just want to get familiar with the mem. read/write funcations.. thanks for all your help.

Edited by Sardith

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Same here. Tracking down new memory addresses each update is a pain in the ass.

Interesting.. I just want to get familiar with the read/write funcations.. thanks for all your help.

one program i use for searching in memory is called "ArtMoney" it is very good for searching through memory of running processes, even giving you the option to stop the process to search for timers etc, or just to search in a static environment rather than a running application. i typically use that for finding memory addresses, and it lets you modify the address etc, and you can set it to fixed so that the program can't change the address once you change it... about a year (maybe more) ago i wrote a script that installed artmoney, and ran it hidden, then used control clicks and sends to identify/change addresses for hoyle casino. (it was easier to set the addresses for the dice roll so it was always 6's than to track down the money)
Link to comment
Share on other sites

Quick question.. is there some key to finding adresses or does it just take time.. Guess and check..

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Quick question.. is there some key to finding adresses or does it just take time.. Guess and check..

with artmoney, you can search, then filter through those results as the value changes. strings are easiest to find in a search, for most numbers you have to filter several times. and with unknown data types ( like a life bar or something for a game) you just check the values that go up or down according to the fluctuations of the value you're looking for. artmoney makes searching and identifying addresses VERY easy.
Link to comment
Share on other sites

Quick question for you.. How do you deal with changing adresses with each relunch of a client? Every time i'll exit/run the client again some adresses will still be vaild.. others won't. Any ideas?

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Quick question for you.. How do you deal with changing adresses with each relunch of a client? Every time i'll exit/run the client again some adresses will still be vaild.. others won't. Any ideas?

i would just avoid using memory I/O whenever i can
Link to comment
Share on other sites

I understand that, but the only other way for this program is DLL calling etc. which I don't even understand to the slightest.

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

I understand that, but the only other way for this program is DLL calling etc. which I don't even understand to the slightest.

silver lining is that comapritively speaking, IMHO dll's are easier to pick up than memory I/O. dont't get me wrong, i don't claim to be a dll guru or anything, it's just that dll functions tend to be alot more static than memory locations...
Link to comment
Share on other sites

Well, I guess I have a new thing to read up on :rollseyes:, id also need to write a .dll which.. I don't even have the slightest..

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Well, I guess I have a new thing to read up on :rollseyes:, id also need to write a .dll which.. I don't even have the slightest..

you're probably not going to need to write a dll, but to learn how to use the dll's that are already there. but if this is about the same thing you've been PM'ing me about, i would really reccomend writing a simple OCR. if you're just looking for numbers in a specific area of the screen, it's not going to be as big of a project to write the code for,like some of the OCR's that look for item names, etc for games.
Link to comment
Share on other sites

  • Moderators

you're probably not going to need to write a dll, but to learn how to use the dll's that are already there. but if this is about the same thing you've been PM'ing me about, i would really reccomend writing a simple OCR. if you're just looking for numbers in a specific area of the screen, it's not going to be as big of a project to write the code for,like some of the OCR's that look for item names, etc for games.

Speaking of OCR, I just finished my DLL, gotta test it out to see if it works (Finally got it to compile lol).

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...