JeffTremaine Posted February 18, 2009 Share Posted February 18, 2009 Hello. First of all, this is my first post. Ok, time for my problem. I'm currently trying to retrieve the playername from World of Warcraft for a simple little project I've started. To do so, I have to read the memory etc etc. Everything works except that when I read the playername and convert it from binary, it only returns the first 4 characters. But if I read the memory AGAIN with the same offset +0x4, I get the next 4 characters and if I read once again with the offset +0x8, I get the last characters in the name. However, I'm unable to put them all together in 1 line, for example $name = msgbox(0, "", $t1 & $t2 $t3) (T = translate) That only returns the 1st 4 characters, aka, the ones from $t1 and none from the others. And even if I type &"L" after, the L doesn't show. Also, if I enter the 3 variables I use to search with into the same binarytostring function. $t = binarytostring($name1&$name2&$name3) msgbox(0, "", $t) That only returns the the values I get from reading the memory, in one line. Example from my script: #Include <NomadMemory.au3> SetPrivilege("SeDebugPrivilege", 1) $dll = DllOpen("user32.dll") $wow = _memoryopen(WinGetProcess("World of Warcraft")) $name1 = _memoryread(0x011CB348, $wow) $name2 = _memoryread(0x011CB348+0x4, $wow) $name3 = _memoryread(0x011CB348+0x8, $wow) $t1 = BinaryToString($name1) $t2 = BinaryToString($name2) $t3 = BinaryToString($name3) So please, if anyone could take their time and check what could be wrong, I'd apreciate it. Also, if oyu need any more info, just ask for it. ~Jeff Tremaine. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 18, 2009 Moderators Share Posted February 18, 2009 JeffTremaine,Welcome to the AutoIt forums. Good start - code to work on and a clear question!You have coded this:$name = msgbox(0, "", $t1 & $t2 $t3)which will not work because you are trying to concatenate the 2 variables $t1 and $t2 $t3. AutoIt does not know what $t2 $t3 means.If you were to code this:$name = msgbox(0, "", $t1 & $t2 & $t3)you will concatenate the 3 variables $t1 and $t2 and $t3 and it should work!Happy with the difference between the 2 lines?Try downloading and installing the full version of SciTE4AutoIt3 to use as your editor, it has a built-in checker to catch things like this (and much more!). I recommend it highly.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
JeffTremaine Posted February 18, 2009 Author Share Posted February 18, 2009 JeffTremaine, Welcome to the AutoIt forums. Good start - code to work on and a clear question! You have coded this:$name = msgbox(0, "", $t1 & $t2 $t3) which will not work because you are trying to concatenate the 2 variables $t1 and $t2 $t3. AutoIt does not know what $t2 $t3 means. If you were to code this:$name = msgbox(0, "", $t1 & $t2 & $t3) you will concatenate the 3 variables $t1 and $t2 and $t3 and it should work! Happy with the difference between the 2 lines? Try downloading and installing the full version of SciTE4AutoIt3 to use as your editor, it has a built-in checker to catch things like this (and much more!). I recommend it highly. M23 Ye I now realize my typo Well the thing is, I get the values and everything. Let's say my ingame name is Jefftremaine. $t1 returns 'Jeff' $t2 returns 'trem' $t3 returns 'aine' The problem is, when I try with the same code as you suggested (same as mine except for the typos which excluded the '&') It shows a msgbox with the text 'Jeff' and skips everything behind the $t1. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 18, 2009 Moderators Share Posted February 18, 2009 JeffTremaine,It is not that I do not believe you , but are you sure that $t2 and $t3 hold what you think they do? If you them into a MsgBox on their own, do they display?MsgBox((0, "", $t2) MsgBox((0, "", $t3)If a concatenation appears to fail, it is usually because there is nothing there to show!M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
JeffTremaine Posted February 18, 2009 Author Share Posted February 18, 2009 JeffTremaine, It is not that I do not believe you , but are you sure that $t2 and $t3 hold what you think they do? If you them into a MsgBox on their own, do they display?MsgBox((0, "", $t2) MsgBox((0, "", $t3) If a concatenation appears to fail, it is usually because there is nothing there to show! M23 As said, $t2 and $t3 returns the next 8 characters in the name. And it doesn't matter whatever I put after the $t1, it still doesn't show =/ 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