Jump to content

Iczer

Active Members
  • Posts

    443
  • Joined

  • Last visited

Recent Profile Visitors

911 profile views

Iczer's Achievements

  1. I wanted tpo use GDIPlus magic to combine seweral images into one long and then display rezult in PIC-control with scrollbar enabled. Without writing it to disk. but... some help is welcomed... #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> #include <ScreenCapture.au3> #include <WinAPI.au3> #Region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("Form1", 778, 889, 1159, 344) Global $Pic1 = GUICtrlCreatePic("", 24, 16, 732, 820, BitOR($GUI_SS_DEFAULT_PIC,$SS_SUNKEN,$WS_VSCROLL,$WS_BORDER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE)) Global $ButtonLoad = GUICtrlCreateButton("Load Images", 24, 848, 125, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $hPic1 = GUICtrlGetHandle ( $Pic1 ) Global $sFolder = "C:\Temp\!_AMTest\" While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $ButtonLoad LoadAll() EndSwitch WEnd Func LoadAll() Local $iImageCount = 7, $iWmax = 700 Local $aImage[$iImageCount+1][3], $iW = 0, $iH = 0, $iHPoint = 0 _GDIPlus_Startup() For $i = 1 To $iImageCount $hBitmap = _GDIPlus_BitmapCreateFromFile($sFolder & "\" & StringFormat("%03i",$i) & ".jpg");$hBitmap $iPic_W = _GDIPlus_ImageGetWidth($aImage[$i][0]) $iPic_H = _GDIPlus_ImageGetHeight($aImage[$i][0]) $aImage[$i][2] = Round($iWmax*$iPic_H/$iPic_W,0) $aImage[$i][1] = $iWmax $aImage[$i][0] = _GDIPlus_ImageResize($hBitmap, $aImage[$i][1], $aImage[$i][2]) ;resize image $iW = ($iW > $aImage[$i][1])?($iW):($aImage[$i][1]) $iH += $aImage[$i][2] _GDIPlus_BitmapDispose($hBitmap) Next $g_hGfx = _GDIPlus_GraphicsCreateFromHWND($hPic1) ;create a graphics object from a window handle $g_hBitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $g_hGfx) ;create a Bitmap object based on a graphics object $g_hGfxCtxt = _GDIPlus_ImageGetGraphicsContext($g_hBitmap) ;get the graphics context of the image / bitmap to draw on image / bitmap ; _GDIPlus_GraphicsSetSmoothingMode($g_hGfxCtxt, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ;sets the graphics object rendering quality (antialiasing) For $i = 1 To $iImageCount _GDIPlus_GraphicsDrawImageRect($g_hGfxCtxt, $aImage[$i][0], 0, $iHPoint, $aImage[$i][1], $aImage[$i][2]) $iHPoint += $aImage[$i][2] Next _GDIPlus_GraphicsDrawImage($g_hGfx, $g_hBitmap, 0, 0) ; Clean up resources For $i = 1 To $iImageCount _GDIPlus_BitmapDispose($aImage[$i][0]) Next ; Shut down GDI+ library _GDIPlus_Shutdown() EndFunc
  2. Is it even possible for winapi to draw icons/animations on menu-bar? Just as old firefox and IE was doing?
  3. no - if I remove                     GUICtrlSetState($Pic1, $GUI_DISABLE + $GUI_HIDE)                     GUICtrlSetState($Pic2, $GUI_DISABLE + $GUI_HIDE)                     GUICtrlSetState($Pic3, $GUI_DISABLE + $GUI_HIDE) then icon wont be removed in fullscreen and still be visible - at least it how it for me second - setting Y-coordinate to zero in GUICtrlCreateIcon just moved icon 8 pixels upper - to the bottom border of menubar in windowed mode, but I need move it on menubar itself - another 16 pixels UP icons do not need to be visible in fullscreen mode - only in windoved mode, where menubar exist
  4. Hiding menu worked - thanks, but about icons - I wanted something like this (see below), but icons should be moved on menubar itself, just 16-32 up from it current position. #include <GUIConstantsEx.au3> #include <GuiMenu.au3> #include <GuiStatusBar.au3> #include <StructureConstants.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <GDIPlus.au3> #include <GuiImageList.au3> #include <GuiButton.au3> _GDIPlus_Startup() Global $hGUI, $hFile, $hEdit, $hHelp, $hMain, $hStatusBar, $sMainGUI_Mode = "Windowed", $binModeChange = False, $hGUIStayleDefault, $aIcons[8] Global Enum $e_idNew = 8000, $e_idOpen, $e_idSave, $e_idExit, $e_idCut, $e_idCopy, $e_idPaste, $e_idAbout ; Create GUI $hGUI = GUICreate("Menu", 400, 300) _menuCreate() $Pic1 = GUICtrlCreateIcon('C:\Program Files (x86)\AutoIt3\Icons\MyAutoIt3_Yellow.ico',-1,392 - 16, 8, 16, 16) $Pic2 = GUICtrlCreateIcon('C:\Program Files (x86)\AutoIt3\Icons\MyAutoIt3_Red.ico', -1,392 - 40, 8, 16, 16) $Pic3 = GUICtrlCreateIcon('C:\Program Files (x86)\AutoIt3\Icons\MyAutoIt3_Green.ico', -1,392 - 64, 8, 16, 16) $idButton_ModeChange = GUICtrlCreateButton("ModeChange", 150, 85, 125, 25) $hStatusBar = _GUICtrlStatusBar_Create($hGUI) GUIRegisterMsg($WM_SIZE, "Example2_WM_SIZE") GUISetState(@SW_SHOW) $hGUIStayleDefault = GUIGetStyle ($hGUI) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ExitLoop Case $idButton_ModeChange If $sMainGUI_Mode = "FullScreen" Then $sMainGUI_Mode = "Windowed" _menuCreate() GUISetStyle ($hGUIStayleDefault[0], $hGUIStayleDefault[1],$hGUI) Else $sMainGUI_Mode = "FullScreen" While _GUICtrlMenu_RemoveMenu($hMain, 0) WEnd GUISetStyle ($WS_POPUP, -1,$hGUI) EndIf $binModeChange = True _SendMessage($hGUI, $WM_SIZE) EndSwitch WEnd Func Example2_WM_SIZE($hWnd, $iMsg, $wParam, $lParam) Local $aSize_GUI = WinGetClientSize($hGUI), $aSize_Control If Not @error Then Switch $sMainGUI_Mode Case "Windowed" If $binModeChange Then GUICtrlSetState($hMain, $GUI_ENABLE + $GUI_SHOW) GUICtrlSetState($Pic1, $GUI_ENABLE + $GUI_SHOW) GUICtrlSetState($Pic2, $GUI_ENABLE + $GUI_SHOW) GUICtrlSetState($Pic3, $GUI_ENABLE + $GUI_SHOW) _GUICtrlStatusBar_ShowHide ( $hStatusBar, @SW_SHOW ) _GUICtrlStatusBar_Resize($hStatusBar) WinMove($hGUI, "", @DesktopWidth/2 - 200, @DesktopHeight/2 - 150, 400, 300) $aSize_GUI = WinGetClientSize($hGUI) If @error Then Return $GUI_RUNDEFMSG $binModeChange = False EndIf Case "FullScreen" If $binModeChange Then GUICtrlSetState($hMain, $GUI_DISABLE + $GUI_HIDE) GUICtrlSetState($Pic1, $GUI_DISABLE + $GUI_HIDE) GUICtrlSetState($Pic2, $GUI_DISABLE + $GUI_HIDE) GUICtrlSetState($Pic3, $GUI_DISABLE + $GUI_HIDE) _GUICtrlStatusBar_ShowHide ( $hStatusBar, @SW_HIDE ) WinMove($hGUI, "", -2, -2, @DesktopWidth+2, @DesktopHeight+2) $aSize_GUI = WinGetClientSize($hGUI) If @error Then Return $GUI_RUNDEFMSG $binModeChange = False EndIf EndSwitch EndIf Return $GUI_RUNDEFMSG EndFunc ;Code below was generated by: 'File to Base64 String' Code Generator v1.20 Build 2015-01-20 Func _menuCreate() ; Create File menu $hFile = _GUICtrlMenu_CreateMenu() _GUICtrlMenu_AddMenuItem($hFile, "&New", $e_idNew) _GUICtrlMenu_AddMenuItem($hFile, "&Open", $e_idOpen) _GUICtrlMenu_AddMenuItem($hFile, "&Save", $e_idSave) _GUICtrlMenu_AddMenuItem($hFile, "", 0) _GUICtrlMenu_AddMenuItem($hFile, "E&xit", $e_idExit) ; Create Edit menu $hEdit = _GUICtrlMenu_CreateMenu() _GUICtrlMenu_AddMenuItem($hEdit, "&Cut", $e_idCut) _GUICtrlMenu_AddMenuItem($hEdit, "C&opy", $e_idCopy) _GUICtrlMenu_AddMenuItem($hEdit, "&Paste", $e_idPaste) ; Create Help menu $hHelp = _GUICtrlMenu_CreateMenu() _GUICtrlMenu_AddMenuItem($hHelp, "&About", $e_idAbout) ; Create Main menu $hMain = _GUICtrlMenu_CreateMenu() _GUICtrlMenu_AddMenuItem($hMain, "&File", 0, $hFile) _GUICtrlMenu_AddMenuItem($hMain, "&Edit", 0, $hEdit) _GUICtrlMenu_AddMenuItem($hMain, "&Help", 0, $hHelp) ; Set window menu _GUICtrlMenu_SetMenu($hGUI, $hMain) EndFunc ideally using binaries from script, not from files on HDD: Func _SetIcon($hWnd,$bMemoryBitmap, ByRef $hIcon) Local $aBitmap = _GDIPlus_BitmapCreateFromMemory($bMemoryBitmap) $hIcon = _GDIPlus_HICONCreateFromBitmap($aBitmap) _SendMessage($hWnd, 0x0080, 1, $hIcon); 0x0080 = $WM_SETICON, 0 = icon small -> 1 = icon big ;_WinAPI_SetClassLongEx($hWnd, $GCL_HICONSM, $hIcon) EndFunc Func _SetIconToButton($idButton, $binIco, $iSize = 16) Local $hButton = GUICtrlGetHandle($idButton) Local $hIcon = _GDIPlus_BitmapCreateFromMemory($binIco, True) Local $hImageList = _GUIImageList_Create($iSize, $iSize, 5, 3) _GUIImageList_Add($hImageList, $hIcon) _GUICtrlButton_SetImageList($hButton, $hImageList,4) _WinAPI_DeleteObject($hIcon) _WinAPI_UpdateWindow($hButton) EndFunc Func _Base64String_Icon01() Local $Base64String $Base64String &= 'F7oAAAABAAMAICABAXAgAKgQAAA2IAAAABgYA3iICWgAAN4ATBAADAE8aAAEAABmGgAAKHMAjADIAEAADAEuUQAlgBcMAiobDwFSXAEUADkmFxAbEwwALgYDAUwxHAsAeQwIBEVINCICAokROyQSBRsQBAcNzT2aZzoBkwBaLJ++hVPn5wCsdvzsv5L/i4BaMskSDQkthREAZkUoAVIwFWUASCkRnAUDAkIIMiARxkOtc0ABANiPUNTktH//AOe6iv/pwJP/AOm4iP5QLhShECYbERXBCD0mFAAm05JZ7OSpbwD/sXE65DQcCyCOIBQJHH8fAAAAu3xEAdaJR9QA4atx/+Oxev8A5bWB/+a5iP8A3aFt+BsPB14AHhUNKZdcLbUA4q1z/+Cnaf8A3Z9c/9eMRPsAMxsKjCwbCxIB5RlBIAcBFgoCEA8vFwXKdYJTKQAFz4A+1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Xsuh8xyJY8InU0MfszacykQANZwJmPBYyFAgOWUMf/+4bnwoABo3vO4eej90cCV/41IFFjfMg8AAL5QBhHjhjWkANKERZu9cjgDANt3LUbTcShCs58CBwD8TzAA0N3okD050N4AgJAXwTGw3QABBsHA4jAAB4EAAAIPERlwAqBKMwA/AADgAH8AAA==' $Base64String = _WinAPI_Base64Decode($Base64String) Local $tSource = DllStructCreate('byte[' & BinaryLen($Base64String) & ']') DllStructSetData($tSource, 1, $Base64String) Local $tDecompress _WinAPI_LZNTDecompress($tSource, $tDecompress, 7886) $tSource = 0 Local Const $bString = Binary(DllStructGetData($tDecompress, 1)) Return $bString EndFunc ;==>_Base64String Func _WinAPI_Base64Decode($sB64String) Local $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "ptr", 0, "dword*", 0, "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(1, 0, "") Local $bBuffer = DllStructCreate("byte[" & $aCrypt[5] & "]") $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "struct*", $bBuffer, "dword*", $aCrypt[5], "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(2, 0, "") Return DllStructGetData($bBuffer, 1) EndFunc ;==>_WinAPI_Base64Decode Func _WinAPI_LZNTDecompress(ByRef $tInput, ByRef $tOutput, $iBufferSize) $tOutput = DllStructCreate("byte[" & $iBufferSize & "]") If @error Then Return SetError(1, 0, 0) Local $aRet = DllCall("ntdll.dll", "uint", "RtlDecompressBuffer", "ushort", 0x0002, "struct*", $tOutput, "ulong", $iBufferSize, "struct*", $tInput, "ulong", DllStructGetSize($tInput), "ulong*", 0) If @error Then Return SetError(2, 0, 0) If $aRet[0] Then Return SetError(3, $aRet[0], 0) Return $aRet[6] EndFunc ;==>_WinAPI_LZNTDecompress
  5. hmm... it not working for me - menu wont disappear in full screen and icons not visible in windowed mode...
  6. I wanted to place 2 or more icons, including animated, on GUI menu bar - on right side, just below minimize/maximize/close buttons, but I dont know how... and another point - I need to switch between full screen and windowed modes, but menu wont gets hidden in full screen mode... How I can tackle this two points? #include <GUIConstantsEx.au3> #include <GuiMenu.au3> #include <GuiStatusBar.au3> #include <StructureConstants.au3> #include <WindowsConstants.au3> Global $hGUI, $hFile, $hEdit, $hHelp, $hMain, $hStatusBar, $sMainGUI_Mode = "Windowed", $binModeChange = False, $hGUIStayleDefault Global Enum $e_idNew = 8000, $e_idOpen, $e_idSave, $e_idExit, $e_idCut, $e_idCopy, $e_idPaste, $e_idAbout Example() Func Example() ; Create GUI $hGUI = GUICreate("Menu", 400, 300) ; Create File menu $hFile = _GUICtrlMenu_CreateMenu() _GUICtrlMenu_AddMenuItem($hFile, "&New", $e_idNew) _GUICtrlMenu_AddMenuItem($hFile, "&Open", $e_idOpen) _GUICtrlMenu_AddMenuItem($hFile, "&Save", $e_idSave) _GUICtrlMenu_AddMenuItem($hFile, "", 0) _GUICtrlMenu_AddMenuItem($hFile, "E&xit", $e_idExit) ; Create Edit menu $hEdit = _GUICtrlMenu_CreateMenu() _GUICtrlMenu_AddMenuItem($hEdit, "&Cut", $e_idCut) _GUICtrlMenu_AddMenuItem($hEdit, "C&opy", $e_idCopy) _GUICtrlMenu_AddMenuItem($hEdit, "&Paste", $e_idPaste) ; Create Help menu $hHelp = _GUICtrlMenu_CreateMenu() _GUICtrlMenu_AddMenuItem($hHelp, "&About", $e_idAbout) ; Create Main menu $hMain = _GUICtrlMenu_CreateMenu() _GUICtrlMenu_AddMenuItem($hMain, "&File", 0, $hFile) _GUICtrlMenu_AddMenuItem($hMain, "&Edit", 0, $hEdit) _GUICtrlMenu_AddMenuItem($hMain, "&Help", 0, $hHelp) ; Set window menu _GUICtrlMenu_SetMenu($hGUI, $hMain) $idButton_ModeChange = GUICtrlCreateButton("ModeChange", 150, 85, 125, 25) $hStatusBar = _GUICtrlStatusBar_Create($hGUI) GUIRegisterMsg($WM_SIZE, "Example_WM_SIZE") GUISetState(@SW_SHOW) $hGUIStayleDefault = GUIGetStyle ($hGUI) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ExitLoop Case $idButton_ModeChange If $sMainGUI_Mode = "FullScreen" Then $sMainGUI_Mode = "Windowed" GUISetStyle ($hGUIStayleDefault[0], $hGUIStayleDefault[1],$hGUI) Else $sMainGUI_Mode = "FullScreen" GUISetStyle ($WS_POPUP, -1,$hGUI) EndIf $binModeChange = True _SendMessage($hGUI, $WM_SIZE) EndSwitch WEnd EndFunc ;==>Example Func Example_WM_SIZE($hWnd, $iMsg, $wParam, $lParam) Local $aSize_GUI = WinGetClientSize($hGUI), $aSize_Control If Not @error Then Switch $sMainGUI_Mode Case "Windowed" If $binModeChange Then GUICtrlSetState($hMain, $GUI_ENABLE + $GUI_SHOW) _GUICtrlStatusBar_ShowHide ( $hStatusBar, @SW_SHOW ) _GUICtrlStatusBar_Resize($hStatusBar) WinMove($hGUI, "", @DesktopWidth/2 - 200, @DesktopHeight/2 - 150, 400, 300) $aSize_GUI = WinGetClientSize($hGUI) If @error Then Return $GUI_RUNDEFMSG $binModeChange = False EndIf Case "FullScreen" If $binModeChange Then GUICtrlSetState($hMain, $GUI_DISABLE + $GUI_HIDE) _GUICtrlStatusBar_ShowHide ( $hStatusBar, @SW_HIDE ) WinMove($hGUI, "", -2, -2, @DesktopWidth+2, @DesktopHeight+2) $aSize_GUI = WinGetClientSize($hGUI) If @error Then Return $GUI_RUNDEFMSG $binModeChange = False EndIf EndSwitch EndIf Return $GUI_RUNDEFMSG EndFunc ;Code below was generated by: 'File to Base64 String' Code Generator v1.20 Build 2015-01-20 Func _Base64String_Icon01() Local $Base64String $Base64String &= 'F7oAAAABAAMAICABAXAgAKgQAAA2IAAAABgYA3iICWgAAN4ATBAADAE8aAAEAABmGgAAKHMAjADIAEAADAEuUQAlgBcMAiobDwFSXAEUADkmFxAbEwwALgYDAUwxHAsAeQwIBEVIN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CcLIHp3pCi70DWQA0FhPMhD/b8wCkUf/+qzv/+oCiKv+cUAyhsQEwzWkMq3IP9GVgOyAUcS0YCTKYJREABgE6Hgspo2EALcndjUb/5pQAP//7niT95YBAF8SkUQwpMj9YABAgokUCv+qdAj9wFp7/w3Uv9QBiMxWrUykQhwBuORivt2kx9ADGdjr/zHs4/wD3nCX/o1IKjQH9CbpYAdblkzEA///cq//sr2kA/7NiLf+vYC8BNgDGdTL/9bdoAP/+r0X/bzAAg3ITCQDSbBKm/nBZIPa8fvv+MAT2xgKI8LFd/9uZWP8A77Ru//SwY/MA1Xsuh8xyJY8InU0MfszacykQANZwJmPBYyFAgOWUMf/+4bnwoABo3vO4eej90cCV/41IFFjfMg8AAL5QBhHjhjWkANKERZu9cjgDANt3LUbTcShCs58CBwD8TzAA0N3okD050N4AgJAXwTGw3QABBsHA4jAAB4EAAAIPERlwAqBKMwA/AADgAH8AAA==' $Base64String = _WinAPI_Base64Decode($Base64String) Local $tSource = DllStructCreate('byte[' & BinaryLen($Base64String) & ']') DllStructSetData($tSource, 1, $Base64String) Local $tDecompress _WinAPI_LZNTDecompress($tSource, $tDecompress, 7886) $tSource = 0 Local Const $bString = Binary(DllStructGetData($tDecompress, 1)) Return $bString EndFunc ;==>_Base64String Func _WinAPI_Base64Decode($sB64String) Local $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "ptr", 0, "dword*", 0, "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(1, 0, "") Local $bBuffer = DllStructCreate("byte[" & $aCrypt[5] & "]") $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "struct*", $bBuffer, "dword*", $aCrypt[5], "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(2, 0, "") Return DllStructGetData($bBuffer, 1) EndFunc ;==>_WinAPI_Base64Decode Func _WinAPI_LZNTDecompress(ByRef $tInput, ByRef $tOutput, $iBufferSize) $tOutput = DllStructCreate("byte[" & $iBufferSize & "]") If @error Then Return SetError(1, 0, 0) Local $aRet = DllCall("ntdll.dll", "uint", "RtlDecompressBuffer", "ushort", 0x0002, "struct*", $tOutput, "ulong", $iBufferSize, "struct*", $tInput, "ulong", DllStructGetSize($tInput), "ulong*", 0) If @error Then Return SetError(2, 0, 0) If $aRet[0] Then Return SetError(3, $aRet[0], 0) Return $aRet[6] EndFunc ;==>_WinAPI_LZNTDecompress
  7. Is there a way to make regexp v8.x pattern so word boundary is recognized even if spaces replaced by underscore in the subject string? Is it possible in 10.* version? How?
  8. i'm trying to add custom menu items to explorer context menu for some arc-file-extentions, but it not working (in XP) Windows Registry Editor Version 5.00 ;cascading context menu - use empty lines between registry items ;separator before: "CommandFlags"=dword:00000020 ;SubCommands contains keys to be found in the registry - should match [HKEY_CLASSES_ROOT\.zip\shell\ArcRePack cascade menu] "MUIVerb"="Arc Re-Pack to..." "Icon"="D:\\Program\\ShellMenu\\ArcRePack.exe" "SubCommands"="ArcRePack1;ArcRePack2;ArcRePack3" [HKEY_CLASSES_ROOT\.lha\shell\ArcRePack cascade menu] "MUIVerb"="Arc Re-Pack to..." "Icon"="D:\\Program\\ShellMenu\\ArcRePack.exe" "SubCommands"="ArcRePack1;ArcRePack2;ArcRePack3" [HKEY_CLASSES_ROOT\.lzh\shell\ArcRePack cascade menu] "MUIVerb"="Arc Re-Pack to..." "Icon"="D:\\Program\\ShellMenu\\ArcRePack.exe" "SubCommands"="ArcRePack1;ArcRePack2;ArcRePack3" [HKEY_CLASSES_ROOT\.rar\shell\ArcRePack cascade menu] "MUIVerb"="Arc Re-Pack to..." "Icon"="D:\\Program\\ShellMenu\\ArcRePack.exe" "SubCommands"="ArcRePack1;ArcRePack2;ArcRePack3" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ArcRePack1] @="" "MUIVerb"="RePack AsIs" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ArcRePack1\command] @="\"REPACK_STATUS=ASIS\" \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ArcRePack2] @="" "MUIVerb"="RePack to Compact" "CommandFlags"=dword:00000020 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ArcRePack2\command] @="\"REPACK_STATUS=COMPACT\" \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ArcRePack3] @="" "MUIVerb"="RePack to Standart" "CommandFlags"=dword:00000020 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ArcRePack3\command] @="\"REPACK_STATUS=STANDART\" \"%1\"" is there a simple way to do it in XP? Hard way - it would be to create custom Creating Context Menu Handlers/shell extension handler. But cannot find any good examples...
  9. I try to restore some garbled UTF-8 symbols in HTML. Originally it was UTF-8 encoding, but it seems transfer or save with local 1-byte encoding broken some non-ANSI symbols. It should be possible to restore it with script - at least online services successfully do it. #include <String.au3> #include <FileConstants.au3> $Cont = 0 $hAC = FileOpen("C:\Temp\ERRtext.htm", $FO_UTF8) $sHTMLSourceCode = FileRead($hAC) FileClose($hAC) $SymbolRaw = "" $aSymbol = StringSplit($sHTMLSourceCode,"") For $i = 0 To UBound($aSymbol)-1 $Symbol = AscW( $aSymbol[$i]) If $Symbol > 127 Then if $Cont Then ConsoleWrite("," & $Symbol) $SymbolRaw &= $aSymbol[$i] Else $SymbolRaw &= $aSymbol[$i] ConsoleWrite("> : " & $Symbol) EndIf $Cont = 1 Else if $Cont Then ConsoleWrite(@TAB & " : {" & $SymbolRaw & "} : " & _StringToHex ( $SymbolRaw ) & @CRLF) EndIf $SymbolRaw = "" $Cont = 0 EndIf Next ConsoleWrite(@CRLF & @CRLF & @CRLF) Output: > : 1074,1026,8482 : {’} : D0B2D082E284A2; --> ;&#8217 > : 1043,169 : {é} : D093C2A9; --> ;&#233 > : 1043,169 : {é} : D093C2A9; --> ;&#233 > : 1074,1026,8482 : {’} : D0B2D082E284A2; --> ;&#8217 > : 1074,1026,8482 : {’} : D0B2D082E284A2; --> ;&#8217 > : 1074,1026,8482 : {’} : D0B2D082E284A2; --> ;&#8217 > : 1074,8482,1026 : {♀} : D0B2E284A2D082; --> ;&#9792 Combinations can be replaced as symbols I deducted just by learning , but I wanted script to decode symbols algorithmic. Maybe there a some sources to read about text restoring...
  10. hmm... I got wrong impression from _WD_DownloadFile() from wd_helper.au3... So it also possible to get headers sent/received after navigate action?
  11. Is there a way - function or command to get source code of currently displayed web page directly from browser? Not by separately downloading it.
  12. Thanks! I didn't see it... but now error changed to: ! SQLite.au3 Error --> Function: _SQLite_Exec --> Query: UPDATE OR IGNORE ImgDelta SET LinkHash = SourceDB.CasheDB.LinkHash, LocalPath = SourceDB.CasheDB.LocalPath WHERE NOT EXISTS (SELECT DestinDB.CasheDB.LinkHash FROM DestinDB.CasheDB WHERE DestinDB.CasheDB.LinkHash = SourceDB.CasheDB.LinkHash) --> Error: no such column: SourceDB.CasheDB.LinkHash which is wrong - those columns identical to all tables...
  13. I need to copy difference between 2 db-s into temp memory db make something with it and then copy entries from memory db to one of the two db-s, but update statement return error in whatever form i try: $SQLITE_OPEN_URI = 0x40 #include <MsgBoxConstants.au3> #include <SQLite.au3> $sPathTo_SourceDB = "E:\Auto-it scripts\testDB_S.sqlite" $sPathToSDB = StringRegExpReplace($sPathTo_SourceDB, "\\", "/") $sPathToSDB = StringRegExpReplace($sPathToSDB, "\h", "%20") $sPathTo_DestinDB = "E:\Auto-it scripts\testDB_D.sqlite" $sPathToDDB = StringRegExpReplace($sPathTo_DestinDB, "\\", "/") $sPathToDDB = StringRegExpReplace($sPathToDDB, "\h", "%20") Local $aResult, $iRows, $iColumns, $iRval _SQLite_StartupEX2("sqlite3.dll") $hDb = _SQLite_Open(':memory:',$SQLITE_OPEN_READWRITE + $SQLITE_OPEN_URI) _SQLite_Exec($hDb,"BEGIN; CREATE TABLE IF NOT EXISTS DeltaDB (HKey TEXT PRIMARY KEY NOT NULL, HVal TEXT COLLATE NOCASE);COMMIT;") _SQLite_Exec($hDb,"ATTACH DATABASE 'file:///" & $sPathToSDB & "?cache=private&mode=ro' AS SourceDB;") _SQLite_Exec($hDb,"ATTACH DATABASE 'file:///" & $sPathToDDB & "?cache=private&mode=rw' AS DestinDB;") _SQLite_Exec($hDb,"UPDATE OR IGNORE DeltaDB SET HKey = SourceDB.CasheDB.HKey, HVal = SourceDB.CasheDB.HVal WHERE NOT EXIST " & _ "(SELECT DestinDB.CasheDB.HKey FROM DestinDB.CasheDB WHERE DestinDB.CasheDB.HKey = SourceDB.CasheDB.HKey)") $iRval = _SQLite_GetTable2d($hDb, "SELECT * FROM DeltaDB;", $aResult, $iRows, $iColumns) If $iRval = $SQLITE_OK Then _SQLite_Display2DResult($aResult) Else MsgBox($MB_SYSTEMMODAL, "SQLite Error: " & $iRval, _SQLite_ErrMsg()) EndIf _SQLite_Close($hDb) _SQLite_Shutdown() ! SQLite.au3 Error --> Function: _SQLite_Exec --> Query: UPDATE OR IGNORE ImgDelta SET LinkHash = SourceDB.CasheDB.LinkHash, LocalPath = SourceDB.CasheDB.LocalPath WHERE NOT EXIST (SELECT DestinDB.CasheDB.LinkHash FROM DestinDB.CasheDB WHERE DestinDB.CasheDB.LinkHash = SourceDB.CasheDB.LinkHash) --> Error: near "SELECT": syntax error how i can correct this query?
  14. I need to clean up text with xml tags from some attributes. Problem is - the random order those attributes placed. It would be simple if use 1 regexp for 1 attribute clearance, but it's not effective. So target is one complex pattern: to clear attributes attr7,attr2 and attr5 from : "<xmlTag attr0="aaa" attr1="bbb" attr2="ccc" attr3="ddd" attr4="eee" attr5="fff" attr6="ggg" attr7="hhh" attr7="iii" />" Not working: $sPreFilter = StringRegExpReplace(ClipGet(),"(?si)(\A.+?<xmlTag[^>]+?)(\attr7=[\x22\x27\x60][^\x22\x27\x60]++[\x22\x27\x60]|attr2=[\x22\x27\x60][^\x22\x27\x60]++[\x22\x27\x60]|attr5=[\x22\x27\x60][^\x22\x27\x60]++[\x22\x27\x60])([^>]+?>.+\z)","$1 $3") Is it possible use (and how) reset start of match "\K" for it?
×
×
  • Create New...