Beiträge von Tweaky
-
-
Die Deutsche Hilfe kann man hier herunterladen
https://github.com/GunFood/autoitdehilfe/archive/refs/tags/25.02.2025.zip -
Muss das Thema erneut hochholen
.
Ich würde gerne von Asus-Board die Treiber und Bios in der json angezeigt bekommen.
folgende Links funktionieren:
https://www.asus.com/support/api/product.asmx/GetPDDrivers?osid=45&website=de&model=PRIME Z390-A
https://www.asus.com/support/api/product.asmx/GetPDBIOS?osid=45&website=de&model=PRIME Z390-A
https://rog.asus.com/support/webapi/product/GetPDDrivers?m1id=28611&osid=45&website=de&model=rog-crosshair/rog-crosshair-x870e-hero
folgender Link funktioniert nicht:
https://rog.asus.com/support/webapi/product/GetPDBIOS?m1id=28611&osid=45&website=de&model=rog-crosshair/rog-crosshair-x870e-hero
Habs gefunden: https://github.com/pettijohn/AsusDriverFeed
-
ChatGPT habe ich noch nie benutzt und hab es aktuell nicht vor mich damit zu beschäftigen.
Eigentlich brauche ich nur die übersetzte Datei so wie hier beschriebenThemaDeutsche Hilfe auf 3.3.16.1 updaten - mitmachen
Hi,
auf dieser Seite versuchen wir die Deutsche Hilfe auf 3.3.16.1 anzupassen
Warum übersetzen, wenn es schon eine Deutsche Hilfe gibt?
- Aktuell sind nur ca. 82% der Hilfe ist ins Deutsche übersetzt.
- Es fehlen noch 804 Funktionen, 297 Beispiele, 14 allgemeine Dateien.
Wo findet man die Dateien zum übersetzen?
- Leider gibt es aktuell keine Plattform wo gemeinschaftlich Dateien übersetzen werden können.
- Deshalb werden die Dateien in diesem Thread bereitgestellt.
- Die Pakete sind in den 10…Tweaky31. Dezember 2022 um 17:12
Das erstellen der Hilfe mache ich automatisiert mit AutoIt auf meinem Rechner wenn mal wieder ein paar Dateien zusammengekommen sind.
Das hochladen auf GitHub ist dann auch kein Problem mehr. -
-
Danke euch beiden
.
Andy
schön, dass du die deutsche Hilfe verwendest -
Hi,
es gibt eine neue Version der deutsch / englischen Hilfe für AutoIt 3.3.16.1.
Deutsche Offlinehilfe (Hilfe / au3.api / Beispiele)
Deutsche OnlinehilfeSchaut euch die Hilfe bitte genau an.
Fehler könnt ihr dann hier melden.
Gibt es eine deutsche Funktionsbeschreibung, so wird diese direkt angezeigt und man kann man durch das Flaggen-Symbol rechts oben von deutsch auf englisch umstellen.
Gibt es noch keine deutsche Funktionsbeschreibung so wird direkt die englische Funktionsbeschreibung angezeigt.
In der offline-Version gibt es 2 Farbversionen. 1x normal und 1x DarkMode
Diese Dateien können hier übersetzt werden.
Danke an alle Übersetzer und Helfer.
Viel Spaß damit -
-
Danke dir.
Läuft auch mit 64bit -
Habe versucht diese einzubauen. Es hat aber nicht geklappt
-
Aber nur etwas kürzer
.
Allerdings werden bei dem obigen Skript alle Icongrößen eines Icons in eine Datei exportiert.
Bei deinem Skript muss man die Größe angeben. -
Hi,
wie ihr teilweise schon bemerkt habt, habe ich schon 3 Themen aufgemacht, wo ich Probleme habe, 32bit-Skripte als 64bit-Skripte laufen zu lassen.
Prinzipiell habe ich meine Skripte auch als 32bit-Verision am laufen. Wenn es zu Problemen mit der 32bit-Version kommt und es mit der 64bit-Version läuft, nehme ich die 64bit Version.
Wahrscheinlich sind dies für euch keine Probleme, sondern es sind nur kleine Änderungen am Skript notwendig um auch mit 32bit zu laufen.
Der Grund warum ist jetzt alles auf 64bit umstellen wollte, war mein Virenscanner.
Ich nutze schon jahrelang Norton. Bis jetzt lief es gut.
Seit der neuen Version habe ich jedoch das Problem, dass z. B. 2 32bit-Programme als Virus erkannt wurden. UPX verwende ich übrigens nicht.
Dann habe ich dies als 64bit kompiliert und seltsamerweise war es dann kein Virus mehr. Warum, keine Ahnung.
Jetzt habe ich zufällig festgestellt, dass es auch mit dem hinzugefügten Programm-Icon zusammenhängt.
Wenn ich das Icon ersetze funktioniert es auch als 32bit-Version.
Alles sehr seltsam.
Wie steht ihr zu diesem Thema?
-
Peter S. Taler
Ich mache ein neues Thema auf wegen warum ich 64bit verwende. -
Habe im Skript nun doch ein paar Befehle durch dei offiziellen _Winapi_...-Funktionen ersetzen können.
Allerdings behebt dies nichts das Problem mit der 64-Bit Version.
C
Alles anzeigen#Region ;************ Includes ************ #include <Array.au3> #include <WinAPIRes.au3> #EndRegion ;************ Includes ************ ;~ #AutoIt3Wrapper_UseX64=Y FileDelete("D:\Extracted.ico") Global $aINM[1], $LV, $LHT, $IHM _ExtractIconToFile(@SystemDir & "\shell32.dll", -42, "D:\Extracted.ico") If Not FileExists("D:\Extracted.ico") Then MsgBox(0, 0, "Datei wurde nicht gespeichert") ; #FUNCTION# ============================================================================================= ; Name...........: _ExtractIconToFile ; Description ...: Extract an icon resource from a cpl, dll, exe, icl, ocx to a *.ico file ; Syntax.........: _ExtractIconToFile($sInFile, $iIcon, $sOutIco[, $iPath = 0]) ; Parameters ....: $sInFile - Path to file that contains the icon to extract. ; $iIcon - Icon Number to extract, eg; -1 (The first icon starts at -1) ; $sOutIco - Full path where to save the extracted icon to, eg; "C:\My Icons\new.ico" ; $iPath - If set to 1 then the extraction path will be created if it doesn't exist. ; If left as 0 then if the extraction path doesn't exist it won't be created. ; Return values .: Success - Return 1 and @error 0 ; Failure - Return 0 and @error 1 ~ 12 ; @error 1 = Invalid $sInFile parameter ; @error 2 = Invalid $iIcon parameter ; @error 3 = LoadLibrary failed to return a valid ptr ; @error 4 = $iIcon does not exist in the $sInFile ; @error 5 = Failed to Find RT_GROUP_ICON Resource ; @error 6 = Returned RT_GROUP_ICON Resource as 0 bytes ; @error 7 = Failed to Load RT_GROUP_ICON Resource ; @error 8 = Failed to Lock RT_GROUP_ICON Resource ; @error 9 = Failed to create DLL Struct for RT_GROUP_ICON data ; @error 10 = Data in DLL Struct is null ; @error 11 = Failed to Open output file path ; @error 12 = Failed to write file at output path ; (Most the error returns were for my own debug purpose) ; Author ........: smashly ; Modified.......: ; Remarks .......: A big Thank You to Siao for the heads up on _ResourceEnumNames & ___EnumResNameProc ; Also Thank You to WeaponX for his _StringSplitRegExp ; Related .......: ; Link ..........; ; Example .......; _ExtractIconToFile(@SystemDir & "\shell32.dll", -42, @HomeDrive & "\Extracted.ico") ; ======================================================================================================== Func _ExtractIconToFile($sInFile, $iIcon, $sOutIco, $iPath = 0) Local $hInstance, $iGN = "", $hResource, $iSize, $hData, $pData, $tRes, $sDByte Local $sData, $sHdr, $iOrd, $aHtail, $iCnt, $Offset, $FO, $iCrt = 18 If $iPath = 1 Then $iCrt = 26 If Not FileExists($sInFile) Then Return SetError(1, 0, 0) If Not IsInt($iIcon) Then Return SetError(2, 0, 0) $hInstance = _WinAPI_LoadLibraryEx($sInFile, $LOAD_LIBRARY_AS_DATAFILE) If Not IsPtr($hInstance) Then Return SetError(3, 0, 0) _ResourceEnumNames($hInstance, $RT_GROUP_ICON) For $i = 1 To $aINM[0] If $i = StringReplace($iIcon, "-", "") Then $iGN = $aINM[$i] ExitLoop EndIf Next If $iGN = "" Then _WinAPI_FreeLibrary($hInstance) Return SetError(4, 0, 0) EndIf $hResource = _WinAPI_FindResource($hInstance, $RT_GROUP_ICON, $iGN) If $hResource = 0 Then _WinAPI_FreeLibrary($hInstance) Return SetError(5, 0, 0) EndIf $iSize = _WinAPI_SizeOfResource($hInstance, $hResource) If $iSize = 0 Then _WinAPI_FreeLibrary($hInstance) Return SetError(6, 0, 0) EndIf $hData = _WinAPI_LoadResource($hInstance, $hResource) If $hData = 0 Then _WinAPI_FreeLibrary($hInstance) Return SetError(7, 0, 0) EndIf $pData = _WinAPI_LockResource($hData) If $pData = 0 Then _WinAPI_FreeLibrary($hInstance) Return SetError(8, 0, 0) EndIf $tRes = DllStructCreate("byte[" & $iSize & "]", $pData) If Not IsDllStruct($tRes) Then _WinAPI_FreeLibrary($hInstance) Return SetError(9, 0, 0) EndIf $sData = DllStructGetData($tRes, 1) If $sData = "" Then _WinAPI_FreeLibrary($hInstance) Return SetError(10, 0, 0) EndIf $sHdr = StringLeft($sData, 14) $iOrd = Dec(LTHR("0x" & StringRight(StringLeft($sData, 42), 4))) ;index start of icon in the library $aHtail = _StringSplitRegExp(StringTrimLeft($sData, 14), '(.){28}', True) $iCnt = $aHtail[0] $Offset = ($iCnt * 16) + 6 For $r = 1 To $aHtail[0] $sDByte = Dec(Hex(BitRotate("0x" & StringLeft(StringRight($aHtail[$r], 12), 4), -8), 4)) $aHtail[$r] = StringTrimRight($aHtail[$r], 4) $sHdr &= $aHtail[$r] & LTHR($Offset) & "0000" $Offset += $sDByte Next For $i = 1 To $iCnt $hResource = _WinAPI_FindResource($hInstance, $RT_ICON, $iOrd) $iSize = _WinAPI_SizeOfResource($hInstance, $hResource) $hData = _WinAPI_LoadResource($hInstance, $hResource) $pData = _WinAPI_LockResource($hData) $tRes = DllStructCreate("byte[" & $iSize & "]", $pData) $sHdr &= StringTrimLeft(DllStructGetData($tRes, 1), 2) $iOrd += 1 Next _WinAPI_FreeLibrary($hInstance) Dim $aINM[1] $FO = FileOpen($sOutIco, $iCrt) If $FO = -1 Then Return SetError(11, 0, 0) $FW = FileWrite($FO, $sHdr) If $FW = 0 Then Return SetError(12, 0, 0) FileClose($FO) Return SetError(0, 0, 1) EndFunc ;==>_ExtractIconToFile ; Helper Functions beyond this point Func LTHR($sNum) Return Hex(BitRotate($sNum, -8), 4) EndFunc ;==>LTHR Func _StringSplitRegExp($sString, $sPattern, $sIncludeMatch = False, $iCount = 0) Local $sReservedPattern = Chr(0), $sTemp, $aResult Local $sReplacePattern = $sReservedPattern If $sIncludeMatch Then $sReplacePattern = "$0" & $sReplacePattern $sTemp = StringRegExpReplace($sString, $sPattern, $sReplacePattern, $iCount) If StringRight($sTemp, 1) = $sReservedPattern Then $sTemp = StringTrimRight($sTemp, 1) $aResult = StringSplit($sTemp, $sReservedPattern, 1) Return $aResult EndFunc ;==>_StringSplitRegExp Func _ResourceEnumNames($hModule, $iType) Local $aRet, $IsPtr = IsPtr($hModule), $xCB If $IsPtr Then $xCB = DllCallbackRegister('___EnumResNameProc', 'int', 'int*;int*;int*;int*') $aRet = DllCall('kernel32.dll', 'int', 'EnumResourceNamesW', 'ptr', $hModule, 'int', $iType, 'ptr', DllCallbackGetPtr($xCB), 'ptr', 0) ;Absturz bei 64bit!!! DllCallbackFree($xCB) EndIf EndFunc ;==>_ResourceEnumNames Func ___EnumResNameProc($hModule, $pType, $pName, $lParam) Local $iSize = DllCall('kernel32.dll', 'int', 'GlobalSize', 'ptr', $pName), $tBuf If $iSize Then $tBuf = DllStructCreate('wchar[' & $iSize & ']', $pName) ReDim $aINM[UBound($aINM) + 1] $aINM[0] += 1 $aINM[UBound($aINM) - 1] = DllStructGetData($tBuf, 1) Else ReDim $aINM[UBound($aINM) + 1] $aINM[0] += 1 $aINM[UBound($aINM) - 1] = "#" & $pName EndIf Return 1 EndFunc ;==>___EnumResNameProc
Schnuffel
Ich mache ein neues Thema auf wegen warum ich 64bit verwende. -
Hi,
ich habe nochmals eine Datei die nicht unter 64bit läuft.
Das Skript ist auch nicht von mir, trotzdem wäre es schön es man es zum laufen bekommen könnte.
Hier sind ja noch viele Winapi-Befehle selbst geschrieben. Ich habe versucht sie durch die "offiziellen" Befehle zu ersetzen, scheitere aber kläglich.
Bekommt es von euch jemand hin?Code
Alles anzeigen#Region ;************ Includes ************ ;~ #include-once #EndRegion ;************ Includes ************ #AutoIt3Wrapper_UseX64=Y Global $aINM[1], $LV, $LHT, $IHM _ExtractIconToFile(@SystemDir & "\shell32.dll", -42, "D:\Extracted.ico") ; #FUNCTION# ============================================================================================= ; Name...........: _ExtractIconToFile ; Description ...: Extract an icon resource from a cpl, dll, exe, icl, ocx to a *.ico file ; Syntax.........: _ExtractIconToFile($sInFile, $iIcon, $sOutIco[, $iPath = 0]) ; Parameters ....: $sInFile - Path to file that contains the icon to extract. ; $iIcon - Icon Number to extract, eg; -1 (The first icon starts at -1) ; $sOutIco - Full path where to save the extracted icon to, eg; "C:\My Icons\new.ico" ; $iPath - If set to 1 then the extraction path will be created if it doesn't exist. ; If left as 0 then if the extraction path doesn't exist it won't be created. ; Return values .: Success - Return 1 and @error 0 ; Failure - Return 0 and @error 1 ~ 12 ; @error 1 = Invalid $sInFile parameter ; @error 2 = Invalid $iIcon parameter ; @error 3 = LoadLibrary failed to return a valid ptr ; @error 4 = $iIcon does not exist in the $sInFile ; @error 5 = Failed to Find RT_GROUP_ICON Resource ; @error 6 = Returned RT_GROUP_ICON Resource as 0 bytes ; @error 7 = Failed to Load RT_GROUP_ICON Resource ; @error 8 = Failed to Lock RT_GROUP_ICON Resource ; @error 9 = Failed to create DLL Struct for RT_GROUP_ICON data ; @error 10 = Data in DLL Struct is null ; @error 11 = Failed to Open output file path ; @error 12 = Failed to write file at output path ; (Most the error returns were for my own debug purpose) ; Author ........: smashly ; Modified.......: ; Remarks .......: A big Thank You to Siao for the heads up on _ResourceEnumNames & ___EnumResNameProc ; Also Thank You to WeaponX for his _StringSplitRegExp ; Related .......: ; Link ..........; ; Example .......; _ExtractIconToFile(@SystemDir & "\shell32.dll", -42, @HomeDrive & "\Extracted.ico") ; ======================================================================================================== Func _ExtractIconToFile($sInFile, $iIcon, $sOutIco, $iPath = 0) Local Const $LOAD_LIBRARY_AS_DATAFILE = 0x00000002 Local Const $RT_ICON = 3 Local Const $RT_GROUP_ICON = 14 Local $hInst, $iGN = "", $hFind, $aSize, $hLoad, $hLock, $tRes, $sDByte Local $sData, $sHdr, $iOrd, $aHtail, $iCnt, $Offset, $FO, $iCrt = 18 If $iPath = 1 Then $iCrt = 26 If Not FileExists($sInFile) Then Return SetError(1, 0, 0) If Not IsInt($iIcon) Then Return SetError(2, 0, 0) $hInst = _LoadLibraryEx($sInFile, $LOAD_LIBRARY_AS_DATAFILE) If Not IsPtr($hInst) Then Return SetError(3, 0, 0) _ResourceEnumNames($hInst, $RT_GROUP_ICON) For $i = 1 To $aINM[0] If $i = StringReplace($iIcon, "-", "") Then $iGN = $aINM[$i] ExitLoop EndIf Next If $iGN = "" Then _FreeLibrary($hInst) Return SetError(4, 0, 0) EndIf $hFind = DllCall("kernel32.dll", "int", "FindResourceA", "int", $hInst, "str", $iGN, "long", $RT_GROUP_ICON) If $hFind[0] = 0 Then _FreeLibrary($hInst) Return SetError(5, 0, 0) EndIf $aSize = DllCall("kernel32.dll", "dword", "SizeofResource", "int", $hInst, "int", $hFind[0]) If $aSize[0] = 0 Then _FreeLibrary($hInst) Return SetError(6, 0, 0) EndIf $hLoad = DllCall("kernel32.dll", "int", "LoadResource", "int", $hInst, "int", $hFind[0]) If $hLoad[0] = 0 Then _FreeLibrary($hInst) Return SetError(7, 0, 0) EndIf $hLock = DllCall("kernel32.dll", "int", "LockResource", "int", $hLoad[0]) If $hLock[0] = 0 Then _FreeLibrary($hInst) Return SetError(8, 0, 0) EndIf $tRes = DllStructCreate("byte[" & $aSize[0] & "]", $hLock[0]) If Not IsDllStruct($tRes) Then _FreeLibrary($hInst) Return SetError(9, 0, 0) EndIf $sData = DllStructGetData($tRes, 1) If $sData = "" Then _FreeLibrary($hInst) Return SetError(10, 0, 0) EndIf $sHdr = StringLeft($sData, 14) $iOrd = Dec(LTHR("0x" & StringRight(StringLeft($sData, 42), 4))) ;index start of icon in the library $aHtail = _StringSplitRegExp(StringTrimLeft($sData, 14), '(.){28}', True) $iCnt = $aHtail[0] $Offset = ($iCnt * 16) + 6 For $r = 1 To $aHtail[0] $sDByte = Dec(Hex(BitRotate("0x" & StringLeft(StringRight($aHtail[$r], 12), 4), -8), 4)) $aHtail[$r] = StringTrimRight($aHtail[$r], 4) $sHdr &= $aHtail[$r] & LTHR($Offset) & "0000" $Offset += $sDByte Next For $i = 1 To $iCnt $hFind = DllCall("kernel32.dll", "int", "FindResourceA", "int", $hInst, "str", "#" & $iOrd, "long", $RT_ICON) $aSize = DllCall("kernel32.dll", "dword", "SizeofResource", "int", $hInst, "int", $hFind[0]) $hLoad = DllCall("kernel32.dll", "int", "LoadResource", "int", $hInst, "int", $hFind[0]) $hLock = DllCall("kernel32.dll", "int", "LockResource", "int", $hLoad[0]) $tRes = DllStructCreate("byte[" & $aSize[0] & "]", $hLock[0]) $sHdr &= StringTrimLeft(DllStructGetData($tRes, 1), 2) $iOrd += 1 Next _FreeLibrary($hInst) Dim $aINM[1] $FO = FileOpen($sOutIco, $iCrt) If $FO = -1 Then Return SetError(11, 0, 0) $FW = FileWrite($FO, $sHdr) If $FW = 0 Then Return SetError(12, 0, 0) FileClose($FO) Return SetError(0, 0, 1) EndFunc ;==>_ExtractIconToFile ; Helper Functions beyond this point Func LTHR($sNum) Return Hex(BitRotate($sNum, -8), 4) EndFunc ;==>LTHR Func _LoadLibraryEx($sFile, $iFlag) Local $hInst2 = DllCall("Kernel32.dll", "hwnd", "LoadLibraryExA", "str", $sFile, "hwnd", 0, "int", $iFlag) Return $hInst2[0] EndFunc ;==>_LoadLibraryEx Func _FreeLibrary($hModule) DllCall("Kernel32.dll", "hwnd", "FreeLibrary", "hwnd", $hModule) EndFunc ;==>_FreeLibrary Func _StringSplitRegExp($sString, $sPattern, $sIncludeMatch = False, $iCount = 0) Local $sReservedPattern = Chr(0), $sTemp, $aResult Local $sReplacePattern = $sReservedPattern If $sIncludeMatch Then $sReplacePattern = "$0" & $sReplacePattern $sTemp = StringRegExpReplace($sString, $sPattern, $sReplacePattern, $iCount) If StringRight($sTemp, 1) = $sReservedPattern Then $sTemp = StringTrimRight($sTemp, 1) $aResult = StringSplit($sTemp, $sReservedPattern, 1) Return $aResult EndFunc ;==>_StringSplitRegExp Func _ResourceEnumNames($hModule, $iType) Local $aRet, $IsPtr = IsPtr($hModule), $xCB If $IsPtr Then $xCB = DllCallbackRegister('___EnumResNameProc', 'int', 'int*;int*;int*;int*') $aRet = DllCall('kernel32.dll', 'int', 'EnumResourceNamesW', 'ptr', $hModule, 'int', $iType, 'ptr', DllCallbackGetPtr($xCB), 'ptr', 0) DllCallbackFree($xCB) EndIf EndFunc ;==>_ResourceEnumNames Func ___EnumResNameProc($hModule, $pType, $pName, $lParam) Local $aSize = DllCall('kernel32.dll', 'int', 'GlobalSize', 'ptr', $pName), $tBuf If $aSize[0] Then $tBuf = DllStructCreate('wchar[' & $aSize[0] & ']', $pName) ReDim $aINM[UBound($aINM) + 1] $aINM[0] += 1 $aINM[UBound($aINM) - 1] = DllStructGetData($tBuf, 1) Else ReDim $aINM[UBound($aINM) + 1] $aINM[0] += 1 $aINM[UBound($aINM) - 1] = "#" & $pName EndIf Return 1 EndFunc ;==>___EnumResNameProc
-
Danke dir. Funktioniert einwandfrei.
Allerdings habe ich es unter Run eingetragen, da dies bei mir der Standardbefehl ist. -
Danke. Auch dir ein frohes neues Jahr
.
Funktioniert einwandfrei. Danke
-
Hi,
das Skript stürzt nach dem starten direkt ohne Fehlermeldung ab.
Unter 32bit funktioniert es.
Der Fehler scheint in der Funktion "_MyWindowProc" aufzutreten. Weiß leider nicht warumC
Alles anzeigen#AutoIt3Wrapper_UseX64=Y #Region ;************ Includes ************ #Include <EditConstants.au3> #Include <WinAPISysWin.au3> #Include <WindowsConstants.au3> #include <GuiMenu.au3> #EndRegion ;************ Includes ************ Opt("MustDeclareVars", 1) ; 0=nein, 1=erfordert Deklaration ;Notiz: Größe und Lage Global $iNotiz_x = 500 Global $iNotiz_y = 200 Global $iNotiz_breite = 200 Global $iNotiz_hoehe = 300 ;Notiz erstellen Global $sNotiz_inhalt = "" Global $hGui_notizen = GUICreate("", $iNotiz_breite, $iNotiz_hoehe, $iNotiz_x, $iNotiz_y, BitOR($WS_SIZEBOX, $WS_CLIPCHILDREN, $WS_CLIPSIBLINGS), $WS_EX_TOOLWINDOW) Global $idEdit_notiz = GUICtrlCreateEdit($sNotiz_inhalt, 0, 0, $iNotiz_breite - 2, $iNotiz_hoehe - 20, BitOR($ES_MULTILINE, $ES_WANTRETURN, $WS_VSCROLL, $ES_AUTOVSCROLL)) ;Kontextmenü - benutzerdefiniert Global $w_editBoxProcNew = DllCallbackRegister("_MyWindowProc", "ptr", "hwnd;uint;long;ptr") Global $w_editBoxProcOld = _WinAPI_SetWindowLong(GUICtrlGetHandle($idEdit_notiz), $GWL_WNDPROC, DllCallbackGetPtr($w_editBoxProcNew)) _WinAPI_SetWindowLong(GUICtrlGetHandle($idEdit_notiz), $GWL_WNDPROC, DllCallbackGetPtr($w_editBoxProcNew)) ;Kontextmenü Editfeld Global $idContext_notiz = GUICtrlCreateContextMenu() Global $idMenuitem_notizen_beenden = GUICtrlCreateMenuItem("Test", $idContext_notiz) GUISetState(@SW_SHOW, $hGui_notizen) While 1 Sleep(10) WEnd Func _MyWindowProc($hWnd, $uiMsg, $wParam, $lParam) Switch $uiMsg Case $WM_CONTEXTMENU If $hWnd = GUICtrlGetHandle($idEdit_notiz) Then ; show our context menu Local $iSelected = _GUICtrlMenu_TrackPopupMenu(GUICtrlGetHandle($idContext_notiz), $hWnd, -1, -1, 1, 1, 2) Return 0 EndIf EndSwitch ;pass the unhandled messages to default WindowProc Return _WinAPI_CallWindowProc($w_editBoxProcOld, $hWnd, $uiMsg, $wParam, $lParam) EndFunc ;==>_MyWindowProc Func _beenden() Exit EndFunc ;==>_beenden
-
Euch beiden auch ein gesundes neue Jahr
.
Danke für eure Hilfe. Nun funktioniert es perfekt -
Wow danke sieht sehr gut aus.
Allerdings stürzt es bei 4 und mehr Ordnern ab.C
Alles anzeigen#Region ;************ Includes ************ #include <Array.au3> #include <WinAPISysWin.au3> #include <WinAPIShellEx.au3> #EndRegion ;************ Includes ************ #AutoIt3Wrapper_UseX64=y ;~ Global $aTest[3] = ["C:\test\", "C:\_test2\", "C:\_test3\"] ;funktioniert Global $aTest[4] = ["C:\test\", "C:\_test2\", "C:\_test3\", "C:\_test4\"] ;funktioniert nicht For $i = 0 To UBound($aTest) - 1 DirCreate($aTest[$i]) Next OnAutoItExitRegister('OnAutoItExit') ConsoleWrite((@AutoItX64 ? 4 : 2) & @CRLF) Local $hWnd = GUICreate('') Local $iMsg = _WinAPI_RegisterWindowMessage('SHELLCHANGENOTIFY') GUIRegisterMsg($iMsg, 'WM_SHELLCHANGENOTIFY') Global $g_iID = _WinAPI_ShellChangeNotifyRegister64($hWnd, $iMsg, $SHCNE_ALLEVENTS, BitOR($SHCNRF_INTERRUPTLEVEL, $SHCNRF_SHELLLEVEL, $SHCNRF_RECURSIVEINTERRUPT), $aTest, 1) If @error Then MsgBox(($MB_ICONERROR + $MB_SYSTEMMODAL), 'Fehler', 'Das Fenster wurde nicht registriert.') Exit EndIf While 1 Sleep(1000) WEnd Func WM_SHELLCHANGENOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $tIDL = DllStructCreate((@AutoItX64 ? 'uint64 Item1; uint64 Item2' : 'dword Item1; dword Item2'), $wParam) ; bei 64 Bit ist das ein QWord (4 Byte) Local $sPath = _WinAPI_ShellGetPathFromIDList(DllStructGetData($tIDL, 'Item1')) If $sPath Then ConsoleWrite('Event: 0x' & Hex($lParam) & ' | Pfad: ' & $sPath & @CRLF) Else ConsoleWrite('Event: 0x' & Hex($lParam) & @CRLF) EndIf EndFunc ;==>WM_SHELLCHANGENOTIFY Func OnAutoItExit() If $g_iID Then _WinAPI_ShellChangeNotifyDeregister($g_iID) EndIf EndFunc ;==>OnAutoItExit Func _WinAPI_ShellChangeNotifyRegister64($hWnd, $iMsg, $iEvents, $iSources, $aPaths, $bRecursive = False) Local $iPath = $aPaths, $tagStruct = '' If IsArray($aPaths) Then If UBound($aPaths, $UBOUND_COLUMNS) Then Return SetError(1, 0, 0) Else Dim $aPaths[1] = [$iPath] EndIf For $i = 0 To UBound($aPaths) - 1 If Not _WinAPI_PathIsDirectory($aPaths[$i]) Then Return SetError(2, 0, 0) Next For $i = 0 To UBound($aPaths) - 1 $tagStruct &= 'ptr;int;' Next Local $tEntry = DllStructCreate($tagStruct) For $i = 0 To UBound($aPaths) - 1 $aPaths[$i] = _WinAPI_ShellILCreateFromPath(_WinAPI_PathSearchAndQualify($aPaths[$i])) DllStructSetData($tEntry, (@AutoItX64 ? 4 : 2) * $i + 1, $aPaths[$i]) ; bei 64Bit ist PIDLIST_ABSOLUTE = 64 Bit (4 Byte) DllStructSetData($tEntry, (@AutoItX64 ? 4 : 2) * $i + 2, $bRecursive) Next Local $iError = 0 Local $aCall = DllCall('shell32.dll', 'ulong', 'SHChangeNotifyRegister', 'hwnd', $hWnd, 'int', $iSources, 'long', $iEvents, _ 'uint', $iMsg, 'int', UBound($aPaths), 'struct*', $tEntry) If @error Or Not $aCall[0] Then $iError = @error + 10 For $i = 0 To UBound($aPaths) - 1 _WinAPI_CoTaskMemFree($aPaths[$i]) Next Return SetError($iError, 0, $aCall[0]) EndFunc ;==>_WinAPI_ShellChangeNotifyRegister64