1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. Stalker

Beiträge von Stalker

  • Edit Control mit eigenem Kontextmenü

    • Stalker
    • 23. März 2015 um 13:49

    Ja klar um das kontextmenu zu benutzen brauche ich ein handle und keine id.
    also wenn ich jetzt mit guictrlgethandle ein handle bestimme von guictrlcreateedit sollte es funktionieren.


    Und das mit wm_size werde ich mir mal anschauen vielleicht gefällt mir das besser.

    Danke

  • Edit Control mit eigenem Kontextmenü

    • Stalker
    • 22. März 2015 um 22:13

    so habe es mal ausprobiert und geht geht nicht mit GuiCtrlCreateEdit, nur mit _GUICtrlEdit_Create
    nur habe ich bei _GUICtrlEdit_Create das sicht dort wenn ich das fenster kleiner mache sich die größe nicht mit ändert

    hier mal ein teil meines script

    Spoiler anzeigen
    [autoit]


    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <ButtonConstants.au3>
    #include <ComboConstants.au3>
    #include <EditConstants.au3>
    #include <StaticConstants.au3>
    #include <ComboConstants.au3>
    #include <File.au3>
    #include <WinAPI.au3>
    #include <GuiEdit.au3>
    #include <ColorConstantS.au3>
    #include <GuiMenu.au3>
    #include <WinAPIConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global Enum $OPEN = 1000, $SAVE, $INFO

    [/autoit] [autoit][/autoit] [autoit]

    Global $hEDIT_WndProc = DllCallbackRegister('EDIT_WndProc', 'lresult', 'hwnd;uint;wparam;lparam')
    Global $pEDIT_WndProc = DllCallbackGetPtr($hEDIT_WndProc)

    [/autoit] [autoit][/autoit] [autoit]

    ;###################################
    ;Bottons okay
    ;###################################
    #Region
    $SchriftGr = IniRead(@ScriptDir&"\Data\config.ini","SETTING","schriftgroesse", "10")
    $ButtonH = IniRead(@ScriptDir&"\Data\config.ini","BUTTON","buttonhohe", "50")
    $ButtonB = IniRead(@ScriptDir&"\Data\Config.ini","BUTTON","buttonbreite", "150")
    #EndRegion

    [/autoit] [autoit][/autoit] [autoit]

    ;###################################
    ;TASKLEISTE okay
    ;###################################
    #Region
    $taskbarkorekt = IniRead(@ScriptDir&"\Data\config.ini","TASKBAR","taskbatkorektur","43")
    $TaskbarHohe = _Taskbar("Hoch")
    $TaskbarBreite = _Taskbar("Breit")
    Func _Taskbar($Art)
    Local $value = Opt("WinTitleMatchMode", 4)
    Local $Pos = WinGetPos("classname=Shell_TrayWnd")
    Opt("WinTitleMatchMode", $value)
    If $Art = "Hoch" Then
    Return $Pos[3]
    ElseIf $Art = "Breit" Then
    Return $Pos[2]
    EndIf
    EndFunc
    #EndRegion

    [/autoit] [autoit][/autoit] [autoit]

    ;###################################
    ;Editor Fenster Größen okay
    ;###################################
    #Region
    $editfensterhohe = @DesktopHeight - $TaskbarHohe - $taskbarkorekt - 25
    $editfensterbreite = @DesktopWidth - $ButtonB - 7
    #EndRegion

    [/autoit] [autoit][/autoit] [autoit]

    ;###################################
    ;FESNTER AUFBAU okay
    ;###################################
    #Region ### START Koda GUI section ### Form=
    $cnc_editor = GUICreate( "Editor" ,640,480,0,0 , BitOR($WS_MAXIMIZE,$WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SYSMENU,$WS_SIZEBOX,$ES_UPPERCASE,$WS_TABSTOP))
    GUISetBkColor(0xE0E0E0)

    [/autoit] [autoit][/autoit] [autoit]

    ;#########################################################
    ;EDITOR FENSTER
    ;#########################################################
    $editor = _GUICtrlEdit_Create($cnc_editor,"",0,0,$editfensterbreite,$editfensterhohe,$ES_AUTOHSCROLL + $ES_AUTOVSCROLL + $ES_UPPERCASE + $ES_WANTRETURN + $ES_MULTILINE + $WS_HSCROLL + $WS_VSCROLL)
    GUICtrlSetFont(-1, $SchriftGr)
    GUICtrlSetResizing($editor,$GUI_DOCKAUTO)
    ;~ $editor = GUICtrlCreateEdit("",0,0,$editfensterbreite,$editfensterhohe,$ES_AUTOHSCROLL + $ES_AUTOVSCROLL + $ES_UPPERCASE + $ES_WANTRETURN + $ES_MULTILINE + $WS_HSCROLL + $WS_VSCROLL)
    Global $pEDIT_PrevWndProc = _WinAPI_SetWindowLong($editor, $GWL_WNDPROC, $pEDIT_WndProc)

    [/autoit] [autoit][/autoit] [autoit]

    $statusbar = GUICtrlCreateLabel("Fertig",0,$editfensterhohe,150,25,$SS_CENTERIMAGE)
    GUICtrlSetFont(-1, 10)
    GUICtrlSetResizing($statusbar,$GUI_DOCKAUTO + $GUI_DOCKBOTTOM )
    $menu_1= GUICtrlCreateMenu ("Datei")
    $menu_item1= GUICtrlCreateMenuItem ("Neu STRG + N", $menu_1,0)
    $menu_item2= GUICtrlCreateMenuItem ("Öffnen STRG + O", $menu_1,1)
    GUICtrlCreateMenuitem("", $menu_1, 2)
    $menu_item3= GUICtrlCreateMenuItem ("Speichern STRG + S", $menu_1,3)
    $menu_item4= GUICtrlCreateMenuItem ("Speichern unter... STRG + S", $menu_1,4)
    GUICtrlCreateMenuitem("", $menu_1, 5)
    $menu_item5= GUICtrlCreateMenuItem ("Beenden ALT + F4", $menu_1,6)
    $menu_2= GUICtrlCreateMenu ("Bearbeiten")
    $menu_item15= GUICtrlCreateMenuItem ("Rückgängig STRG + Z", $menu_2,1)
    GUICtrlCreateMenuitem("", $menu_2, 2)
    $menu_item6= GUICtrlCreateMenuItem ("Ausschneiden STRG + X", $menu_2,3)
    $menu_item7= GUICtrlCreateMenuItem ("Kopieren STRG + C", $menu_2,4)
    $menu_item8= GUICtrlCreateMenuItem ("Einfügen STRG + V", $menu_2,5)
    $menu_item9= GUICtrlCreateMenuItem ("Löschen ENTF", $menu_2,6)
    ;#########################################################
    ;BUTTONS
    ;#########################################################
    $B_Neu_Nummerieren = GUICtrlCreateButton("Neu" & @crlf & "Nummerieren",$editfensterbreite + 5,0,$ButtonB,$ButtonH,$BS_MULTILINE)
    GUICtrlSetFont(-1, 10)
    GUICtrlSetResizing($B_Neu_Nummerieren,$GUI_DOCKAUTO + $GUI_DOCKHEIGHT + $GUI_DOCKTOP )
    $B_Rueckuebersetzen = GUICtrlCreateButton("Rückübersetzen",$editfensterbreite + 5,$ButtonH,$ButtonB,$ButtonH,$BS_MULTILINE)
    GUICtrlSetFont(-1, 10)
    GUICtrlSetResizing($B_Rueckuebersetzen,$GUI_DOCKAUTO + $GUI_DOCKHEIGHT + $GUI_DOCKTOP )
    $B_Bohren = GUICtrlCreateButton("Bohren Reiben Gewinde",$editfensterbreite + 5,$ButtonH+$ButtonH,$ButtonB,$ButtonH,$BS_MULTILINE)
    GUICtrlSetFont(-1, 10)
    GUICtrlSetResizing($B_Bohren,$GUI_DOCKAUTO + $GUI_DOCKHEIGHT + $GUI_DOCKTOP )
    $B_CYCLE800 = GUICtrlCreateButton("Schwenken" & @crlf & "Ebene",$editfensterbreite + 5,$ButtonH+$ButtonH+$ButtonH,$ButtonB,$ButtonH,$BS_MULTILINE)
    GUICtrlSetFont(-1, 10)
    GUICtrlSetResizing($B_CYCLE800,$GUI_DOCKAUTO + $GUI_DOCKHEIGHT + $GUI_DOCKTOP )
    $B_Messen = GUICtrlCreateButton("Messen",$editfensterbreite + 5,$ButtonH+$ButtonH+$ButtonH+$ButtonH,$ButtonB,$ButtonH,$BS_MULTILINE)
    GUICtrlSetFont(-1, 10)
    GUICtrlSetResizing($B_Messen,$GUI_DOCKAUTO + $GUI_DOCKHEIGHT + $GUI_DOCKTOP )
    $B_Kontur = GUICtrlCreateButton("Kontur",$editfensterbreite + 5,$ButtonH+$ButtonH+$ButtonH+$ButtonH+$ButtonH,$ButtonB,$ButtonH,$BS_MULTILINE)
    GUICtrlSetFont(-1, 10)
    GUICtrlSetResizing($B_Kontur,$GUI_DOCKAUTO + $GUI_DOCKHEIGHT + $GUI_DOCKTOP )

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState(@SW_SHOW,$cnc_editor)
    #EndRegion ### END Koda GUI section ###
    AdlibRegister("prufen",0)

    [/autoit] [autoit][/autoit] [autoit]

    Func EDIT_WndProc($hWnd, $iMsg, $wParam, $lParam)
    Switch $iMsg
    Case $WM_CONTEXTMENU
    Return EDIT_WM_CONTEXTMENU($hWnd, $iMsg, $wParam, $lParam)
    Case $WM_COMMAND
    EDIT_WM_COMMAND($hWnd, $iMsg, $wParam, $lParam)
    EndSwitch

    [/autoit] [autoit][/autoit] [autoit]

    Return _WinAPI_CallWindowProc($pEDIT_PrevWndProc, $hWnd, $iMsg, $wParam, $lParam)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func EDIT_WM_CONTEXTMENU($hWnd, $iMsg, $wParam, $lParam)
    Local $hMenu = _GUICtrlMenu_CreatePopup()
    _GUICtrlMenu_InsertMenuItem($hMenu, 0, 'Open', $OPEN)
    _GUICtrlMenu_InsertMenuItem($hMenu, 1, 'Save', $SAVE)
    _GUICtrlMenu_InsertMenuItem($hMenu, 3, '', 0)
    _GUICtrlMenu_InsertMenuItem($hMenu, 3, 'Info', $INFO)
    _GUICtrlMenu_TrackPopupMenu($hMenu, $wParam)
    _GUICtrlMenu_DestroyMenu($hMenu)

    [/autoit] [autoit][/autoit] [autoit]

    Return $GUI_RUNDEFMSG
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func EDIT_WM_COMMAND($hWnd, $iMsg, $wParam, $lParam)
    Switch $wParam
    Case $OPEN
    _WinAPI_ShowMsg('Open')
    Case $SAVE
    _WinAPI_ShowMsg('Save')
    Case $INFO
    _WinAPI_ShowMsg('Info')
    EndSwitch

    [/autoit] [autoit][/autoit] [autoit]

    Return $GUI_RUNDEFMSG
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ;#########################################################
    ;Menu Auswahl okay
    ;#########################################################
    #Region
    while 1
    $get=GUIGetMsg ()
    Select
    Case $get= -3
    $saveor= MsgBox (3, "Speichern?", "Möchten Sie die Änderungen Speichern?")
    If $saveor= 6 then
    Save ()
    exit
    EndIf
    If $saveor= 2 then

    [/autoit] [autoit][/autoit] [autoit]

    EndIf
    If $saveor= 7 Then

    [/autoit] [autoit][/autoit] [autoit]

    exit
    EndIf
    Case $get= $menu_item1
    Neu ()
    Case $get= $menu_item2
    Open ()
    Case $get= $menu_item3
    Save ()
    Case $get= $menu_item4
    Saveas()
    Case $get= $menu_item5
    $saveor= MsgBox (3, "Speichern?", "Möchten Sie die Änderungen Speichern?")
    Exit
    case $get= $menu_item6
    Ausschneiden()
    case $get= $menu_item7
    Kopieren()
    case $get= $menu_item8
    Einfuegen()
    case $get= $menu_item9
    Loeschen()
    case $get= $menu_item15
    Undo()
    EndSelect

    [/autoit] [autoit][/autoit] [autoit]

    WEnd
    #EndRegion

    [/autoit] [autoit][/autoit] [autoit]

    DllCallbackFree($hEDIT_WndProc)

    [/autoit]

    Vielleicht kann mir ja einer beim Gestallten vom Fenster helfen wie das am besten geht das es sich anpasst wenn man es kleiner macht

  • Edit Control mit eigenem Kontextmenü

    • Stalker
    • 22. März 2015 um 11:11

    Hallo zusammen

    frage gibt es die Möglichkeit ein Kontextmenü zu erstellen für ein Edit-control?
    Laut guictrlcreatecontextmenu geht das bei edit und Input nicht, aber vielleicht gibt es ja eine andere Möglichkeit.

    Und wo wir gerade bei edit Controls sind, wo ist der unterschied zwischen einem GUICtrlCreateEdit, _GUICtrlEdit_Create und _GUICtrlRichEdit_Create?

    ich weiß die frage ist vielleicht dumm aber egal.

    Gruß
    Andre

  • Maus DPI abfragen

    • Stalker
    • 8. Oktober 2014 um 15:54

    Ich habe nun ein ähnliches Problem nochmal an einem anderen PC

    Und zwar möchte ich die DPI anzahl von einer Logitech Maus auslesen. Pointer und Offset habe ich schon gefunden.

    mein script sieht dann so aus

    Spoiler anzeigen
    [autoit]


    #include <String.au3>
    #include <Array.au3>
    #include <MemoryPointer.au3>
    Global $PID
    Global $StaticOffset
    Global $openmem

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $PID = ProcessExists("LCore.exe")
    $openmem = _MemoryOpen($PID)
    Local $Offset[1]
    $Offset[0] = 0
    $StaticOffset = Dec("1424508D0")
    $baseADDR = _MemoryGetBaseAddress($PID)
    $finalADDR = "0x" & Hex($baseADDR + $StaticOffset)
    $r = _MemoryRead($finaladdr,$openmem)
    $r = _MemoryRead($r + 0x5d0,$openmem)
    $r = _MemoryRead($r + 0xa0,$openmem)
    $r = _MemoryRead($r + 0x310,$openmem)
    $r = _MemoryRead($r + 0x2700,$openmem)
    $r = _MemoryRead($r + 0x164,$openmem, "dword")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    MsgBox(0," ", $r)

    [/autoit] [autoit][/autoit] [autoit][/autoit]

    ich bekomme aber immer null raus oder das letzte Offset.

    liegt das vielleicht daran das es eine 64bit exe ist von dem Logitech Tool? Und dadurch es eine 8Byte Adresse ist?

  • Maus DPI abfragen

    • Stalker
    • 3. Oktober 2014 um 18:01

    so mit langem suchen im Internet nun endlich geschafft

    die passende UDP

    Spoiler anzeigen
    [autoit]


    #include-once
    #region _Memory
    ;=================================================================================================
    ; AutoIt Version: 3.1.127 (beta)
    ; Language: English
    ; Platform: All Windows
    ; Author: Nomad
    ; Requirements: These functions will only work with beta.
    ;=================================================================================================
    ; Credits: wOuter - These functions are based on his original _Mem() functions. But they are
    ; easier to comprehend and more reliable. These functions are in no way a direct copy
    ; of his functions. His functions only provided a foundation from which these evolved.
    ;=================================================================================================
    ;
    ; Functions:
    ;
    ;=================================================================================================
    ; Function: _MemoryOpen($iv_Pid(, $iv_DesiredAccess(, $iv_InheritHandle)))
    ; Description: Opens a process and enables all possible access rights to the process. The
    ; Process ID of the process is used to specify which process to open. You must
    ; call this function before calling _MemoryClose(), _MemoryRead(), or _MemoryWrite().
    ; Parameter(s): $iv_Pid - The Process ID of the program you want to open.
    ; $iv_DesiredAccess - (optional) Set to 0x1F0FFF by default, which enables all
    ; possible access rights to the process specified by the
    ; Process ID.
    ; $if_InheritHandle - (optional) If this value is TRUE, all processes created by
    ; this process will inherit the access handle. Set to TRUE
    ; (1) by default. Set to 0 if you want it to be FALSE.
    ; Requirement(s): A valid process ID.
    ; Return Value(s): On Success - Returns an array containing the Dll handle and an open handle to
    ; the specified process.
    ; On Failure - Returns 0
    ; @Error - 0 = No error.
    ; 1 = Invalid $iv_Pid.
    ; 2 = Failed to open Kernel32.dll.
    ; 3 = Failed to open the specified process.
    ; Author(s): Nomad
    ; Note(s):
    ;=================================================================================================
    Func _MemoryOpen($iv_Pid, $iv_DesiredAccess = 0x1F0FFF, $if_InheritHandle = 1)

    [/autoit] [autoit][/autoit] [autoit]

    If Not ProcessExists($iv_Pid) Then
    SetError(1)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Local $ah_Handle[2] = [DllOpen('kernel32.dll')]

    [/autoit] [autoit][/autoit] [autoit]

    If @Error Then
    SetError(2)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Local $av_OpenProcess = DllCall($ah_Handle[0], 'int', 'OpenProcess', 'int', $iv_DesiredAccess, 'int', $if_InheritHandle, 'int', $iv_Pid)

    [/autoit] [autoit][/autoit] [autoit]

    If @Error Then
    DllClose($ah_Handle[0])
    SetError(3)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $ah_Handle[1] = $av_OpenProcess[0]

    [/autoit] [autoit][/autoit] [autoit]

    Return $ah_Handle

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ;=================================================================================================
    ; Function: _MemoryRead($iv_Address, $ah_Handle(, $sv_Type))
    ; Description: Reads the value located in the memory address specified.
    ; Parameter(s): $iv_Address - The memory address you want to read from. It must be in hex
    ; format (0x00000000).
    ; $ah_Handle - An array containing the Dll handle and the handle of the open
    ; process as returned by _MemoryOpen().
    ; $sv_Type - (optional) The "Type" of value you intend to read. This is set to
    ; 'dword'(32bit(4byte) signed integer) by default. See the help file
    ; for DllStructCreate for all types.
    ; An example: If you want to read a word that is 15 characters in
    ; length, you would use 'char[16]'.
    ; Requirement(s): The $ah_Handle returned from _MemoryOpen.
    ; Return Value(s): On Success - Returns the value located at the specified address.
    ; On Failure - Returns 0
    ; @Error - 0 = No error.
    ; 1 = Invalid $ah_Handle.
    ; 2 = $sv_Type was not a string.
    ; 3 = $sv_Type is an unknown data type.
    ; 4 = Failed to allocate the memory needed for the DllStructure.
    ; 5 = Error allocating memory for $sv_Type.
    ; 6 = Failed to read from the specified process.
    ; Author(s): Nomad
    ; Note(s): Values returned are in Decimal format, unless specified as a 'char' type, then
    ; they are returned in ASCII format. Also note that size ('char[size]') for all
    ; 'char' types should be 1 greater than the actual size.
    ;=================================================================================================
    Func _MemoryRead($iv_Address, $ah_Handle, $sv_Type = 'dword')

    [/autoit] [autoit][/autoit] [autoit]

    If Not IsArray($ah_Handle) Then
    SetError(1)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Local $v_Buffer = DllStructCreate($sv_Type)

    [/autoit] [autoit][/autoit] [autoit]

    If @Error Then
    SetError(@Error + 1)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')

    [/autoit] [autoit][/autoit] [autoit]

    If Not @Error Then
    Local $v_Value = DllStructGetData($v_Buffer, 1)
    Return $v_Value
    Else
    SetError(6)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ;=================================================================================================
    ; Function: _MemoryWrite($iv_Address, $ah_Handle, $v_Data(, $sv_Type))
    ; Description: Writes data to the specified memory address.
    ; Parameter(s): $iv_Address - The memory address you want to write to. It must be in hex
    ; format (0x00000000).
    ; $ah_Handle - An array containing the Dll handle and the handle of the open
    ; process as returned by _MemoryOpen().
    ; $v_Data - The data to be written.
    ; $sv_Type - (optional) The "Type" of value you intend to write. This is set to
    ; 'dword'(32bit(4byte) signed integer) by default. See the help file
    ; for DllStructCreate for all types.
    ; An example: If you want to write a word that is 15 characters in
    ; length, you would use 'char[16]'.
    ; Requirement(s): The $ah_Handle returned from _MemoryOpen.
    ; Return Value(s): On Success - Returns 1
    ; On Failure - Returns 0
    ; @Error - 0 = No error.
    ; 1 = Invalid $ah_Handle.
    ; 2 = $sv_Type was not a string.
    ; 3 = $sv_Type is an unknown data type.
    ; 4 = Failed to allocate the memory needed for the DllStructure.
    ; 5 = Error allocating memory for $sv_Type.
    ; 6 = $v_Data is not in the proper format to be used with the "Type"
    ; selected for $sv_Type, or it is out of range.
    ; 7 = Failed to write to the specified process.
    ; Author(s): Nomad
    ; Note(s): Values sent must be in Decimal format, unless specified as a 'char' type, then
    ; they must be in ASCII format. Also note that size ('char[size]') for all
    ; 'char' types should be 1 greater than the actual size.
    ;=================================================================================================
    Func _MemoryWrite($iv_Address, $ah_Handle, $v_Data, $sv_Type = 'dword')

    [/autoit] [autoit][/autoit] [autoit]

    If Not IsArray($ah_Handle) Then
    SetError(1)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Local $v_Buffer = DllStructCreate($sv_Type)

    [/autoit] [autoit][/autoit] [autoit]

    If @Error Then
    SetError(@Error + 1)
    Return 0
    Else
    DllStructSetData($v_Buffer, 1, $v_Data)
    If @Error Then
    SetError(6)
    Return 0
    EndIf
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    DllCall($ah_Handle[0], 'int', 'WriteProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')

    [/autoit] [autoit][/autoit] [autoit]

    If Not @Error Then
    Return 1
    Else
    SetError(7)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ;=================================================================================================
    ; Function: _MemoryClose($ah_Handle)
    ; Description: Closes the process handle opened by using _MemoryOpen().
    ; Parameter(s): $ah_Handle - An array containing the Dll handle and the handle of the open
    ; process as returned by _MemoryOpen().
    ; Requirement(s): The $ah_Handle returned from _MemoryOpen.
    ; Return Value(s): On Success - Returns 1
    ; On Failure - Returns 0
    ; @Error - 0 = No error.
    ; 1 = Invalid $ah_Handle.
    ; 2 = Unable to close the process handle.
    ; Author(s): Nomad
    ; Note(s):
    ;=================================================================================================
    Func _MemoryClose($ah_Handle)

    [/autoit] [autoit][/autoit] [autoit]

    If Not IsArray($ah_Handle) Then
    SetError(1)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    DllCall($ah_Handle[0], 'int', 'CloseHandle', 'int', $ah_Handle[1])
    If Not @Error Then
    DllClose($ah_Handle[0])
    Return 1
    Else
    DllClose($ah_Handle[0])
    SetError(2)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ;=================================================================================================
    ; Function: _MemoryPointerRead ($iv_Address, $ah_Handle, $av_Offset(, $sv_Type))
    ; Description: Reads a chain of pointers and returns an array containing the destination
    ; address and the data at the address.
    ; Parameter(s): $iv_Address - The static memory address you want to start at. It must be in
    ; hex format (0x00000000).
    ; $ah_Handle - An array containing the Dll handle and the handle of the open
    ; process as returned by _MemoryOpen().
    ; $av_Offset - An array of offsets for the pointers. Each pointer must have an
    ; offset. If there is no offset for a pointer, enter 0 for that
    ; array dimension. (Offsets must be in decimal format, NOT hex!)
    ; $sv_Type - (optional) The "Type" of data you intend to read at the destination
    ; address. This is set to 'dword'(32bit(4byte) signed integer) by
    ; default. See the help file for DllStructCreate for all types.
    ; Requirement(s): The $ah_Handle returned from _MemoryOpen.
    ; Return Value(s): On Success - Returns an array containing the destination address and the value
    ; located at the address.
    ; On Failure - Returns 0
    ; @Error - 0 = No error.
    ; 1 = $av_Offset is not an array.
    ; 2 = Invalid $ah_Handle.
    ; 3 = $sv_Type is not a string.
    ; 4 = $sv_Type is an unknown data type.
    ; 5 = Failed to allocate the memory needed for the DllStructure.
    ; 6 = Error allocating memory for $sv_Type.
    ; 7 = Failed to read from the specified process.
    ; Author(s): Nomad
    ; Note(s): Values returned are in Decimal format, unless a 'char' type is selected.
    ; Set $av_Offset like this:
    ; $av_Offset[0] = NULL (not used)
    ; $av_Offset[1] = Offset for pointer 1 (all offsets must be in Decimal)
    ; $av_Offset[2] = Offset for pointer 2
    ; etc...
    ; (The number of array dimensions determines the number of pointers)
    ;=================================================================================================
    Func _MemoryPointerRead ($iv_Address, $ah_Handle, $av_Offset, $sv_Type = 'dword')

    [/autoit] [autoit][/autoit] [autoit]

    If IsArray($av_Offset) Then
    If IsArray($ah_Handle) Then
    Local $iv_PointerCount = UBound($av_Offset) - 1
    Else
    SetError(2)
    Return 0
    EndIf
    Else
    SetError(1)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Local $iv_Data[2], $i
    Local $v_Buffer = DllStructCreate('dword')

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 0 to $iv_PointerCount

    [/autoit] [autoit][/autoit] [autoit]

    If $i = $iv_PointerCount Then
    $v_Buffer = DllStructCreate($sv_Type)
    If @Error Then
    SetError(@Error + 2)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $iv_Address = '0x' & hex($iv_Data[1] + $av_Offset[$i])
    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
    If @Error Then
    SetError(7)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $iv_Data[1] = DllStructGetData($v_Buffer, 1)

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $i = 0 Then
    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
    If @Error Then
    SetError(7)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $iv_Data[1] = DllStructGetData($v_Buffer, 1)

    [/autoit] [autoit][/autoit] [autoit]

    Else
    $iv_Address = '0x' & hex($iv_Data[1] + $av_Offset[$i])
    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
    If @Error Then
    SetError(7)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $iv_Data[1] = DllStructGetData($v_Buffer, 1)

    [/autoit] [autoit][/autoit] [autoit]

    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Next

    [/autoit] [autoit][/autoit] [autoit]

    $iv_Data[0] = $iv_Address

    [/autoit] [autoit][/autoit] [autoit]

    Return $iv_Data

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ;=================================================================================================
    ; Function: _MemoryPointerWrite ($iv_Address, $ah_Handle, $av_Offset, $v_Data(, $sv_Type))
    ; Description: Reads a chain of pointers and writes the data to the destination address.
    ; Parameter(s): $iv_Address - The static memory address you want to start at. It must be in
    ; hex format (0x00000000).
    ; $ah_Handle - An array containing the Dll handle and the handle of the open
    ; process as returned by _MemoryOpen().
    ; $av_Offset - An array of offsets for the pointers. Each pointer must have an
    ; offset. If there is no offset for a pointer, enter 0 for that
    ; array dimension.
    ; $v_Data - The data to be written.
    ; $sv_Type - (optional) The "Type" of data you intend to write at the destination
    ; address. This is set to 'dword'(32bit(4byte) signed integer) by
    ; default. See the help file for DllStructCreate for all types.
    ; Requirement(s): The $ah_Handle returned from _MemoryOpen.
    ; Return Value(s): On Success - Returns the destination address.
    ; On Failure - Returns 0.
    ; @Error - 0 = No error.
    ; 1 = $av_Offset is not an array.
    ; 2 = Invalid $ah_Handle.
    ; 3 = Failed to read from the specified process.
    ; 4 = $sv_Type is not a string.
    ; 5 = $sv_Type is an unknown data type.
    ; 6 = Failed to allocate the memory needed for the DllStructure.
    ; 7 = Error allocating memory for $sv_Type.
    ; 8 = $v_Data is not in the proper format to be used with the
    ; "Type" selected for $sv_Type, or it is out of range.
    ; 9 = Failed to write to the specified process.
    ; Author(s): Nomad
    ; Note(s): Data written is in Decimal format, unless a 'char' type is selected.
    ; Set $av_Offset like this:
    ; $av_Offset[0] = NULL (not used, doesn't matter what's entered)
    ; $av_Offset[1] = Offset for pointer 1 (all offsets must be in Decimal)
    ; $av_Offset[2] = Offset for pointer 2
    ; etc...
    ; (The number of array dimensions determines the number of pointers)
    ;=================================================================================================
    Func _MemoryPointerWrite ($iv_Address, $ah_Handle, $av_Offset, $v_Data, $sv_Type = 'dword')

    [/autoit] [autoit][/autoit] [autoit]

    If IsArray($av_Offset) Then
    If IsArray($ah_Handle) Then
    Local $iv_PointerCount = UBound($av_Offset) - 1
    Else
    SetError(2)
    Return 0
    EndIf
    Else
    SetError(1)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Local $iv_StructData, $i
    Local $v_Buffer = DllStructCreate('dword')

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 0 to $iv_PointerCount
    If $i = $iv_PointerCount Then
    $v_Buffer = DllStructCreate($sv_Type)
    If @Error Then
    SetError(@Error + 3)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    DllStructSetData($v_Buffer, 1, $v_Data)
    If @Error Then
    SetError(8)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $iv_Address = '0x' & hex($iv_StructData + $av_Offset[$i])
    DllCall($ah_Handle[0], 'int', 'WriteProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
    If @Error Then
    SetError(9)
    Return 0
    Else
    Return $iv_Address
    EndIf
    ElseIf $i = 0 Then
    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
    If @Error Then
    SetError(3)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $iv_StructData = DllStructGetData($v_Buffer, 1)

    [/autoit] [autoit][/autoit] [autoit]

    Else
    $iv_Address = '0x' & hex($iv_StructData + $av_Offset[$i])
    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
    If @Error Then
    SetError(3)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $iv_StructData = DllStructGetData($v_Buffer, 1)

    [/autoit] [autoit][/autoit] [autoit]

    EndIf
    Next

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;==================================================================================
    ; Function: SetPrivilege( $privilege, $bEnable )
    ; Description: Enables (or disables) the $privilege on the current process
    ; (Probably) requires administrator privileges to run
    ;
    ; Author(s): Larry (from autoitscript.com's Forum)
    ; Notes(s):
    ; http://www.autoitscript.com/forum/index.ph…ndpost&p=223999
    ;==================================================================================
    #comments-start
    Func SetPrivilege( $privilege, $bEnable )

    [/autoit] [autoit][/autoit] [autoit]

    Const $TOKEN_ADJUST_PRIVILEGESS = 0x0020
    Const $TOKEN_QUERYS = 0x0008
    Const $SE_PRIVILEGE_ENABLEDS = 0x0002
    Local $hToken, $SP_auxret, $SP_ret, $hCurrProcess, $nTokens, $nTokenIndex, $priv
    $nTokens = 1
    $LUID = DLLStructCreate("dword;int")
    If IsArray($privilege) Then $nTokens = UBound($privilege)
    $TOKEN_PRIVILEGES = DLLStructCreate("dword;dword[" & (3 * $nTokens) & "]")
    $NEWTOKEN_PRIVILEGES = DLLStructCreate("dword;dword[" & (3 * $nTokens) & "]")
    $hCurrProcess = DLLCall("kernel32.dll","hwnd","GetCurrentProcess")
    $SP_auxret = DLLCall("advapi32.dll","int","OpenProcessToken","hwnd",$hCurrProcess[0], _
    "int",BitOR($TOKEN_ADJUST_PRIVILEGESS,$TOKEN_QUERYS),"int_ptr",0)
    If $SP_auxret[0] Then
    $hToken = $SP_auxret[3]
    DLLStructSetData($TOKEN_PRIVILEGES,1,1)
    $nTokenIndex = 1
    While $nTokenIndex <= $nTokens
    If IsArray($privilege) Then
    $priv = $privilege[$nTokenIndex-1]
    Else
    $priv = $privilege
    EndIf
    $ret = DLLCall("advapi32.dll","int","LookupPrivilegeValue","str","","str",$priv, _
    "ptr",DLLStructGetPtr($LUID))
    If $ret[0] Then
    If $bEnable Then
    DLLStructSetData($TOKEN_PRIVILEGES,2,$SE_PRIVILEGE_ENABLEDS,(3 * $nTokenIndex))
    Else
    DLLStructSetData($TOKEN_PRIVILEGES,2,0,(3 * $nTokenIndex))
    EndIf
    DLLStructSetData($TOKEN_PRIVILEGES,2,DllStructGetData($LUID,1),(3 * ($nTokenIndex-1)) + 1)
    DLLStructSetData($TOKEN_PRIVILEGES,2,DllStructGetData($LUID,2),(3 * ($nTokenIndex-1)) + 2)
    DLLStructSetData($LUID,1,0)
    DLLStructSetData($LUID,2,0)
    EndIf
    $nTokenIndex += 1
    WEnd
    $ret = DLLCall("advapi32.dll","int","AdjustTokenPrivileges","hwnd",$hToken,"int",0, _
    "ptr",DllStructGetPtr($TOKEN_PRIVILEGES),"int",DllStructGetSize($NEWTOKEN_PRIVILEGES), _
    "ptr",DllStructGetPtr($NEWTOKEN_PRIVILEGES),"int_ptr",0)
    $f = DLLCall("kernel32.dll","int","GetLastError")
    EndIf
    $NEWTOKEN_PRIVILEGES=0
    $TOKEN_PRIVILEGES=0
    $LUID=0
    If $SP_auxret[0] = 0 Then Return 0
    $SP_auxret = DLLCall("kernel32.dll","int","CloseHandle","hwnd",$hToken)
    If Not $ret[0] And Not $SP_auxret[0] Then Return 0
    return $ret[0]
    EndFunc ;==>SetPrivilege
    #comments-end
    ;===================================================================================================

    [/autoit] [autoit][/autoit] [autoit]

    ; Function........: _MemoryGetBaseAddress($ah_Handle, $iHD)
    ;
    ; Description.....: Reads the 'Allocation Base' from the open process.
    ;
    ; Parameter(s)....: $ah_Handle - An array containing the Dll handle and the handle of the open
    ; process as returned by _MemoryOpen().
    ; $iHD - Return type:
    ; |0 = Hex (Default)
    ; |1 = Dec
    ;
    ; Requirement(s)..: A valid process ID.
    ;
    ; Return Value(s).: On Success - Returns the 'allocation Base' address and sets @Error to 0.
    ; On Failure - Returns 0 and sets @Error to:
    ; |1 = Invalid $ah_Handle.
    ; |2 = Failed to find correct allocation address.
    ; |3 = Failed to read from the specified process.
    ;
    ; Author(s).......: Nomad. Szhlopp.
    ; URL.............: http://www.autoitscript.com/forum/index.php?showtopic=78834
    ; Note(s).........: Go to http://Www.CheatEngine.org for the latest version of CheatEngine.
    ;===================================================================================================

    [/autoit] [autoit][/autoit] [autoit]

    Func _MemoryGetBaseAddress($ah_Handle, $iHexDec = 0)

    [/autoit] [autoit][/autoit] [autoit]

    Local $iv_Address = 0x00100000
    Local $v_Buffer = DllStructCreate('dword;dword;dword;dword;dword;dword;dword')
    Local $vData
    Local $vType

    [/autoit] [autoit][/autoit] [autoit]

    If Not IsArray($ah_Handle) Then
    SetError(1)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    DllCall($ah_Handle[0], 'int', 'VirtualQueryEx', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer))

    [/autoit] [autoit][/autoit] [autoit]

    If Not @Error Then

    [/autoit] [autoit][/autoit] [autoit]

    $vData = Hex(DllStructGetData($v_Buffer, 2))
    $vType = Hex(DllStructGetData($v_Buffer, 3))

    [/autoit] [autoit][/autoit] [autoit]

    While $vType <> "00000080"
    DllCall($ah_Handle[0], 'int', 'VirtualQueryEx', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer))
    $vData = Hex(DllStructGetData($v_Buffer, 2))
    $vType = Hex(DllStructGetData($v_Buffer, 3))
    If Hex($iv_Address) = "01000000" Then ExitLoop
    $iv_Address += 65536

    [/autoit] [autoit][/autoit] [autoit]

    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    If $vType = "00000080" Then
    SetError(0)
    If $iHexDec = 1 Then
    Return Dec($vData)
    Else
    Return $vData
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Else
    SetError(2)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Else
    SetError(3)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc ;==>_MemoryGetBaseAddress

    [/autoit] [autoit][/autoit] [autoit]

    Func _MemoryModuleGetBaseAddress($iPID, $sModule)
    If Not ProcessExists($iPID) Then Return SetError(1, 0, 0)

    [/autoit] [autoit][/autoit] [autoit]

    If Not IsString($sModule) Then Return SetError(2, 0, 0)

    [/autoit] [autoit][/autoit] [autoit]

    Local $PSAPI = DllOpen("psapi.dll")

    [/autoit] [autoit][/autoit] [autoit]

    ;Get Process Handle
    Local $hProcess
    Local $PERMISSION = BitOR(0x0002, 0x0400, 0x0008, 0x0010, 0x0020) ; CREATE_THREAD, QUERY_INFORMATION, VM_OPERATION, VM_READ, VM_WRITE

    [/autoit] [autoit][/autoit] [autoit]

    If $iPID > 0 Then
    Local $hProcess = DllCall("kernel32.dll", "ptr", "OpenProcess", "dword", $PERMISSION, "int", 0, "dword", $iPID)
    If $hProcess[0] Then
    $hProcess = $hProcess[0]
    EndIf
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    ;EnumProcessModules
    Local $Modules = DllStructCreate("ptr[1024]")
    Local $aCall = DllCall($PSAPI, "int", "EnumProcessModules", "ptr", $hProcess, "ptr", DllStructGetPtr($Modules), "dword", DllStructGetSize($Modules), "dword*", 0)
    If $aCall[4] > 0 Then
    Local $iModnum = $aCall[4] / 4
    Local $aTemp
    For $i = 1 To $iModnum
    $aTemp = DllCall($PSAPI, "dword", "GetModuleBaseNameW", "ptr", $hProcess, "ptr", Ptr(DllStructGetData($Modules, 1, $i)), "wstr", "", "dword", 260)
    If $aTemp[3] = $sModule Then
    DllClose($PSAPI)
    Return Ptr(DllStructGetData($Modules, 1, $i))
    EndIf
    Next
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    DllClose($PSAPI)
    Return SetError(-1, 0, 0)

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    #endregion

    [/autoit] [autoit][/autoit] [autoit]

    Func _MemoryScanEx($ah_Handle, $pattern, $mask, $after = False, $iv_addrStart = 0x00400000, $iv_addrEnd = 0x00FFFFFF, $step = 51200)
    If Not IsArray($ah_Handle) Then
    SetError(1)
    Return -1
    EndIf
    $pattern = StringRegExpReplace($pattern, "[^0123456789ABCDEFabcdef.]", "")
    If StringLen($pattern) = 0 Then
    SetError(2)
    Return -2
    EndIf
    If StringLen($pattern) / 2 <> StringLen($mask) Then
    SetError(4)
    Return -4
    EndIf
    Local $formatedpattern = ""
    Local $BufferPattern
    Local $BufferMask
    For $i = 0 To StringLen($mask) - 1
    $BufferPattern = StringLeft($pattern, 2)
    $pattern = StringRight($pattern, StringLen($pattern) - 2)
    $BufferMask = StringLeft($mask, 1)
    $mask = StringRight($mask, StringLen($mask) - 1)
    If $BufferMask = "?" Then $BufferPattern = ".."
    $formatedpattern = $formatedpattern & $BufferPattern
    Next
    $pattern = $formatedpattern
    For $addr = $iv_addrStart To $iv_addrEnd Step $step - (StringLen($pattern) / 2)
    StringRegExp(_MemoryRead($addr, $ah_Handle, "byte[" & $step & "]"), $pattern, 1, 2)
    If Not @error Then
    If $after Then
    Return StringFormat("0x%.8X", $addr + ((@extended - 2) / 2))
    Else
    Return StringFormat("0x%.8X", $addr + ((@extended - StringLen($pattern) - 2) / 2))
    EndIf
    EndIf
    Next
    SetError(3)
    Return -3
    EndFunc ;==>_MemoryScanEx

    [/autoit]

    und da sich die Adresse hinter einer DLL versteckt war das ganze etwas schwieriger
    hier mein Script

    Spoiler anzeigen
    [autoit]


    #include <MemoryPointer.au3>
    Global $PID
    Global $sModule = "RazerConfigNative.dll"
    Global $StaticOffset
    Global $openmem

    [/autoit] [autoit][/autoit] [autoit]

    $PID = ProcessExists("RzSynapse.exe")

    [/autoit] [autoit][/autoit] [autoit]

    If $PID = 0 Then
    MsgBox(4096,"Error","Razer Maus Tool läuft nicht!",3)
    exit
    EndIf
    $openmem = _MemoryOpen($PID)

    [/autoit] [autoit][/autoit] [autoit]

    If @error Then
    Return
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Local $Offset[1]
    $Offset[0] = 0

    [/autoit] [autoit][/autoit] [autoit]

    $StaticOffset = Dec("0049FA60")

    [/autoit] [autoit][/autoit] [autoit]

    $baseADDR = _MemoryModuleGetBaseAddress($PID, $sModule)
    $finalADDR = "0x" & Hex($baseADDR + $StaticOffset)

    [/autoit] [autoit][/autoit] [autoit]

    $r = _MemoryRead($finaladdr,$openmem)
    $r = _MemoryRead($r + 0x190,$openmem)
    $r = _MemoryRead($r + 0x0,$openmem)
    $r = _MemoryRead($r + 0xb0,$openmem)
    $r = _MemoryRead($r + 0x470,$openmem)
    $r = _MemoryRead($r + 0x1FC,$openmem, "dword")

    [/autoit] [autoit][/autoit] [autoit]

    MsgBox(0,"Aktuelle DPI ", "Die DPI ist: " & $r)

    [/autoit]

    jetzt muss ich das nur noch in das script für das G510s lcd Display einpflegen und dann sollte es klappen

    so hier das fertige script

    Spoiler anzeigen
    [autoit]


    #include <String.au3>
    #include <AdvanceLCD.au3>
    #include <Array.au3>
    #include <MemoryPointer.au3>
    Global $PID
    Global $sModule = "RazerConfigNative.dll"
    Global $StaticOffset
    Global $openmem
    LcdInitialize()
    $hApplet = LcdCreateApplet("DPI-Anzeige", $LCD_DEVICE_MONO, 0, 1)
    LcdWaitActivation($hApplet)
    LcdSetPriority($hApplet, $LCD_PRIORITY_NORMAL, 1)
    LcdClear($hApplet, 0x000000)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    func _ausgabe()
    LcdClear($hApplet, 0x000000)
    $hFont1 = LcdLoadFont("Arial", 12, $LCD_FONT_DEFAULT, "Arial.ttf")
    LcdSetFont($hApplet, $hFont1)
    LcdSetPriority($hApplet, $LCD_PRIORITY_NORMAL, 1)
    LcdDrawText($hApplet, "Aktuelle DPI", 50,0)
    $hFont = LcdLoadFont("6pxbus", 20, $LCD_FONT_DEFAULT, "6pxbus.ttf")
    LcdSetFont($hApplet, $hFont)
    LcdDrawText($hApplet, $r, 50,10)
    LcdUpdate($hApplet, 0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    while 1
    $PID = ProcessExists("RzSynapse.exe")
    $openmem = _MemoryOpen($PID)
    Local $Offset[1]
    $Offset[0] = 0
    $StaticOffset = Dec("0049FA60")
    $baseADDR = _MemoryModuleGetBaseAddress($PID, $sModule)
    $finalADDR = "0x" & Hex($baseADDR + $StaticOffset)
    $r = _MemoryRead($finaladdr,$openmem)
    $r = _MemoryRead($r + 0x190,$openmem)
    $r = _MemoryRead($r + 0x0,$openmem)
    $r = _MemoryRead($r + 0xb0,$openmem)
    $r = _MemoryRead($r + 0x470,$openmem)
    $r = _MemoryRead($r + 0x1FC,$openmem, "dword")
    $txtdpi = filereadline("dpi.txt", 1)
    if $r <> $txtdpi Then
    FileDelete("dpi.txt")
    FileWrite("dpi.txt",$r)
    _ausgabe()
    endif

    [/autoit] [autoit][/autoit] [autoit]

    wend

    [/autoit] [autoit][/autoit] [autoit][/autoit]


    habe es nochmal überarbeitet da die Logitech Software damit nicht so klar kam

    Hier noch ein Video wie das ganze dann Aussicht

    DPI Anzeige von einer Razer Ouroboros auf G510s LCD Display

  • Maus DPI abfragen

    • Stalker
    • 3. Oktober 2014 um 14:20
    Spoiler anzeigen


    #include <Pointer.au3>

    $pid = ProcessExists("RzSynapse.exe")
    if $pid = 0 then Exit

    setPrivilege("SeDebugPrivilege",1)

    $ah_Handle = _MemoryOpen($pid)

    $iv_Address = 0x69c40000 ; Adresse hinter der dll

    DIM $av_offset[7]
    $av_offset[0] = 0x0
    $av_offset[1] = 0x0049FA60
    $av_offset[2] = 0x190
    $av_offset[3] = 0x0
    $av_offset[4] = 0xB0
    $av_offset[5] = 0x470
    $av_offset[6] = 0x1FC

    $result = _MemoryPointerRead ($iv_Address, $ah_Handle, $av_Offset)

    $basep = $result[0]


    MsgBox(0," ", $basep & @CRLF & $result[1])

    habe es so versucht hat auch beim erstemal super geklappt nur nach dem ich den rechner neu gestartet habe zeigt mir das Programm nun eine ganz andere Adresse an die er errechnet
    aber die gespeicherte pointer Offset Einstellung in Cheat Engine geht noch

  • Maus DPI abfragen

    • Stalker
    • 3. Oktober 2014 um 08:43

    Naja das Problem ist noch nicht gelöst die speicheradresse ändert sich nicht nur um 2 stellen sondern um, ich würde schon sagen um, alle stellen.

    Also bleibt mir wohl nichts anderes übrig als nach dem basepointer zu suchen oder ich schaffe es die dpi Einstellung aus der dll des Tools zu lesen


    So ich habe mit hilfe von Cheat Engine folgendes gefunden

    "RazerConfigNative.dll"+0049FA60 -> 0D418118

    0D418118 + 190 -> 0D21D080

    0D21D080 +0 -> 0BBC8360

    0BBC8360 + B0 -> 0BB142E8

    0BB142E8 + 470 -> 0BB15FD8

    0BB15FD8 + 1FC = 0BB161D4

    Diesen Pointer (Adressen reinfolge/ Rechnung) habe ich mir in Cheat Engine abgespeichert und egal wie oft ich den PC neu Starte oder auch das Maus Tool ich kann über diese Adresse mit den rechungen immer meine DPI auslesen

    Nur wie bekomme ich das jetzt in deine Programm vom Post rein?

  • Maus DPI abfragen

    • Stalker
    • 2. Oktober 2014 um 20:05

    okey ich habe mir schon mal ein paar Sachen im Internet angeschaut wie man Pointer/basepointer und Offsets findet komme da aber nicht weiter


    wir können das auch über Teamviewer machen

  • Maus DPI abfragen

    • Stalker
    • 2. Oktober 2014 um 16:21

    so ich habe insgesamt 6 Adressen, ich muss aber nach dem Pointer und Offset suchen das die Adressen sich jedesmal ändern wenn die Software neu gestartet wird.

    wie sucht man nach pointern?

  • Maus DPI abfragen

    • Stalker
    • 2. Oktober 2014 um 11:13

    okay es schein nicht die richtige Adresse zu sein.
    Kannst du mir mal kurz erklären wie ich das Tool MemoryHacking benutze.

  • Maus DPI abfragen

    • Stalker
    • 1. Oktober 2014 um 21:21

    Mit der Au3Info habe ich es auch schon versucht das aber der gibt nichts wieder

    Das mit der Mausgeschwindigkeit in der Windows-Einstellung habe ich schon oft gelesen aber das ist ja nicht wirklich die DPI Zahl der Maus.
    Das die DPI über die Hardware und Maus intern passiert habe ich mir schon gedacht und dadurch fast unmöglich ist dort dran zu kommen.

    Aber der Tipp mit dem Memory-Searcher Tool ist gut und werde ich mal ausprobieren, Danke schon mal

    Die Maus ist eine Razer mit dem Tool Razer Synapse 2.0


    So habe mir jetzt das von der gesagt Tool runtergeladen, aber damit komme ich nicht klar, wie funktioniert es? wie kann ich da nach etwas suchen?

    Okay habe jetzt mit Cheatengine (ist vielleicht komisch macht aber das selbe) die speicheradresse gefunden.

    Eine Erklärung wie ich jetzt _WinAPI_ReadProcessMemory benutze wäre toll da ich bei der Deutsche online-hilfe hier im Forum nicht klar komme.

  • Maus DPI abfragen

    • Stalker
    • 1. Oktober 2014 um 18:22

    Hallo Leute

    Ich bin neu hier und ich hoffe mir kann einer Helfen.

    Ich bin gerade dabei eine Applet für die G510s zu schreiben und zwar soll es foldends tun.

    Die DPI Einstellung der Maus anzeigen wenn sie geändert wird.

    der Hintergrund ist auf dem Desktop wird die DPI angezeigt wenn sie geäöndert wird an der Maus, nur wenn man in einem Spiel ist dann sieht man es nicht also weiß man nicht mit welcher DPI man gerade spielt.

    Ist es möglich die aktuelle DPI Einstellung irgendwo raus zulesen oder ist es möglich nicht nur die Linke-, Recht- und Mittleremaustaste abzufragen sondern auch noch alle anderen der Maus (wo ja dan auch die beiden taste für DPI+ und DPI- dabei wären)?

    Wäre toll wenn einer Helfen könnte.

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™