|
You last visited: Today at 14:16
Advertisement
help!
Discussion on help! within the AutoIt forum part of the Coders Den category.
10/24/2013, 20:32
|
#1
|
elite*gold: 0
Join Date: Sep 2012
Posts: 40
Received Thanks: 25
|
help!
I have an address (pointer) to the league of legends from the camera:
"League of Legends.exe"+2A42A00
and I want to show my value autoit
sorry for my bad english
|
|
|
10/24/2013, 20:52
|
#2
|
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
|
If you want to read out the memory then first of all you need the offset if it's a pointer. I don't see any in your thread.
|
|
|
10/24/2013, 21:06
|
#3
|
elite*gold: 0
Join Date: Sep 2012
Posts: 40
Received Thanks: 25
|
This pointer is without offset!
|
|
|
10/24/2013, 21:38
|
#4
|
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
|
This may work:
Code:
#include <Pointer.au3>
Local $sModule = "ProcessName.exe", $pBase = 0x12345678
$hMemory = _MemoryOpen(ProcessExists($sModule))
$dwValue = _MemoryRead($pBase, $hMemory, "dword")
_MemoryClose($hMemory)
MsgBox(64, "", $dwValue)
I don't think that it will work because this handles no pointer.
If you have Offsets you may try
Code:
#include <Pointer.au3>
Local $sModule = "ProcessName.exe", $pBase = 0x12345678, $aOffsets[2] = [0, 0]
$hMemory = _MemoryOpen(ProcessExists($sModule))
$a_ptr_Value = _MemoryPointerRead($pBase, $hMemory, $aOffsets)
_MemoryClose($hMemory)
MsgBox(64, "", $a_ptr_Value[UBound($a_ptr_Value) - 1])
Maybe both won't work, then you need to try something else. If it doesn't work you can try to add #RequireAdmin in the first line.
|
|
|
10/25/2013, 00:05
|
#5
|
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
|
- Add '#RequireAdmin' in your script.
- Use
instead of the Pointer.au3.
|
|
|
10/25/2013, 01:09
|
#6
|
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
|
#RequireAdmin wird nicht immer benötigt, man kann es auch ggf. weglassen.
|
|
|
10/25/2013, 01:28
|
#7
|
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
|
Quote:
Originally Posted by alpines
#RequireAdmin wird nicht immer benötigt, man kann es auch ggf. weglassen.
|
Vermeidet aber probleme und das programm benötigt die rechte 
Windows Benutzerkontensteuerung verhindert das programme die kein zertifikat haben trotz admin benutzer als administartor starten.
|
|
|
10/25/2013, 06:21
|
#8
|
elite*gold: 0
Join Date: Sep 2012
Posts: 40
Received Thanks: 25
|
yy type float.
not work
|
|
|
10/25/2013, 18:17
|
#9
|
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
|
Quote:
Originally Posted by alpines
#RequireAdmin wird nicht immer benötigt, man kann es auch ggf. weglassen.
|
Wenn man davon ausgehen würde, dass jeder die Benutzerkontensteuerung deaktiviert hat, dann würdest du richtig liegen. Das ist aber nicht der Fall. Wer mit dem Speicher von fremden Anwendungen arbeitet braucht Adminrechte. Indem man "#RequireAdmin" nicht hinzufügt macht man eher einen Fehler.
|
|
|
10/25/2013, 18:34
|
#10
|
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
|
Da kommt es halt auf die Konfiguration an, natürlich ist es besser es immer drinne zu haben aber bei Debugzwecken würde ich es rausnehmen, da es überflüssig ist.
|
|
|
10/25/2013, 19:05
|
#11
|
elite*gold: 0
Join Date: Sep 2012
Posts: 40
Received Thanks: 25
|
my code:
Code:
#RequireAdmin
#include <Pointer.au3>
HotKeySet("{F1}", "_exit")
func _exit()
Exit
EndFunc
while 1
Local $sModule = "League of Legends.exe", $pBase = 0x2A42A00
$hMemory = _MemoryOpen(ProcessExists($sModule))
$dwValue = _MemoryRead($pBase, $hMemory, "dword")
_MemoryClose($hMemory)
ToolTip("Cam info:" & " " & $dwValue , 0, 0)
wend
|
|
|
10/25/2013, 19:16
|
#12
|
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
|
That's kinda dumb. You open the memory only once and close it once, so put _MemoryClose inside _exit and _MemoryOpen in front of the while 1.
|
|
|
10/25/2013, 20:00
|
#13
|
elite*gold: 0
Join Date: Sep 2012
Posts: 40
Received Thanks: 25
|
still does not work
Code:
RequireAdmin
#include <Pointer.au3>
HotKeySet("{F1}", "_exit")
func _exit()
_MemoryClose($hMemory)
Exit
EndFunc
while 1
Local $sModule = "League of Legends.exe", $pBase = 0x2A42A00
$hMemory = _MemoryOpen(ProcessExists($sModule))
$dwValue = _MemoryRead($pBase, $hMemory, "dword")
ToolTip("Cam info:" & " " & $dwValue , 0, 0)
wend
|
|
|
10/26/2013, 01:03
|
#14
|
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
|
Quote:
Originally Posted by alpines
Da kommt es halt auf die Konfiguration an, natürlich ist es besser es immer drinne zu haben aber bei Debugzwecken würde ich es rausnehmen, da es überflüssig ist.
|
Es ist nie überflüssig. Punkt.
Quote:
Originally Posted by alpines
That's kinda dumb. You open the memory only once and close it once, so put _MemoryClose inside _exit and _MemoryOpen in front of the while 1.
|
Nein. Zum einen ist es unnötig, dass bestehende Handles schließt, da das vom System übernommen wird und zum anderen "öffnet" man den Prozess nicht nur einmal. Die einzige zulässige Argumentation wäre die Performance, wobei das sicherlich keiner Anwendung das Genick bricht.
Man sollte das öffnen des Prozesses definitiv in eine While-Schleife packen, wenn man eine vernünftige und anwenderfreundliche Anwendung programmieren möchte. Nur sollte man eben nicht bei jedem Durchlauf den Prozess öffnen und schließen, sondern nur dann, wenn es nötig ist.

This should work:
Code:
#AutoIt3Wrapper_UseX64=n ; 32 Bit application
;~ #AutoIt3Wrapper_UseX64=y ; 64 Bit application
#RequireAdmin
#include <KDMemory.au3>
Dim $processName = "League of Legends.exe", $handles = 0, $address = 0
While True
;~ Sleep()
$processId = ProcessExists($processName)
If $processId == 0 Then
If IsArray($handles) Then
ToolTip("")
_KDMemory_CloseHandles($handles)
$handles = 0
$address = 0
EndIf
ContinueLoop
EndIf
If $handles == 0 Then
$handles = _KDMemory_OpenProcess($processId)
If @error Then
If MsgBox(52, "Error", "Can't open " & $processName & "! @error: " & @error) == 6 Then
ContinueLoop
Else
Exit
EndIf
EndIf
EndIf
If $address == 0 Then
$address = _KDMemory_GetModuleBaseAddress($handles, $processName) + 0x02A42A00
If @error Then
If MsgBox(52, "Error", "Can't get ModuleBaseAddress! @error: " & @error & ", @extended: " & @extended) == 6 Then
$address = 0
ContinueLoop
Else
Exit
EndIf
EndIf
EndIf
$memoryData = _KDMemory_ReadProcessMemory($handles, $address, 'float')
If @error Then
ToolTip("Can't read memory! @error: " & @error & ", @extended: " & @extended, 0, 0)
Else
ToolTip("Address: " & $memoryData[0] & @CRLF & "Value: " & $memoryData[1], 0, 0)
EndIf
WEnd
|
|
|
10/26/2013, 08:57
|
#15
|
elite*gold: 0
Join Date: Sep 2012
Posts: 40
Received Thanks: 25
|
my address = "League of Legends.exe"+2A42A00 - type:float (it work in cheat engine)
|
|
|
All times are GMT +1. The time now is 14:17.
|
|