Jump to content
Sign in to follow this  
SXGuy

How to use ConsoleWrite Correctly?

Recommended Posts

SXGuy

Im trying to make a simple disembler similiar to Cheat Engine.

So far i am able to pass each address and each line of bytes in a messagebox

but when i use consolewrite instead, nothing happens.

Im probably doing something wrong, can anyone advice?

#include <NomadMemory.au3>

Local $BaseAddress = "0x01009000"
Local $array
Local $PID
$PID = ProcessExists("AProcess.exe")

$hProcess = _MemoryOpen($PID)
While $BaseAddress
$Array = _MemoryRead ($BaseAddress,$hProcess,'byte[16]')
;msgbox(0,"Test","Addy " & HEX($BaseAddress) & " Byte " & $Array)
ConsoleWrite(HEX($BaseAddress) & " Byte " & $Array & @CRLF)
If $BaseAddress = Dec("010090A0") Then Call ("Idle")
$BaseAddress = $BaseAddress + 16
WEnd


Func Idle()
_MemoryClose($PID)
While 1
Sleep(10)
Wend
EndFunc

Basically, it takes the base address of a process and reads the first 16 bytes, it then increments the address to read by 16 and continues the process of reading addresses and bytes up to the 10th address

Like i say, if i use a messagebox, it works, but i want to be able to output the address and bytes in a console.

Edited by SXGuy

Share this post


Link to post
Share on other sites
GodlessSinner

Post <NomadMemory.au3> and maybe then someone can help you....


_____________________________________________________________________________

Share this post


Link to post
Share on other sites
Valik

Thank you for reminding me why I don't read the support forum. Your question is about ConsoleWrite() but the code has fuck-all to do with ConsoleWrite(). Oh, yeah, there is indeed a call to the function in there buried amongst completely pointless and unrelated code. Not to mention the documentation explains how to use ConsoleWrite(). Would it have been too hard to at least ask:

Why doesn't this work?

ConsoleWrite("Foo")
I guess it's makes more sense to dilute your question with reams of unrelated information? Edited by Valik

Share this post


Link to post
Share on other sites
SXGuy

Wow, i never knew this forum was filled with so many spitefull people.

firstly, this has NOTHING to do with NomadMemory, unless you cant read properly, i didnt ask 1 single question relating to reading memory functions.

secondly, if you put your ego aside for 1 second, i asked why consolewrite doesnt print the information i supply it, i didnt ask you to explain how to add data inside the brackets, i asked why the data i supplied does not work.

Hense

ConsoleWrite(HEX($BaseAddress) & " Byte " & $Array & @CRLF)

Maybe if you idiots got off your high horse for one second and actually read what i asked you wouldnt come across so arrogant and aggressive.

Oh and last but not least if what i written is pointless code to you, thats fine, but thats not the point, its something I wanted to do.

If the code doesnt work within ConsoleWrite, fine, tell me that, but dont flame me like some 8 year old.

Share this post


Link to post
Share on other sites
water

I assume you compiled your script and now ConsoleWrite doesn't display your data? Please see this thread.

NB: Please choose your words more carefully. You wouldn't be the first user to get banned because of a conversation like this. Search the forum and you'll understand what I mean. :D


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
SXGuy

Im sorry for getting angry, it just winds me up that i write a simple question and get flamed by people who dont actually read what i ask.

Anyway, you have helped me, sorry, i didnt realise consolewrite only works with compiled scripts.

I guess a mod can now lock this thread.

Share this post


Link to post
Share on other sites
water

.. i didnt realise consolewrite only works with compiled scripts.

It's the other way round. ConsoleWrite works easily within the ScITe environment. To get ConsoleWrite output when you compiled your script you have to do what is mentioned in the referenced thread.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
Valik

Wow, i never knew this forum was filled with so many spitefull people.

Spiteful? No. Just tired of people who can't find their own ass.

firstly, this has NOTHING to do with NomadMemory, unless you cant read properly, i didnt ask 1 single question relating to reading memory functions.

EXACTLY. So why does your example include it? It's irrelevant bullshit. It has absolutely nothing to do with your question yet you included it anyway which only served to confuse Godless.

secondly, if you put your ego aside for 1 second,

Ego? Here we go with that load of horseshit again.

i asked why consolewrite doesnt print the information i supply it,

Because you touch yourself at night? Or because you don't read the documentation? It's one of those two. Maybe both. There's also the possibility that you haven't given enough (relevant) information.

i didnt ask you to explain how to add data inside the brackets, i asked why the data i supplied does not work.

I showed you how to give a relevant example that simplifies your problem down to a single unambiguous statement. Way to miss the point.

Hense

ConsoleWrite(HEX($BaseAddress) & " Byte " & $Array & @CRLF)
Yeah, as I said, buried in irrelevant code and requiring a an external file to even run.

Maybe if you idiots got off your high horse for one second and actually read what i asked you wouldnt come across so arrogant and aggressive.

Maybe if you got off your idiot horse and read what I said you wouldn't come across as a dumbass. I'm fully aware of what your problem is. I'm so aware of what your problem is I documented it when I wrote the function.

Oh and last but not least if what i written is pointless code to you, thats fine, but thats not the point, its something I wanted to do.

Again, missing the point. We don't give a shit if you're using ConsoleWrite() to output "Hello World" or the trillionth digit of Pi. The point is, you have a question, you asked the question but buried your actual issue in irrelevant rubbish. There's not some magical trick. If you can figure out how to get ConsoleWrite("foo") to work then you can get it to work with any data you want to give it. So why bog your post down with stuff that doesn't matter and is not related to the question?

If the code doesnt work within ConsoleWrite, fine, tell me that, but dont flame me like some 8 year old.

Ask a question like you have something above an 8 year old's intelligence and you might be onto something. Also, I'm not flaming you. Not even close. In fact, after the post I've so thoroughly ripped to shreds you've actually flamed yourself far more than I have because it's pretty obvious that you are over here and the point is way over there.

I'm going to strongly suggest you take this lashing, read the documentation and move along. You've been given a very helpful piece of advice; don't convolute your questions with extraneous data irrelevant to the question itself. You can continue to argue with me which will likely land you here or you can accept the fact that you don't know how to properly ask a question, learn from that mistake and move along.

Share this post


Link to post
Share on other sites
Valik

Im sorry for getting angry, it just winds me up that i write a simple question and get flamed by people who dont actually read what i ask.

How about you re-consider that "don't actually read what I ask" bit. I'm a little tired of that line. I knew exactly what your problem was. I knew exactly where the answer to your problem was. I knew what your problem was years ago when I wrote the function and the accompanying documentation. The only person here who has failed to read is you.

Share this post


Link to post
Share on other sites
water

... pfft ...


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.