Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/21/2024 in Posts

  1. Just uploaded SciTEx86.zip & SciTEx64.zip which contain the Latest SciTE 5.5.2 versions released today.
    2 points
  2. Removed post and downloads for now. ... but am not able to replicate the problem and for me SciTE is opening fine. Did you check that all 3 files are replaced and no other instance of SciTE is open? Are you using the x86 or x64 version? tnx for reporting
    1 point
  3. #include <String.au3> #include <array.au3> #Include "ZLIB.au3" ; https://www.autoitscript.com/forum/topic/128962-zlib-deflateinflategzip-udf/page/2/#comments Extract_Embedded_Files_from_PDF_Documents() func Extract_Embedded_Files_from_PDF_Documents() dim $fileopendialog = FileOpenDialog("","", "Pdf(*.pdf)") if @error then return seterror (1,"","") dim $file = FileOpen($fileopendialog,16) dim $chars_binary=fileread($file) FileClose($file) dim $chars_string=BinaryToString($chars_binary) dim $array_0[0][2] dim $array_1[0][2] dim $stringsplit=stringsplit($chars_string,"endobj",1+2) for $a=0 to ubound($stringsplit)-1 $stringsplit[$a]=stringreplace($stringsplit[$a],chr(10),"",1) if stringleft($stringsplit[$a],2)="3 " then dim $_StringBetween_obj=_StringBetween($stringsplit[$a],"3 0 obj","") if not @error Then dim $_StringBetween_stream=_StringBetween($_StringBetween_obj[0],"stream"&@lf,@lf&"endstream") Dim $Decompressed = _ZLIB_Uncompress($_StringBetween_stream[0]) $chars_string=BinaryToString($Decompressed) dim $_StringBetween=_StringBetween($chars_string,"<<",">>") for $b=0 to ubound($_StringBetween)-1 dim $cell_0,$cell_1 $_StringBetween[$b]=stringreplace($_StringBetween[$b],chr(10),"") if stringleft($_StringBetween[$b],4)="/F (" then dim $_StringBetween_1=_StringBetween($_StringBetween[$b],"(",")") if not @error then $cell_1=$_StringBetween_1[0] dim $_StringBetween_0=_StringBetween($_StringBetween[$b],"<</F "," 0 R") if not @error then $cell_0=$_StringBetween_0[0] dim $aFill[1][2] = [[$cell_0, $cell_1]] _arrayadd($array_1,$aFill) endif next endif endif dim $_StringBetween_obj=_StringBetween($stringsplit[$a]," 0 obj"&chr(10)&"<<"&chr(10)&"/DL ","") if not @error Then dim $checksum=_StringBetween($stringsplit[$a],"/CheckSum (",")"&@lf) dim $_StringBetween_stream=_StringBetween($_StringBetween_obj[0],"stream"&@lf,@lf&"endstream") if not @error Then dim $StringToBinary=StringToBinary ($_StringBetween_stream[0]) Dim $Decompressed = _ZLIB_Uncompress($StringToBinary) $chars_string=BinaryToString($Decompressed) dim $StringInStr=StringInStr($stringsplit[$a]," ") dim $stringleft=stringleft($stringsplit[$a],$StringInStr-1) $stringleft=StringStripWS($stringleft,8) dim $aFill[1][2] = [[$stringleft, $chars_string]] _arrayadd($array_0,$aFill) endif endif next dim $dircreate=$fileopendialog&".Extract_Embedded_Files" dim $filecreate=false for $i=0 to ubound($array_0)-1 for $a=0 to ubound($array_1)-1 if $array_0[$i][0]=$array_1[$a][0] then if not FileExists($dircreate) then dircreate($dircreate) dim $filewrite = FileOpen($dircreate&"\"&$array_1[$a][1],2+16) filewrite($filewrite,$array_0[$i][1]) fileclose($filewrite) $filecreate=true continueloop endif next next if $filecreate=true then shellexecute($dircreate) endfunc
    1 point
  4. Not tested as a fully script but something like this: #include <Array.au3> #include <GuiListView.au3> ; Create GUI here $aList1 = ListColumnToArray($cList1, 1) ; $cList1 - handle or ctrl id of the first list $aList2 = ListColumnToArray($cList2, 1) ; $cList2 - handle or ctrl id of the second list For $Index = 1 To $aList1[0] _ArraySearch($aList2, StringReplace($aList1[$Index], '.kml', '.srt')) If Not @error Then _GUICtrlListView_DeleteItem($cList1, $Index - 1) Next Func ListColumnToArray($List, $Column) Local $sData If $Column > _GUICtrlListView_GetColumnCount($List) Then Return SetError(1, 0, Null) Local $NumOfItems = _GUICtrlListView_GetItemCount($List) For $Index = 0 To $NumOfItems - 1 $sData &= _GUICtrlListView_GetItemText($List, $Index, $Column) & '|' Next Return StringSplit(StringTrimRight($sData, 1), '|') EndFunc
    1 point
  5. ; #STRUCTURE# =================================================================================================================== ; Name...........: $tagHELPINFO ; Description ...: Contains information about an item for which context-sensitive Help has been requested ; Fields ........: Size - The structure size, in bytes ; ContextType - The type of context for which Help is requested. This member can be one of the following values: ; HELPINFO_WINDOW = 1: Help requested for a control or window. ; HELPINFO_MENUITEM = 2: Help requested for a menu item. ; CtrlID - The identifier of the window or control if ContextType is HELPINFO_WINDOW, ; or identifier of the menu item if ContextType is HELPINFO_MENUITEM ; ItemHandle - The identifier of the child window or control if ContextType is HELPINFO_WINDOW, ; or identifier of the associated menu if ContextType is HELPINFO_MENUITEM. ; ContextID - The help context identifier of the window or control. ; PointX - X position that of the mouse at the time the event occurred ; PointY - Y position that of the mouse at the time the event occurred ; Author ........: funkey ; Remarks .......: ; =============================================================================================================================== Global Const $tagHELPINFO = "uint Size;int ContextType;int CtrlID;handle ItemHandle;dword ContextID;int PointX;int PointY" Global Const $MB_HELP = 0x4000 Opt("GUIOnEventMode", 1) Global $Toggle = False #Region Help GUI Global $hGuiHelp = GUICreate("Help-GUI", 220, 100, -1, -1, 0x80880000, 0x00000088) GUISetBkColor(0xFFFFE1) ;tooltip color GUICtrlCreateLabel("Help for abort button", 10, 10) GUICtrlCreateLabel("Help for retry button", 10, 30) GUICtrlCreateLabel("Help for ignore button", 10, 50) #EndRegion Help GUI Global $hGui = GUICreate("Main Application") GUISetOnEvent(-3, "_Exit") GUIRegisterMsg(0x0053, "_Help") ;WM_HELP Global $Button = GUICtrlCreateButton("Show MsgBox", 50, 50) GUICtrlSetOnEvent(-1, "_Show_MsgBox") GUISetState() While 1 Sleep(20000) WEnd Func _Help($hWnd, $Msg, $wParam, $lParam) Local $tInfo, $ContextType, $CtrlID, $ItemHandle, $ContextID, $X, $Y $tInfo = DllStructCreate($tagHELPINFO, $lParam) $ContextType = DllStructGetData($tInfo, "ContextType") $CtrlID = DllStructGetData($tInfo, "CtrlID") $ItemHandle = HWnd(DllStructGetData($tInfo, "ItemHandle")) $ContextID = DllStructGetData($tInfo, "ContextID") $X = DllStructGetData($tInfo, "PointX") $Y = DllStructGetData($tInfo, "PointY") ConsoleWrite("ContextType: " & $ContextType & @CR) ConsoleWrite("CtrlID: " & $CtrlID & @CR) ConsoleWrite("ItemHandle: " & $ItemHandle & @CR) ConsoleWrite("ContextID: " & $ContextID & @CR) ConsoleWrite("PointX: " & $X & @CR) ConsoleWrite("PointY: " & $Y & @CR & @CR) Local $aPos = ControlGetPos($ItemHandle, "", $CtrlID) $Toggle = Not $Toggle If $Toggle Then _ClientToScreen($ItemHandle, $aPos[0], $aPos[1]) WinMove($hGuiHelp, "", $aPos[0], $aPos[1] + $aPos[3]) GUISetState(@SW_SHOW, $hGuiHelp) Switch StringRight(@OSLang, 2) Case "07" ;german ControlSetText($ItemHandle, "", $CtrlID, "Schließe Hilfe") Case "09" ;english ControlSetText($ItemHandle, "", $CtrlID, "Close Help") EndSwitch Else GUISetState(@SW_HIDE, $hGuiHelp) Switch StringRight(@OSLang, 2) Case "07" ;german ControlSetText($ItemHandle, "", $CtrlID, "Hilfe") Case "09" ;english ControlSetText($ItemHandle, "", $CtrlID, "Help") EndSwitch EndIf EndFunc Func _Show_MsgBox() Local $ret = MsgBox($MB_HELP + 2 + 48, "Hello","What do you want to do?", 0, $hGui) ConsoleWrite($ret & @cr) GUISetState(@SW_HIDE, $hGuiHelp) $Toggle = False EndFunc ; Convert the client (GUI) coordinates to screen (desktop) coordinates Func _ClientToScreen($hWnd, ByRef $x, ByRef $y) Local $stPoint = DllStructCreate("int;int") DllStructSetData($stPoint, 1, $x) DllStructSetData($stPoint, 2, $y) DllCall("user32.dll", "int", "ClientToScreen", "hwnd", $hWnd, "ptr", DllStructGetPtr($stPoint)) $x = DllStructGetData($stPoint, 1) $y = DllStructGetData($stPoint, 2) ; release Struct not really needed as it is a local $stPoint = 0 EndFunc ;==>_ClientToScreen Func _Exit() Exit EndFunc I hope someone can need this.
    1 point
×
×
  • Create New...