Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/28/2016 in all areas

  1. @6401integramandj Welcome to the forums. Here are a few methods manipulating strings. (Don't worry about the regular expressions (RegExp) examples if you don't understand them. You are not alone. ) #include <FileConstants.au3> CreateTest01Txt() $sFile = FileRead("test01.txt") ; ================= StringMid with StringInStr on @CR of 4th line ======== $iStartFifthLine = StringInStr($sFile, @CR, 0, 4) + 2 ; 2 is for the 2 characters, @CR and @LF, at end of line #4 $iEndFifthLine = StringInStr($sFile, @CR, 0, 5) ConsoleWrite(StringMid($sFile, $iStartFifthLine + 11, $iEndFifthLine - ($iStartFifthLine + 11)) & @CRLF) ; 11 is for first 11 characters on line #5. ; ======================================================================== ;Or ; ================== StringMid with StringInStr on 2nd occurrence of "\" in file ================= $iStartOfRequiredCharacters = StringInStr($sFile, "\", 0, 2) + 1 ; Find second occurring "\" character. ; And, 1 is for the first character after the found "\" character. ConsoleWrite(StringMid($sFile, $iStartOfRequiredCharacters, $iEndFifthLine - $iStartOfRequiredCharacters) & @CRLF) ; ================================================================================================= ;Or ; ============ RegExp 4 lines then match last occurrence of "\" on that line. ======= ConsoleWrite(StringRegExpReplace($sFile, "(?:\V*\v+){4}.+\\(.+)(?s).*", "$1") & @CRLF) ; "(?:\V*\v+){4}.+\\" - Match the first 4 lines, "(?:\V*\v+){4}", (non-capture group, no backreference), and all the characters, ; except linefeeds, on the next (5th) line, up to and including the last "\" character on that line., ".+\\". ; "(.+)" - Capture all characters that are not linefeeds. This is the first capture group and is referenced to by ; backreference 1, "\1" or "$1" or "${1}". ; "(?s)" - From here on when matching characters the dot, ".", will also match linefeed characters. ; ".*" - Match all characters (including the linefeed at the end of the fifth line) to the end of the file. ; Parameter "replace" = "$1" - As the entire file is matched, the text of the entire file is replaced with backreference 1. ; =================================================================================== ;Or ; ================= RegExp match to last occurrence of "\" in file ================= ConsoleWrite(StringRegExpReplace($sFile, "(?s).+\\(\V+).*", "\1") & @CRLF) ; "\V" - Matches any character that is not a vertical whitespace character (a linefeed). ; ================================================================================== ;Or ; =============== RegExp match to last occurrence of "MyDomain\\" in file ========== ConsoleWrite(StringRegExpReplace($sFile, "(?s).+MyDomain\\(\V+).*", "${1}") & @CRLF) ; ================================================================================= FileDelete(@ScriptDir & "\test01.txt") Func CreateTest01Txt() Local $hFile = FileOpen(@ScriptDir & "\test01.txt", $FO_OVERWRITE) If ($hFile) Then FileWrite($hFile, "#TYPE System.Security.Principal.SecurityIdentifier" & @CRLF & _ "BinaryLength,AccountDomainSid,Value" & @CRLF & _ "Some Fill In Text" & @CRLF & _ ",,MyDomain\Domain Admins" & @CRLF & _ ",,MyDomain\ABC" & @CRLF & @CRLF & @CRLF & @CRLF & @CRLF & @CRLF & _ ";ABC=Username") FileClose($hFile) EndIf EndFunc ;==>CreateTest01Txt #cs ; Returns:- ABC ABC ABC ABC ABC #ce
    2 points
  2. MrCreatoR

    MouseOnEvent UDF!

    This UDF allows to set an events handler for Mouse device. The beginning... I searched for a way to disable the Mouse Primary click, and be able to call some function when the click event is received... Big thanks to amel27 for this one, i only organized the whole stuff to UDF style. Example: #include <GUIConstantsEx.au3> #include "MouseOnEvent.au3" HotKeySet("{ESC}", "_Quit") _Example_Intro() _Example_Limit_Window() Func _Example_Intro() MsgBox(64, "Attention!", "Let's set event function for mouse wheel *scrolling* up and down", 5) ;Set event function for mouse wheel *scrolling* up/down and primary button *down* action (call our function when the events recieved) _MouseSetOnEvent($MOUSE_WHEELSCROLLDOWN_EVENT, "_MouseWheel_Events") _MouseSetOnEvent($MOUSE_WHEELSCROLLUP_EVENT, "_MouseWheel_Events") _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT, "_MousePrimaryDown_Event") Sleep(3000) ;UnSet the events _MouseSetOnEvent($MOUSE_WHEELSCROLLDOWN_EVENT) _MouseSetOnEvent($MOUSE_WHEELSCROLLUP_EVENT) _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT) ToolTip("") MsgBox(64, "Attention!", "Now let's disable Secondary mouse button up action, and call our event function.", 5) _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT, "_MouseSecondaryUp_Event", 0, 1) Sleep(5000) _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT) ToolTip("") EndFunc Func _Example_Limit_Window() Local $hGUI = GUICreate("MouseOnEvent UDF Example - Restrict events on specific window") GUICtrlCreateLabel("Try to click on that specific GUI window", 40, 40, 300, 30) GUICtrlSetFont(-1, 12, 800) GUICtrlCreateLabel("Press <ESC> to exit", 10, 10) GUISetState() _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT, "_MousePrimaryDown_Event", $hGUI) ;A little(?) bugie when you mix different events :( ;_MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT, "_MouseSecondaryUp_Event", $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $GUI_EVENT_PRIMARYDOWN MsgBox(0, "", "Should not be shown ;)") EndSwitch WEnd _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT) ;_MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT) EndFunc Func _MouseWheel_Events($iEvent) Switch $iEvent Case $MOUSE_WHEELSCROLLDOWN_EVENT ToolTip("Wheel Mouse Button (scrolling) DOWN Blocked") Case $MOUSE_WHEELSCROLLUP_EVENT ToolTip("Wheel Mouse Button (scrolling) UP Blocked") EndSwitch Return $MOE_BLOCKDEFPROC ;Block EndFunc Func _MousePrimaryDown_Event() ToolTip("Primary Mouse Button Down Blocked") Return $MOE_BLOCKDEFPROC ;Block EndFunc Func _MouseSecondaryUp_Event() ToolTip("Secondary Mouse Button Up Blocked") EndFunc Func _Quit() Exit EndFunc Available Events Constants: ------------------------------------------ CHANGELOG: Download: Attached: MouseOnEvent_2.4.zip Old version: MouseOnEvent.zip - v2.3 MouseOnEvent_2.1.zip MouseOnEvent_2.0.zip MouseOnEvent_UDF_1.9.zip MouseSetOnEvent_UDF_1.8.zip MouseSetOnEvent_UDF_1.7.zip MouseSetOnEvent_UDF_1.6.zip MouseSetOnEvent_UDF_1.5.zip MouseSetOnEvent_UDF_1.4.zip MouseSetOnEvent_UDF_1.3.zip Previous downloads: 146 + 200 + 804 MouseOnEvent.zip MouseOnEvent.zip
    1 point
  3. Dhilip89

    HTML Entity UDF

    Hello, I just made an UDF for Encoding/Decoding the string and HTML Entity Number. HTML.au3: #include-once #include <Array.au3> Dim $Entity[65536] $Entity[34] = "quot" $Entity[38] = "amp" $Entity[39] = "apos" $Entity[60] = "lt" $Entity[62] = "gt" $Entity[160] = "nbsp" $Entity[161] = "iexcl" $Entity[162] = "cent" $Entity[163] = "pound" $Entity[164] = "curren" $Entity[165] = "yen" $Entity[166] = "brvbar" $Entity[167] = "sect" $Entity[168] = "uml" $Entity[169] = "copy" $Entity[170] = "ordf" $Entity[171] = "laquo" $Entity[172] = "not" $Entity[173] = "shy" $Entity[174] = "reg" $Entity[175] = "macr" $Entity[176] = "deg" $Entity[177] = "plusmn" $Entity[178] = "sup2" $Entity[179] = "sup3" $Entity[180] = "acute" $Entity[181] = "micro" $Entity[182] = "para" $Entity[183] = "middot" $Entity[184] = "cedil" $Entity[185] = "sup1" $Entity[186] = "ordm" $Entity[187] = "raquo" $Entity[188] = "frac14" $Entity[189] = "frac12" $Entity[190] = "frac34" $Entity[191] = "iquest" $Entity[192] = "Agrave" $Entity[193] = "Aacute" $Entity[194] = "Acirc" $Entity[195] = "Atilde" $Entity[196] = "Auml" $Entity[197] = "Aring" $Entity[198] = "AElig" $Entity[199] = "Ccedil" $Entity[200] = "Egrave" $Entity[201] = "Eacute" $Entity[202] = "Ecirc" $Entity[203] = "Euml" $Entity[204] = "Igrave" $Entity[205] = "Iacute" $Entity[206] = "Icirc" $Entity[207] = "Iuml" $Entity[208] = "ETH" $Entity[209] = "Ntilde" $Entity[210] = "Ograve" $Entity[211] = "Oacute" $Entity[212] = "Ocirc" $Entity[213] = "Otilde" $Entity[214] = "Ouml" $Entity[215] = "times" $Entity[216] = "Oslash" $Entity[217] = "Ugrave" $Entity[218] = "Uacute" $Entity[219] = "Ucirc" $Entity[220] = "Uuml" $Entity[221] = "Yacute" $Entity[222] = "THORN" $Entity[223] = "szlig" $Entity[224] = "agrave" $Entity[225] = "aacute" $Entity[226] = "acirc" $Entity[227] = "atilde" $Entity[228] = "auml" $Entity[229] = "aring" $Entity[230] = "aelig" $Entity[231] = "ccedil" $Entity[232] = "egrave" $Entity[233] = "eacute" $Entity[234] = "ecirc" $Entity[235] = "euml" $Entity[236] = "igrave" $Entity[237] = "iacute" $Entity[238] = "icirc" $Entity[239] = "iuml" $Entity[240] = "eth" $Entity[241] = "ntilde" $Entity[242] = "ograve" $Entity[243] = "oacute" $Entity[244] = "ocirc" $Entity[245] = "otilde" $Entity[246] = "ouml" $Entity[247] = "divide" $Entity[248] = "oslash" $Entity[249] = "ugrave" $Entity[250] = "uacute" $Entity[251] = "ucirc" $Entity[252] = "uuml" $Entity[253] = "yacute" $Entity[254] = "thorn" $Entity[255] = "yuml" $Entity[338] = "OElig" $Entity[339] = "oelig" $Entity[352] = "Scaron" $Entity[353] = "scaron" $Entity[376] = "Yuml" $Entity[402] = "fnof" $Entity[710] = "circ" $Entity[732] = "tilde" $Entity[913] = "Alpha" $Entity[914] = "Beta" $Entity[915] = "Gamma" $Entity[916] = "Delta" $Entity[917] = "Epsilon" $Entity[918] = "Zeta" $Entity[919] = "Eta" $Entity[920] = "Theta" $Entity[921] = "Iota" $Entity[922] = "Kappa" $Entity[923] = "Lambda" $Entity[924] = "Mu" $Entity[925] = "Nu" $Entity[926] = "Xi" $Entity[927] = "Omicron" $Entity[928] = "Pi" $Entity[929] = "Rho" $Entity[931] = "Sigma" $Entity[932] = "Tau" $Entity[933] = "Upsilon" $Entity[934] = "Phi" $Entity[935] = "Chi" $Entity[936] = "Psi" $Entity[937] = "Omega" $Entity[945] = "alpha" $Entity[946] = "beta" $Entity[947] = "gamma" $Entity[948] = "delta" $Entity[949] = "epsilon" $Entity[950] = "zeta" $Entity[951] = "eta" $Entity[952] = "theta" $Entity[953] = "iota" $Entity[954] = "kappa" $Entity[955] = "lambda" $Entity[956] = "mu" $Entity[957] = "nu" $Entity[958] = "xi" $Entity[959] = "omicron" $Entity[960] = "pi" $Entity[961] = "rho" $Entity[962] = "sigmaf" $Entity[963] = "sigma" $Entity[964] = "tau" $Entity[965] = "upsilon" $Entity[966] = "phi" $Entity[967] = "chi" $Entity[968] = "psi" $Entity[969] = "omega" $Entity[977] = "thetasym" $Entity[978] = "upsih" $Entity[982] = "piv" $Entity[8194] = "ensp" $Entity[8195] = "emsp" $Entity[8201] = "thinsp" $Entity[8204] = "zwnj" $Entity[8205] = "zwj" $Entity[8206] = "lrm" $Entity[8207] = "rlm" $Entity[8211] = "ndash" $Entity[8212] = "mdash" $Entity[8216] = "lsquo" $Entity[8217] = "rsquo" $Entity[8218] = "sbquo" $Entity[8220] = "ldquo" $Entity[8221] = "rdquo" $Entity[8222] = "bdquo" $Entity[8224] = "dagger" $Entity[8225] = "Dagger" $Entity[8226] = "bull" $Entity[8230] = "hellip" $Entity[8240] = "permil" $Entity[8242] = "prime" $Entity[8243] = "Prime" $Entity[8249] = "lsaquo" $Entity[8250] = "rsaquo" $Entity[8254] = "oline" $Entity[8260] = "frasl" $Entity[8364] = "euro" $Entity[8465] = "image" $Entity[8472] = "weierp" $Entity[8476] = "real" $Entity[8482] = "trade" $Entity[8501] = "alefsym" $Entity[8592] = "larr" $Entity[8593] = "uarr" $Entity[8594] = "rarr" $Entity[8595] = "darr" $Entity[8596] = "harr" $Entity[8629] = "crarr" $Entity[8656] = "lArr" $Entity[8657] = "uArr" $Entity[8658] = "rArr" $Entity[8659] = "dArr" $Entity[8660] = "hArr" $Entity[8704] = "forall" $Entity[8706] = "part" $Entity[8707] = "exist" $Entity[8709] = "empty" $Entity[8711] = "nabla" $Entity[8712] = "isin" $Entity[8713] = "notin" $Entity[8715] = "ni" $Entity[8719] = "prod" $Entity[8721] = "sum" $Entity[8722] = "minus" $Entity[8727] = "lowast" $Entity[8730] = "radic" $Entity[8733] = "prop" $Entity[8734] = "infin" $Entity[8736] = "ang" $Entity[8743] = "and" $Entity[8744] = "or" $Entity[8745] = "cap" $Entity[8746] = "cup" $Entity[8747] = "int" $Entity[8756] = "there4" $Entity[8764] = "sim" $Entity[8773] = "cong" $Entity[8776] = "asymp" $Entity[8800] = "ne" $Entity[8801] = "equiv" $Entity[8804] = "le" $Entity[8805] = "ge" $Entity[8834] = "sub" $Entity[8835] = "sup" $Entity[8836] = "nsub" $Entity[8838] = "sube" $Entity[8839] = "supe" $Entity[8853] = "oplus" $Entity[8855] = "otimes" $Entity[8869] = "perp" $Entity[8901] = "sdot" $Entity[8968] = "lceil" $Entity[8969] = "rceil" $Entity[8970] = "lfloor" $Entity[8971] = "rfloor" $Entity[9001] = "lang" $Entity[9002] = "rang" $Entity[9674] = "loz" $Entity[9824] = "spades" $Entity[9827] = "clubs" $Entity[9829] = "hearts" $Entity[9830] = "diams" ;=============================================================================== ; ; Function Name: _HTMLEncode() ; Description: Encode the normal string into HTML Entity Number ; Parameter(s): $String - The string you want to encode. ; ; Requirement(s): AutoIt v3.2.4.9 or higher (Unicode) ; Return Value(s): On Success - Returns HTML Entity Number ; On Failure - Nothing ; ; Author(s): Dhilip89 ; ;=============================================================================== Func _HTMLEncode($Str) $StrLen = StringLen($Str) Local $Encoded If $StrLen = 0 Then Return '' For $i = 1 To $StrLen $StrChar = StringMid($Str, $i, 1) $Encoded &= '&#' & AscW($StrChar) & ';' Next Return $Encoded EndFunc ;==>_HTMLEncode ;=============================================================================== ; ; Function Name: _HTMLDecode() ; Description: Decode the HTML Entity Number into normal string ; Parameter(s): $HTMLEntityNum - The HTML Entity Number you want to decode. ; ; Requirement(s): AutoIt v3.2.4.9 or higher (Unicode) ; Return Value(s): On Success - Returns decoded strings ; On Failure - Nothing ; ; Author(s): Dhilip89 ; ;=============================================================================== Func _HTMLDecode($Str) Local $Decoded If $Str = '' Then Return '' $X1 = StringRegExp($Str, '&#x(.*?);', 3) $X2 = StringRegExp($Str, '&#(.*?);', 3) $X3 = StringRegExp($Str, '&(.*?);', 3) For $i = 0 To UBound($X1) - 1 Step 1 $Str = StringReplace($Str, '&#x' & $X1[$i] & ';', ChrW(Dec($X1[$i]))) Next For $i = 0 To UBound($X2) - 1 Step 1 $Str = StringReplace($Str, '&#' & $X2[$i] & ';', ChrW($X2[$i])) Next For $i = 0 To UBound($X3) - 1 Step 1 $Str = StringReplace($Str, '&' & $X3[$i] & ';', ChrW(_ArraySearch($Entity, $X3[$i], 0, 0, 1))) Next $Decoded = $Str Return $Decoded EndFunc ;==>_HTMLDecode Download: HTML.au3
    1 point
  4. wakillon

    Soon in the sky

    #NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon='' #AutoIt3Wrapper_Outfile=Fireworks.exe #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_UPX_Parameters=--best --lzma #AutoIt3Wrapper_UseX64=n ; titchysid.dll id 32 bit #AutoIt3Wrapper_Res_Description=Fireworks + Music #AutoIt3Wrapper_Res_Fileversion=1.0.1 #AutoIt3Wrapper_Res_LegalCopyright=wakillon #AutoIt3Wrapper_Res_Field='Compiled with'|'AutoIt Version 3.3.14.2' #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y #AutoIt3Wrapper_Run_After=move /y "%out%" "Fireworks.scr" #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #Region ;************ Includes ************ #Include <WindowsConstants.au3> #include <AutoitObject.au3> ; https://www.autoitscript.com/forum/topic/110379-autoitobject-udf/ #include <WINAPI.au3> #Include <Memory.au3> #EndRegion ;************ Includes ************ HotKeySet ( '{ESC}', '_Exit' ) ; SWF Constants from SWF.au3 by trancexx. https://www.autoitscript.com/forum/topic/126608-flash-matic/ Global $dtagIPersist = $dtagIUnknown & "GetClassID hresult(ptr*);" Global $dtagIPersistStream = $dtagIPersist & "IsDirty hresult(ptr);Load hresult(ptr);Save hresult(ptr;bool);GetSizeMax hresult(uint64*);" Global Const $sIID_IPersistStreamInit = "{7FD52380-4E07-101B-AE2D-08002B2EC713}" Global $dtagIPersistStreamInit = $dtagIPersistStream & "InitNew hresult();" Global $dtagISequentialStream = $dtagIUnknown & "Read hresult(ptr;dword;dword*);Write hresult(ptr;dword;dword*);" Global $dtagIStream = $dtagISequentialStream & "Seek hresult(int64;dword;int64);SetSize hresult(int64);CopyTo hresult(ptr;int64;int64*;int64*);Commit hresult(dword);" & _ "Revert none();LockRegion hresult(int64;int64;dword);UnlockRegion hresult(int64;int64;dword);Stat hresult(ptr;dword);Clone hresult(ptr*);" ; Memory constants from MemoryDll.au3 by Ward. https://www.autoitscript.com/forum/topic/77463-embed-dlls-in-script-and-call-functions-from-memory-memorydll-udf/ Global Const $tagIMAGE_DOS_HEADER = 'WORD e_magic;WORD e_cblp;WORD e_cp;WORD e_crlc;WORD e_cparhdr;WORD e_minalloc;WORD e_maxalloc;WORD e_ss;WORD e_sp;WORD e_csum;WORD e_ip;WORD e_cs;WORD e_lfarlc;WORD e_ovno;WORD e_res[4];' & _ 'WORD e_oemid;WORD e_oeminfo;WORD e_res2[10];LONG e_lfanew;' Global Const $tagIMAGE_FILE_HEADER = 'WORD Machine;WORD NumberOfSections;DWORD TimeDateStamp;DWORD PointerToSymbolTable;DWORD NumberOfSymbols;WORD SizeOfOptionalHeader;WORD Characteristics;' Global $tagIMAGE_OPTIONAL_HEADER = 'WORD Magic;BYTE MajorLinkerVersion;BYTE MinorLinkerVersion;DWORD SizeOfCode;DWORD SizeOfInitializedData;DWORD SizeOfUninitializedData;DWORD AddressOfEntryPoint;DWORD BaseOfCode;DWORD BaseOfData;' & _ 'PTR ImageBase;DWORD SectionAlignment;DWORD FileAlignment;WORD MajorOperatingSystemVersion;WORD MinorOperatingSystemVersion;WORD MajorImageVersion;WORD MinorImageVersion;WORD MajorSubsystemVersion;WORD MinorSubsystemVersion;' & _ 'DWORD Win32VersionValue;DWORD SizeOfImage;DWORD SizeOfHeaders;DWORD CheckSum;WORD Subsystem;WORD DllCharacteristics;PTR SizeOfStackReserve;PTR SizeOfStackCommit;PTR SizeOfHeapReserve;PTR SizeOfHeapCommit;DWORD LoaderFlags;DWORD NumberOfRvaAndSizes;' Global Const $tagIMAGE_NT_HEADER = 'DWORD Signature;' & $tagIMAGE_FILE_HEADER & $tagIMAGE_OPTIONAL_HEADER Global Const $tagIMAGE_SECTION_HEADER = 'CHAR Name[8];DWORD VirtualSize;DWORD VirtualAddress;DWORD SizeOfRawData;DWORD PointerToRawData;DWORD PointerToRelocations;DWORD PointerToLinenumbers;WORD NumberOfRelocations;WORD NumberOfLinenumbers;' & _ 'DWORD Characteristics;' Global Const $tagIMAGE_DATA_DIRECTORY = 'DWORD VirtualAddress;DWORD Size;' Global Const $tagIMAGE_BASE_RELOCATION = 'DWORD VirtualAddress;DWORD SizeOfBlock;' Global Const $tagIMAGE_IMPORT_DESCRIPTOR = 'DWORD OriginalFirstThunk;DWORD TimeDateStamp;DWORD ForwarderChain;DWORD Name;DWORD FirstThunk;' Global Const $tagIMAGE_IMPORT_BY_NAME = 'WORD Hint;char Name[1];' Global Const $tagIMAGE_EXPORT_DIRECTORY = 'DWORD Characteristics;DWORD TimeDateStamp;WORD MajorVersion;WORD MinorVersion;DWORD Name;DWORD Base;DWORD NumberOfFunctions;DWORD NumberOfNames;DWORD AddressOfFunctions;DWORD AddressOfNames;' & _ 'DWORD AddressOfNameOrdinals;' Global $_KERNEL32DLL = DllOpen ( 'kernel32.dll' ) Global $_MFHookPtr, $_MFHookBak, $_MFHookApi = 'LocalCompact' Global Const $tagModule = 'PTR ExportList;PTR CodeBase;PTR ImportList;PTR DllEntry;DWORD Initialized;' Global $_BinaryCall_Msvcrtdll = DllOpen ( 'msvcrt.dll' ) ; Sid Constants used in SIDOpen from TitchySID Player. https://www.autoitscript.com/forum/topic/169098-chiptunes-players/ Global Const $SID_RESOURCE = 0 ; Load SID file from resources Global Const $SID_MEMORY = 1 ; Load SID file from memory Global Const $SID_DEFAULT = 1 ; Play default sub song, as found in the PSID header Global Const $SID_NON_DEFAULT = 2 ; Play specified sub song ; Internal variables. Global $hTitchysidDll, $bin, $oShockwaveFlash, $iPos, $iSizeData, $vVar, $hGui, $TransColor = 0xABCDEF Global $oError = ObjEvent ( 'AutoIt.Error', '_ErrFunc' ) AutoItWinSetTitle ( 'Fireworks.Swf.Example' ) If _ScriptIsAlreadyRunning() Then Exit _AutoItObject_Startup() $oShockwaveFlash = ObjCreate( 'ShockwaveFlash.ShockwaveFlash' ) If Not IsObj ( $oShockwaveFlash ) Then Exit -1 $hGui = GUICreate( '', @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, BitOR ( $WS_EX_LAYERED, $WS_EX_TOPMOST ), WinGetHandle ( AutoItWinGetTitle() ) ) ;~ GUISetBkColor( $TransColor ) GUICtrlCreateObj( $oShockwaveFlash, 0, 0, @DesktopWidth, @DesktopHeight ) ; choice : ;~ $vVar = FireworksTransSwf() ; Transparent Background $vVar = FireworksBlackswf() ; Black Background _FlashLoadMemory( $oShockwaveFlash, $vVar, $iSizeData, $iPos ) _WinAPI_SetLayeredWindowAttributes( $hGui, $TransColor, 255 ) GUISetState() $hTitchysidDll = _SIDStartup() If Not @error Then $bin = Beat_Popsid() ; 16_Beat_Pop.sid _SIDOpen ( $bin, $SID_RESOURCE ) EndIf While 1 Sleep ( 1000 ) WEnd Func _ErrFunc() ConsoleWrite ( 'COM Error, ScriptLine(' & $oError.scriptline & ') : Number 0x' & Hex ( $oError.number, 8 ) & ' - ' & $oError.windescription & @CRLF ) EndFunc ;==> _ErrFunc() Func _Exit() _SIDStop() _SIDClose() _SIDShutdown() $oShockwaveFlash = 0 GUIDelete( $hGui ) Exit EndFunc ;==> _Exit() Func _FlashLoadMemory($oShockwaveFlash, ByRef $vData, ByRef $iSizeData, ByRef $iPos) If Not IsObj($oShockwaveFlash) Then Return SetError(1, 0, False) Local $oFlashInterface = _AutoItObject_WrapperCreate(_AutoItObject_IDispatchToPtr($oShockwaveFlash), $dtagIUnknown) If Not IsObj($oFlashInterface) Then Return SetError(2, 0, False) Local $oFlashMemoryStream = _AutoItObject_ObjectFromDtag("_FlashMemoryStream_", $dtagIStream) Local $tIID_IPersistStreamInit = _AutoItObject_CLSIDFromString($sIID_IPersistStreamInit) Local $aCall = $oFlashInterface.QueryInterface(Number(DllStructGetPtr($tIID_IPersistStreamInit)), 0) Local $pPersistStreamInit = $aCall[2] Local $oPersistStreamInit = _AutoItObject_WrapperCreate($pPersistStreamInit, $dtagIPersistStreamInit) $oPersistStreamInit.InitNew() $iPos = 0 $iSizeData = BinaryLen($vData) $oPersistStreamInit.Load(Number($oFlashMemoryStream.__ptr__)) _AutoItObject_IUnknownAddRef($oShockwaveFlash) Return True EndFunc ;==>_FlashLoadMemory Func _FlashMemoryStream_Read($pSelf, $pBuffer, $iCb, $pRead) #forceref $pSelf If $iPos = 0 And $iCb = 4 Then DllStructSetData(DllStructCreate("char[4]", $pBuffer), 1, "fUfU") $iPos += 4 ElseIf $iPos = 4 And $iCb = 4 Then DllStructSetData(DllStructCreate("dword", $pBuffer), 1, $iSizeData) $iSizeData += 8 $iPos += 4 Else If $iPos + $iCb > $iSizeData Then $iCb = $iSizeData - $iPos If $iCb = 0 Then Return 1 DllStructSetData(DllStructCreate("byte[" & $iCb & "]", $pBuffer), 1, BinaryMid($vVar, 1 + $iPos - 8, $iCb)) If $pRead Then DllStructSetData(DllStructCreate("dword", $pRead), 1, $iCb) $iPos += $iCb EndIf Return 0 EndFunc ;==>_FlashMemoryStream_Read Func _FlashMemoryStream_Release($pSelf) #forceref $pSelf Return 0x80004001 EndFunc ;==>_FlashMemoryStream_Release Func _ScriptIsAlreadyRunning() Local $aWinList = WinList ( AutoItWinGetTitle() ) If Not @error Then Return UBound ( $aWinList ) -1 > 1 EndFunc ;==> _ScriptIsAlreadyRunning() Func _SIDClose() Local $aRet = MemoryDllCall ( $hTitchysidDll, 'int', 'SIDClose' ) If @error Then Return SetError ( @error, 0, 0 ) Return $aRet[0] EndFunc ;==> _SIDClose() Func _SIDOpen ( $Sid, $iSubsong=1 ) Local $bSid If Not IsBinary ( $Sid ) Then If Not FileExists ( $Sid ) Then Return SetError ( 2, 0, 0 ) Local $hFileOpen = FileOpen ( $Sid, 0 ) If $hFileOpen = -1 Then Return SetError ( -1, 0, 0 ) $bSid = FileRead ( $hFileOpen ) FileClose ( $hFileOpen ) Else $bSid = $Sid EndIf Local $tSid = DllStructCreate ( 'byte[' & BinaryLen ( $bSid ) & ']') DllStructSetData ( $tSid, 1, $bSid ) Local $iSubsongCount = Int ( StringTrimLeft ( BinaryMid ( $bSid, 15, 2 ), 2 ) ) $iSubsong = $iSubsong -1 ; based 0 If $iSubsong < 0 Then $iSubsong = 0 If $iSubsong > $iSubsongCount Then $iSubsong = 0 Local $aRet = MemoryDllCall ( $hTitchysidDll, 'int', 'SIDOpen', 'ptr', DllStructGetPtr ( $tSid ), 'int', DllStructGetSize ( $tSid ), 'int', $SID_MEMORY, 'int', $SID_NON_DEFAULT, 'int', $iSubsong ) If @error Then Return SetError ( @error, 0, 0 ) $tSid = 0 $bSid = 0 Return $aRet[0] ; Returns non-zero on success. EndFunc ;==> _SIDOpen() Func _SIDShutdown() MemoryDllClose ( $hTitchysidDll ) $hTitchysidDll = 0 EndFunc ;==> _SIDShutdown() Func _SIDStartup() Local $hOpen = MemoryDllOpen ( Titchysiddll() ) If $hOpen = -1 Then Return SetError ( 1, 0, 0 ) Return SetError ( 0, 0, $hOpen ) EndFunc ;==> _SIDStartup() Func _SIDStop() Local $aRet = MemoryDllCall ( $hTitchysidDll, 'int', 'SIDStop' ) If @error Then Return SetError ( @error, 0, 0 ) Return $aRet[0] EndFunc ;==> _SIDStop() Func API_FreeLibrary ( $Module ) Local $Ret = DllCall ( $_KERNEL32DLL, 'bool', 'FreeLibrary', 'handle', $Module ) If @Error Then Return SetError ( @Error, @Extended, 0 ) Return $Ret[0] EndFunc ;==> API_FreeLibrary() Func API_GetProcAddress ( $Module, $Procname ) Local $Ret If IsNumber ( $Procname ) Then $Ret = DllCall ( $_KERNEL32DLL, 'ptr', 'GetProcAddress', 'handle', $Module, 'int', $Procname ) Else $Ret = DllCall ( $_KERNEL32DLL, 'ptr', 'GetProcAddress', 'handle', $Module, 'str', $Procname ) EndIf If @Error Then Return SetError ( @Error, @Extended, 0 ) Return $Ret[0] EndFunc ;==> API_GetProcAddress() Func API_IsBadReadPtr ( $Ptr, $Len ) Local $Ret = DllCall ( $_KERNEL32DLL, 'int', 'IsBadReadPtr', 'ptr', $Ptr, 'UINT_PTR', $Len ) If @Error Then Return SetError ( @Error, @Extended, 0 ) Return $Ret[0] EndFunc ;==> API_IsBadReadPtr() Func API_LoadLibrary ( $Filename ) Local $Ret = DllCall ( $_KERNEL32DLL, 'handle', 'LoadLibraryW', 'wstr', $Filename ) If @Error Then Return SetError ( @Error, @Extended, 0 ) Return $Ret[0] EndFunc ;==> API_LoadLibrary() Func API_lstrlenA ( $Address ) Local $Ret = DllCall ( $_KERNEL32DLL, 'int', 'lstrlenA', 'ptr', $Address ) If @Error Then Return SetError ( @Error, @Extended, 0 ) Return $Ret[0] EndFunc ;==> API_lstrlenA() Func API_lstrlenW ( $Address ) Local $Ret = DllCall ( $_KERNEL32DLL, 'int', 'lstrlenW', 'ptr', $Address ) If @Error Then Return SetError ( @Error, @Extended, 0 ) Return $Ret[0] EndFunc ;==> API_lstrlenW() Func API_VirtualProtect ( $Address, $Size, $Protection ) Local $Ret = DllCall ( $_KERNEL32DLL, 'bool', 'VirtualProtect', 'ptr', $Address, 'dword_ptr', $Size, 'dword', $Protection, 'dword*', 0 ) If @Error Then Return SetError ( @Error, @Extended, 0 ) Return $Ret[0] EndFunc ;==> API_VirtualProtect() Func API_ZeroMemory ( $Address, $Size ) Local $Ret = DllCall ( $_KERNEL32DLL, 'none', 'RtlZeroMemory', 'ptr', $Address, 'dword_ptr', $Size ) If @Error Then Return SetError ( @Error, @Extended, 0 ) Return $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H5+KS1+fiYrfn4mJH5+fn5+fn5+KX5+figpLSQwfn5+MC0rLSl+fn4mfn4kfn5+fn5+fn6CKX4pKSl+KX4pfil+KX4pfi1+LS0tfi0tLX4tLS1+LX45fn5+fn5+fjAyNDA5OTUyMH5+fn5+fn5+fn5+fn5+fn9ohMk5PH5+yTk8fn7JNzl+yTs+fsk5PH5+fn7JNjl+fn7JNjl+fsk5PH7JNDd+fn5+fn6BNTc5foQ8fn48fn45fj5+PH5+fn45fn5+OX5+PH433wd+fn5+fn5/s9UIK3nSVhoaGxsbGxw=' $sFileBin = Binary ( __Au3Obj_Mem_Base64Decode ( $sFileBin ) ) Return SetError ( 0, 0, $sFileBin ) EndFunc ;==> Beat_Popsid() Func BinaryCall_Alloc ( $Code, $Padding = 0 ) Local $Length = BinaryLen ( $Code ) + $Padding Local $Ret = DllCall ( $_KERNEL32DLL, 'ptr', 'VirtualAlloc', 'ptr', 0, 'ulong_ptr', $Length, 'dword', 0x1000, 'dword', 0x40 ) If @Error Or Not $Ret[0] Then Return SetError ( 1, @Error, 0 ) If BinaryLen ( $Code ) Then Local $Buffer = DllStructCreate ( 'byte[' & $Length & ']', $Ret[0] ) DllStructSetData ( $Buffer, 1, $Code ) EndIf Return $Ret[0] EndFunc ;==> BinaryCall_Alloc() Func BinaryCall_Base64Decode ( $Src ) Static $CodeBase If Not $CodeBase Then $CodeBase = BinaryCall_Create ( '0x55B9FF00000089E531C05756E8F10000005381EC0C0100008B55088DBDF5FEFFFFF3A4E9C00000003B45140F8FC20000000FB65C0A028A9C1DF5FEFFFF889DF3FEFFFF0FB65C0A038A9C1DF5FEFFFF889DF2FEFFFF0FB65C0A018985E8FEFFFF0FB69C1DF5FEFFFF899DECFEFFFF0FB63C0A89DE83E630C1FE040FB6BC3DF5FEFFFFC1E70209FE8B7D1089F3881C074080BDF3FEFFFF63745C0FB6B5F3FEFFFF8BBDECFEFFFF8B9DE8FEFFFF89F083E03CC1E704C1F80209F88B7D1088441F0189D883C00280BDF2FEFFFF6374278A85F2FEFFFFC1E60683C10483E03F09F088441F0289D883C0033B4D0C0F8C37FFFFFFEB0231C081C40C0100005B5E5F5DC35EC3E8F9FFFFFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000003E0000003F3435363738393A3B3C3D00000063000000000102030405060708090A0B0C0D0E0F101112131415161718190000000000001A1B1C1D1E1F202122232425262728292A2B2C2D2E2F30313233', '', 132, True, False ) If Not $CodeBase Then Return SetError ( 1, 0, Binary ( '' ) ) EndIf $Src = String ( $Src ) Local $SrcLen = StringLen ( $Src ) Local $SrcBuf = DllStructCreate ( 'char[' & $SrcLen & ']' ) DllStructSetData ( $SrcBuf, 1, $Src ) Local $DstLen = Int ( ( $SrcLen + 2 ) / 4 ) * 3 + 1 Local $DstBuf = DllStructCreate ( 'byte[' & $DstLen & ']' ) Local $Ret = DllCallAddress ( 'uint:cdecl', $CodeBase, 'ptr', DllStructGetPtr ( $SrcBuf ), 'uint', $SrcLen, 'ptr', DllStructGetPtr ( $DstBuf ), 'uint', $DstLen ) If $Ret[0] = 0 Then Return SetError ( 2, 0, Binary ( '' ) ) Return BinaryMid ( DllStructGetData ( $DstBuf, 1 ), 1, $Ret[0] ) EndFunc ;==> BinaryCall_Base64Decode() Func BinaryCall_CodePrepare ( $Code ) If Not $Code Then Return '' If IsBinary ( $Code ) Then Return $Code $Code = String ( $Code ) If StringLeft ( $Code, 2 ) = '0x' Then Return Binary ( $Code ) If StringIsXDigit ( $Code ) Then Return Binary ( '0x' & $Code ) Return BinaryCall_LzmaDecompress ( BinaryCall_Base64Decode ( $Code ) ) EndFunc ;==> BinaryCall_CodePrepare() Func BinaryCall_Create ( $Code, $Reloc = '', $Padding = 0, $ReleaseOnExit = True, $LibraryImport = True ) Local $BinaryCode = BinaryCall_CodePrepare ( $Code ) If Not $BinaryCode Then Return SetError ( 1, BinaryCall_LastError ( 'Invalid code' ), 0 ) Local $BinaryCodeLen = BinaryLen ( $BinaryCode ) Local $TotalCodeLen = $BinaryCodeLen + $Padding Local $CodeBase = BinaryCall_Alloc ( $BinaryCode, $Padding ) If Not $CodeBase Then Return SetError ( 2, BinaryCall_LastError ( 'Unable to allocate memory block' ), 0 ) If $Reloc Then $Reloc = BinaryCall_CodePrepare ( $Reloc ) If Not $Reloc Then Return SetError ( 3, BinaryCall_LastError ( 'Invalid relocation table' ), 0 ) BinaryCall_Relocation ( $CodeBase, $Reloc ) EndIf If $LibraryImport Then If Not BinaryCall_ImportLibrary ( $CodeBase, $BinaryCodeLen ) Then BinaryCall_Free ( $CodeBase ) Return SetError ( 4, 0, 0 ) EndIf EndIf If $ReleaseOnExit Then BinaryCall_ReleaseOnExit ( $CodeBase ) EndIf Return SetError ( 0, $TotalCodeLen, $CodeBase ) EndFunc ;==> BinaryCall_Create() Func BinaryCall_DoRelease() BinaryCall_ReleaseOnExit_Handle() EndFunc ;==> BinaryCall_DoRelease() Func BinaryCall_Free ( $Ptr ) Local $Ret = DllCall ( $_KERNEL32DLL, 'bool', 'VirtualFree', 'ptr', $Ptr, 'ulong_ptr', 0, 'dword', 0x8000 ) If @Error Or $Ret[0] = 0 Then $Ret = DllCall ( $_KERNEL32DLL, 'bool', 'GlobalFree', 'ptr', $Ptr ) If @Error Or $Ret[0] <> 0 Then Return SetError ( 1, @Error, False ) EndIf Return True EndFunc ;==> BinaryCall_Free() Func BinaryCall_GetProcAddress ( $Module, $Proc ) Local $Ret = DllCall ( $_KERNEL32DLL, 'ptr', 'GetProcAddress', 'ptr', $Module, 'str', $Proc ) If @Error Or Not $Ret[0] Then Return SetError ( 1, @Error, 0 ) Return $Ret[0] EndFunc ;==> BinaryCall_GetProcAddress() Func BinaryCall_ImportLibrary ( $Base, $Length ) ;~ Static $HasMemoryDll = IsFunc(Execute ( '__MemoryModule_RuntimeLoader' ) ) Local $JmpBin, $JmpOff, $JmpLen, $DllName, $ProcName $JmpBin = Binary ( '0xB8FFFFFFFFFFE0' ) $JmpOff = 1 $JmpLen = BinaryLen ( $JmpBin ) Local $Ptr, $StringPtr, $StringLen, $String, $Split, $Proc, $Diff, $Handle Do $Ptr = BinaryCall_MemorySearch ( $Base, $Length, $JmpBin ) If $Ptr = 0 Then ExitLoop $StringPtr = $Ptr + $JmpLen $StringLen = BinaryCall_lstrlenA ( $StringPtr ) If Not $StringLen Then Return SetError ( 3, BinaryCall_LastError ( 'Invalid import table' ), False ) $String = DllStructGetData ( DllStructCreate ( 'char[' & $StringLen & ']', $StringPtr ), 1 ) $Split = StringSplit ( $String, '|' ) If $Split[0] = 1 Then $ProcName = $Split[1] ElseIf $Split[0] = 2 Then If $Split[1] Then $DllName = $Split[1] $ProcName = $Split[2] EndIf If $DllName And $ProcName Then $Proc = 0 $Handle = BinaryCall_LoadLibrary ( $DllName ) If Not $Handle Then Return SetError ( 1, BinaryCall_LastError ( 'LoadLibrary fail on ' & $DllName ), False ) $Proc = BinaryCall_GetProcAddress ( $Handle, $ProcName ) If Not $Proc Then Return SetError ( 2, BinaryCall_LastError ( 'GetProcAddress failed on ' & $ProcName ), False ) DllStructSetData(DllStructCreate ( 'ptr', $Ptr + $JmpOff ), 1, $Proc ) EndIf $Diff = Int ( $Ptr - $Base + $JmpLen + $StringLen + 1 ) $Base += $Diff $Length -= $Diff Until $Length <= $JmpLen Return True EndFunc ;==> BinaryCall_ImportLibrary() Func BinaryCall_IsBadReadPtr ( $Ptr, $Length ) Local $Ret = DllCall ( $_KERNEL32DLL, 'int', 'IsBadReadPtr', 'ptr', $Ptr, 'uint_ptr', $Length ) If @Error Then Return SetError ( 1, @Error, 0 ) Return $Ret[0] EndFunc ;==> BinaryCall_IsBadReadPtr() Func BinaryCall_LastError ( $Error = Default ) Static $LastError If IsKeyword ( $Error ) Then Return $LastError $LastError = $Error EndFunc ;==> BinaryCall_LastError() Func BinaryCall_LoadLibrary ( $Filename ) Local $Ret = DllCall ( $_KERNEL32DLL, 'handle', 'LoadLibraryW', 'wstr', $Filename ) If @Error Then Return SetError ( 1, @Error, 0 ) Return $Ret[0] EndFunc ;==> BinaryCall_LoadLibrary() Func BinaryCall_lstrlenA ( $Ptr ) Local $Ret = DllCall ( $_KERNEL32DLL, 'int', 'lstrlenA', 'ptr', $Ptr ) If @Error Then Return SetError ( 1, @Error, 0 ) Return $Ret[0] EndFunc ;==> BinaryCall_lstrlenA() Func BinaryCall_LzmaDecompress ( $Src ) Static $CodeBase If Not $CodeBase Then $CodeBase = BinaryCall_Create ( BinaryCall_Base64Decode ( 'VYnlVzH/VlOD7EyLXQiKC4D54A+HxQAAADHA6wWD6S2I0ID5LI1QAXfziEXmMcDrBYPpCYjQgPkIjVABd/OIReWLRRSITeSLUwkPtsmLcwWJEA+2ReUBwbgAAwAA0+CNhABwDgAAiQQk6EcEAACJNCSJRdToPAQAAItV1InHi0Xkhf+JArgBAAAAdDaF9nQyi0UQg8MNiRQkiXQkFIl8JBCJRCQYjUXgiUQkDItFDIlcJASD6A2JRCQI6CkAAACLVdSJRdSJFCToAQQAAItF1IXAdAqJPCQx/+jwAwAAg8RMifhbXl9dw1dWU1WJ5YtFJAFFKFD8i3UYAXUcVot1FK2SUopO/oPI/9Pg99BQiPGDyP/T4PfQUADRifeD7AwpwEBQUFBQUFcp9laDy/+4AAMAANPgjYg2BwAAuAAEAATR6fOragVZ6MoCAADi+Yt9/ItF8Ct9JCH4iUXosADoywIAAA+FhQAAAIpN9CN97NPngOkI9tnT7lgB916NPH/B5wg8B1qNjH5sDgAAUVa+AAEAAFCwAXI0i338K33cD7Y/i23M0eeJ8SH+AfGNbE0A6JgCAACJwcHuCIPhATnOvgABAAB1DjnwctfrDIttzOh5AgAAOfBy9FqD+gSJ0XIJg/oKsQNyArEGKcpS60mwwOhJAgAAdRRYX1pZWln/NCRRUrpkBgAAsQDrb7DM6CwCAAB1LLDw6BMCAAB1U1g8B7AJcgKwC1CLdfwrddw7dSQPgs8BAACsi338qumOAQAAsNjo9wEAAIt12HQbsOTo6wEAAIt11HQJi3XQi03UiU3Qi03YiU3Ui03ciU3YiXXcWF9ZumgKAACxCAH6Ulc8B4jIcgIEA1CLbczovAEAAHUUi0Xoi33MweADKclqCF6NfEcE6zWLbcyDxQLomwEAAHUYi0Xoi33MweADaghZaghejbxHBAEAAOsQvwQCAAADfcxqEFm+AAEAAIlN5CnAQIn96GYBAACJwSnxcvMBTeSDfcQED4OwAAAAg0XEB4tN5IP5BHIDagNZi33IweEGKcBAakBejbxPYAMAAIn96CoBAACJwSnxcvOJTeiJTdyD+QRyc4nOg2XcAdHug03cAk6D+Q5zGbivAgAAKciJ8dJl3ANF3NHgA0XIiUXM6y2D7gToowAAANHr0WXcOV3gcgb/RdwpXeBOdei4RAYAAANFyIlFzMFl3ARqBF4p/0eJ+IttzOi0AAAAqAF0Awl93NHnTnXs6wD/RdyLTeSDwQKLffyJ+CtFJDlF3HdIif4rddyLVSisqjnXcwNJdfeJffwPtvA7fSgPgnH9///oKAAAACnAjWwkPItVIIt1+Ct1GIkyi1Usi338K30kiTrJW15fw15YKcBA69qB+wAAAAFyAcPB4whWi3X4O3Ucc+SLReDB4AisiUXgiXX4XsOLTcQPtsDB4QQDRegByOsGD7bAA0XEi23IjWxFACnAjWxFAIH7AAAAAXMci0wkOMFkJCAIO0wkXHOcihH/RCQ4weMIiFQkIInZD7dVAMHpCw+vyjlMJCBzF4nLuQAIAAAp0cHpBWYBTQABwI1sJEDDweoFKUwkICnLZilVAAHAg8ABjWwkQMO4///////gbXN2Y3J0LmRsbHxtYWxsb2MAuP//////4GZyZWUA' ) ) If Not $CodeBase Then Return SetError ( 1, 0, Binary ( '' ) ) EndIf $Src = Binary ( $Src ) Local $SrcLen = BinaryLen ( $Src ) Local $SrcBuf = DllStructCreate ( 'byte[' & $SrcLen & ']' ) DllStructSetData ( $SrcBuf, 1, $Src ) Local $Ret = DllCallAddress ( 'ptr:cdecl', $CodeBase, 'ptr', DllStructGetPtr ( $SrcBuf ), 'uint_ptr', $SrcLen, 'uint_ptr*', 0, 'uint*', 0 ) If $Ret[0] Then Local $DstBuf = DllStructCreate ( 'byte[' & $Ret[3] & ']', $Ret[0] ) Local $Output = DllStructGetData ( $DstBuf, 1 ) DllCall ( $_BinaryCall_Msvcrtdll, 'none:cdecl', 'free', 'ptr', $Ret[0] ) Return $Output EndIf Return SetError(2, 0, Binary ( '' ) ) EndFunc ;==> BinaryCall_LzmaDecompress() Func BinaryCall_MemorySearch ( $Ptr, $Length, $Binary ) Static $CodeBase If Not $CodeBase Then $CodeBase = BinaryCall_Create ( '0x5589E58B4D14578B4508568B550C538B7D1085C9742139CA721B29CA8D341031D2EB054239CA740F8A1C17381C1074F34039F076EA31C05B5E5F5DC3', '', 0, True, False ) If Not $CodeBase Then Return SetError ( 1, 0, 0 ) EndIf $Binary = Binary ( $Binary ) Local $Buffer = DllStructCreate ( 'byte[' & BinaryLen ( $Binary ) & ']' ) DllStructSetData ( $Buffer, 1, $Binary ) Return DllCallAddress ( 'ptr:cdecl', $CodeBase, 'ptr', $Ptr, 'uint', $Length, 'ptr', DllStructGetPtr ( $Buffer ), 'uint', DllStructGetSize ( $Buffer ) )[0] EndFunc ;==> BinaryCall_MemorySearch() Func BinaryCall_RegionSize ( $Ptr ) Local $Buffer = DllStructCreate ( 'ptr;ptr;dword;uint_ptr;dword;dword;dword' ) Local $Ret = DllCall ( $_KERNEL32DLL, 'int', 'VirtualQuery', 'ptr', $Ptr, 'ptr', DllStructGetPtr ( $Buffer ), 'uint_ptr', DllStructGetSize ( $Buffer ) ) If @Error Or $Ret[0] = 0 Then Return SetError ( 1, @Error, 0 ) Return DllStructGetData ( $Buffer, 4 ) EndFunc ;==> BinaryCall_RegionSize() Func BinaryCall_ReleaseOnExit ( $Ptr ) OnAutoItExitRegister ( 'BinaryCall_DoRelease' ) BinaryCall_ReleaseOnExit_Handle ( $Ptr ) EndFunc ;==> BinaryCall_ReleaseOnExit() Func BinaryCall_ReleaseOnExit_Handle ( $Ptr = Default ) Static $PtrList If @NumParams = 0 Then If IsArray ( $PtrList ) Then For $i = 1 To $PtrList[0] BinaryCall_Free ( $PtrList[$i] ) Next EndIf Else If Not IsArray($PtrList) Then Local $InitArray[1] = [0] $PtrList = $InitArray EndIf If IsPtr($Ptr) Then Local $Array = $PtrList Local $Size = UBound ( $Array ) ReDim $Array[$Size + 1] $Array[$Size] = $Ptr $Array[0] += 1 $PtrList = $Array EndIf EndIf EndFunc ;==> BinaryCall_ReleaseOnExit_Handle() Func BinaryCall_Relocation ( $Base, $Reloc ) Local $Size = Int ( BinaryMid ( $Reloc, 1, 2 ) ) Local $Offset, $Ptr For $i = 3 To BinaryLen ( $Reloc ) Step $Size $Offset = Int(BinaryMid ( $Reloc, $i, $Size ) ) $Ptr = $Base + $Offset DllStructSetData ( DllStructCreate ( 'ptr', $Ptr ), 1, DllStructGetData ( DllStructCreate ( 'ptr', $Ptr ), 1 ) + $Base ) Next EndFunc ;==> BinaryCall_Relocation() Func BinaryCall_SymbolFind ( $CodeBase, $Identify, $Length, $BeforeJump = False ) Local $Ptr $Identify = Binary ( $Identify ) If BinaryCall_IsBadReadPtr ( $CodeBase, $Length ) Then Return SetError ( 2, 0, 0 ) If $BeforeJump Then $Ptr = BinaryCall_MemorySearch ( $CodeBase, $Length, $Identify & Binary ( '0xE9' ) ) If $Ptr Then Return $Ptr + BinaryLen ( $Identify ) $Ptr = BinaryCall_MemorySearch ( $CodeBase, $Length, $Identify & Binary ( '0xEB' ) ) If $Ptr Then Return $Ptr + BinaryLen ( $Identify ) Else $Ptr = BinaryCall_MemorySearch ( $CodeBase, $Length, $Identify ) If $Ptr Then Return $Ptr + BinaryLen ( $Identify ) EndIf Return SetError ( 1, 0, 0 ) EndFunc ;==> BinaryCall_SymbolFind() Func BinaryCall_SymbolList ( $CodeBase, $Symbol ) If UBound ( $Symbol, 0 ) <> 1 Then Return SetError ( 1, BinaryCall_LastError ( 'Invalid symbol array' ), 0 ) Local $Tag = '' For $i = 0 To UBound ( $Symbol ) - 1 $Tag &= 'ptr ' & $Symbol[$i] & ';' Next Local $SymbolList = DllStructCreate ( $Tag ) If @Error Then Return SetError(1, BinaryCall_LastError ( 'Invalid symbol' ), 0 ) Local $Length = BinaryCall_RegionSize ( $CodeBase ) If @Error Or Not $Length Then Return SetError ( 1, BinaryCall_LastError ( 'Invalid codebase' ), 0 ) Local $Locate For $i = 0 To UBound ( $Symbol ) - 1 $Locate = BinaryCall_SymbolFind ( $CodeBase, $Symbol[$i], $Length, True ) If @Error Then Return SetError(1, BinaryCall_LastError ( "Unable to find symbol: '" & $Symbol[$i] & "'" ), 0 ) DllStructSetData ( $SymbolList, $Symbol[$i], $Locate ) $Length -= $Locate - $CodeBase $CodeBase = $Locate Next Return $SymbolList EndFunc ;==> BinaryCall_SymbolList() Func FireworksBlackswf() Local $sFileBin = 'RldTBewXAAB4AAVfAAAPoAAAHgEAQwIAAAA/A1gAAACIDQACAGkAYW5pX2NsaXAAlgcACAAHAQAAAB2WAgAIAByWBQAHHgAAAEgSnQIAJwCWBgAIAQgBCAAcR5YHAAcAQAAACAAcRySWBAAIAAgAHFAdmQIAxP8APwhtAAAAAQBU/Cr8QPAFAP////8AZmZm/xCt1w7CbSAQAgAAAAD///////8QrdcOwm0gEAIA////////////EK3XDsJtIBACAP///wD//////wAwFNtfc857Wwk2ygxnbPPNvGoPk2rYDtmv3itfxZ2tAL8AMAAAAAIAPUWVFgABAGZmZgAQFM/DkNNASkASzNkzNuAkuAzzkzzAukAuNzkNzSAkSANNAP8J8QQAAAMAPACRBg4BAAEAAOjXNc10ACkKQAAAQACQBg0BAA6cAOWa2Gw+hQKAAABAAJAGDQEAEJoA5YTZbL1E4nAAAEAAkAYNAQAQ5gDlcNptO8TCYAAAQACRBg0BABKZAADlXNttukSiUAAAQACRBg0BABK+AADlSNttuQSiUAAAQACRBg0BABLjAADlNNxuN4SCQAAAQACRBg0BABSEAADlIN1utkRiMAAAQACRBg0BABSWgADlDt5vNMRCIAAAQACRBg0BABSogADk+t9vs4QiEAAAQACRBg0BABS6gADk5uBwMkQCAAAAQACRBg0BABTMAADk1OFwsMPh8AAAQACRBg0BABTeAADkwOFwr4Ph8AAAQACRBg0BABTvAADkruJxLkPB4AAAQACRBg0BABaAQADknONxrQOh0AAAQACRBg0BABaJAADkiORyK8OBwAAAQACRBg0BABaRgADkduVyqoNhsAAAQACRBg0BABaZwADkZOVyqUNhsAAAQACRBg0BABaiQADkUuZzKANBoAAAQACRBg0BABaqgADkQOdzpsMhkAAAQACRBg0BABaywADkMOh0JYMBgAAAQACRBg0BABa6wADkHuh0JEMBgAAAQACRBg0BABbDAADkDOl0owLhcAAAQACRBg0BABbLAADn/Op1IgLBYAAAQACRBg0BABbSwADn6ut1oMKhUAAAQACRBg0BABbawADn2ut1n4KhUAAAQACRBg0BABbigADnyux2HoKBQAAAQACRBg0BABbqAADnuO12nUJhMAAAQACRBg0BABbxwADnqO53HEJBIAAAQACRBg0BABb5QADnmO53GwJBIAAAQACRBg0BABiAYADniO93mgIhEAAAQACRBg0BABiEAADnePB4GMIBAAAAQACRBg0BABiHwADnaPB4F8IBAAAAQACRBg0BABiLYADnWvF4lsHg8AAAQACRBg0BABiO4ADnSvJ5FYHA4AAAQACRBg0BABiSYADnPPJ5FIHA4AAAQACRBg0BABiWAADnLPN5k4Gg0AAAQACRBg0BABiZYADnHvR6EoGAwAAAQACRBg0BABic4ADnDvR6EYGAwAAAQACRBg0BABigQADnAPV6kIFgsAAAQACRBg0BABijgADm8vV6j4FgsAAAQACRBg0BABim4ADm5PZ7DoFAoAAAQACRBg0BABiqIADm1vd7jYEgkAAAQACRBg0BABitYADmyPd7jIEgkAAAQACRBg0BABiwoADmuvh8C8EAgAAAQACRBg0BABizwADmrPh8CsEAgAAAQACRBg0BABi24ADmoPl8icDgcAAAQACRBg0BABi6AADmkvp9CMDAYAAAQACRBg0BABi9AADmhPp9CADAYAAAQACRBg0BABjAAADmePt9hwCgUAAAQACRBg0BABjDAADmbPt9hkCgUAAAQACRBg0BABjF4ADmXvx+BUCAQAAAQACRBg0BABjIwADmUvx+BICAQAAAQACRBg0BABjLoADmRv1+g4BgMAA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QABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAA/AwcAAACBAgAAAAYAQAD/CgMAAABsNABAAAIHAQCLBhYBAAkAGaWqcrYAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAD8DBwAAAIECAAAABgBAAAIHAQD/CgMAAABsNQCWBh4BAAkAGOqn7OgAAAAEAPs+wPAA4wBAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAD8DBwAAAIECAAAABgBAAAIHAQD/CgMAAABsNgCXBh4BAAkAG2AN/YDoMwzDNAAAL0JgAAkBQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAA/AwcAAACBAgAAAAYAQAAAAL8GEwAAACYBAAoAHKvh9ABhbmlfY2xpcAC/AB0AAAALAFAAuQALkAEAAAAA' $sFileBin &= 'ABAVS5Ll4KO4aO4Fy4VyAL8IUAAAAAwAAAoADwsAAQAABAAAAAgAgzsAaHR0cDovL3d3dy5hbWFyYXNvZnR3YXJlLmNvbS9mbGFzaC1pbnRyb3MtYW5kLWJhbm5lcnMuaHRtAAAAkAYOAwAMALW6zdYAaQBAEAAAQAAAAA==' $sFileBin = Binary ( __Au3Obj_Mem_Base64Decode ( $sFileBin ) ) Return SetError ( 0, 0, $sFileBin ) EndFunc ;==> FireworksBlackswf() Func FireworksTransSwf() Local $sFileBin = 'RldTBewXAAB4AAVfAAAPoAAAHgEAQwKrze8/A1gAAACIDQACAGkAYW5pX2NsaXAAlgcACAAHAQAAAB2WAgAIAByWBQAHHgAAAEgSnQIAJwCWBgAIAQgBCAAcR5YHAAcAQAAACAAcRySWBAAIAAgAHFAdmQIAxP8APwhtAAAAAQBU/Cr8QPAFAP////8AZmZm/xCt1w7CbSAQAgAAAAD///////8QrdcOwm0gEAIA////////////EK3XDsJtIBACAP///wD//////wAwFNtfc857Wwk2ygxnbPPNvGoPk2rYDtmv3itfxZ2tAL8AMAAAAAIAPUWVFgABAGZmZgAQFM/DkNNASkASzNkzNuAkuAzzkzzAukAuNzkNzSAkSANNAP8J8QQAAAMAPACRBg4BAAEAAOjXNc10ACkKQAAAQACQBg0BAA6cAOWa2Gw+hQKAAABAAJAGDQEAEJoA5YTZbL1E4nAAAEAAkAYNAQAQ5gDlcNptO8TCYAAAQACRBg0BABKZAADlXNttukSiUAAAQACRBg0BABK+AADlSNttuQSiUAAAQACRBg0BABLjAADlNNxuN4SCQAAAQACRBg0BABSEAADlIN1utkRiMAAAQACRBg0BABSWgADlDt5vNMRCIAAAQACRBg0BABSogADk+t9vs4QiEAAAQACRBg0BABS6gADk5uBwMkQCAAAAQACRBg0BABTMAADk1OFwsMPh8AAAQACRBg0BABTeAADkwOFwr4Ph8AAAQACRBg0BABTvAADkruJxLkPB4AAAQACRBg0BABaAQADknONxrQOh0AAAQACRBg0BABaJAADkiORyK8OBwAAAQACRBg0BABaRgADkduVyqoNhsAAAQACRBg0BABaZwADkZOVyqUNhsAAAQACRBg0BABaiQADkUuZzKANBoAAAQACRBg0BABaqgADkQOdzpsMhkAAAQACRBg0BABaywADkMOh0JYMBgAAAQACRBg0BABa6wADkHuh0JEMBgAAAQACRBg0BABbDAADkDOl0owLhcAAAQACRBg0BABbLAADn/Op1IgLBYAAAQACRBg0BABbSwADn6ut1oMKhUAAAQACRBg0BABbawADn2ut1n4KhUAAAQACRBg0BABbigADnyux2HoKBQAAAQACRBg0BABbqAADnuO12nUJhMAAAQACRBg0BABbxwADnqO53HEJBIAAAQACRBg0BABb5QADnmO53GwJBIAAAQACRBg0BABiAYADniO93mgIhEAAAQACRBg0BABiEAADnePB4GMIBAAAAQACRBg0BABiHwADnaPB4F8IBAAAAQACRBg0BABiLYADnWvF4lsHg8AAAQACRBg0BABiO4ADnSvJ5FYHA4AAAQACRBg0BABiSYADnPPJ5FIHA4AAAQACRBg0BABiWAADnLPN5k4Gg0AAAQACRBg0BABiZYADnHvR6EoGAwAAAQACRBg0BABic4ADnDvR6EYGAwAAAQACRBg0BABigQADnAPV6kIFgsAAAQACRBg0BABijgADm8vV6j4FgsAAAQACRBg0BABim4ADm5PZ7DoFAoAAAQACRBg0BABiqIADm1vd7jYEgkAAAQACRBg0BABitYADmyPd7jIEgkAAAQACRBg0BABiwoADmuvh8C8EAgAAAQACRBg0BABizwADmrPh8CsEAgAAAQACRBg0BABi24ADmoPl8icDgcAAAQACRBg0BABi6AADmkvp9CMDAYAAAQACRBg0BABi9AADmhPp9CADAYAAAQACRBg0BABjAAADmePt9hwCgUAAAQACRBg0BABjDAADmbPt9hkCgUAAAQACRBg0BABjF4ADmXvx+BUCAQAAAQACRBg0BABjIwADmUvx+BICAQAAAQACRBg0BABjLoADmRv1+g4BgMAAAQACRBg0BABjOgADmOv1+gsBgMAAAQACRBg0BABjRQADmLv5/AgBAIAAAQACRBg0BABjUAADmIv9/gQAgEAAAQACRBg0BABjWwADmFv9/gEAgEAAAQACNBg0BABjZYABrBkAQD/hAAD8DAgAAAAcAjwYPAQACABjcAABrAEAQD+xAAAAA/wnkAAAABAABAD8DwwAAAIgZAAQAaQBpc2sxAGlzawBzY2FsZWZhY3RvcgCWBwAIAAcCAAAAHZYCAAgAHEqWBQAHMgAAAEgSnQIAhQCWBgAIAQgCCAAcIZYHAAcAQAAACAAcRySWBAAIAggAHCGWCgABAAAgQQdoAQAAMCOWDAAIAwcoAAAABzwAAAAwSkcdlgQACAIIABwhlgcAAQAAAEAIAxwjlgQACAIIABwhlgcAAQAAQEAIAxwjlgQACAAIABxKlgUABwEAAABHHZkCAGX/AL8GDQAAACYBAAMAEdc4aXNrMQBAAAAAvwAwAAAABQA9RZUWAAEA////ABAUz8OQ00BKQBLM2TM24CS4DPOTPMC6QC43OQ3NICRIA00A/wlM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AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAD8DBwAAAIECAAAABgBAAAIHAQD/CgMAAABsMQCLBhYBAAcAFjptEDwAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAD8DBwAAAIECAAAABgBAAAIHAQD/CgMAAABsMgCLBhYBAAcAFZDcoGkAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAD8DBwAAAIECAAAABgBAAAIHAQD/CgMAAABsMwCWBh4BAAkAGE+0QugAAAAEAOwACaAAlgBAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAA/AwcAAACBAgAAAAYAQAD/CgMAAABsNABAAAIHAQCLBhYBAAkAGaWqcrYAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAD8DBwAAAIECAAAABgBAAAIHAQD/CgMAAABsNQCWBh4BAAkAGOqn7OgAAAAEAPs+wPAA4wBAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAD8DBwAAAIECAAAABgBAAAIHAQD/CgMAAABsNgCXBh4BAAkAG2AN/YDoMwzDNAAAL0JgAAkBQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAA/AwcAAACBAgAAAAYAQAAAAL8GEwAAACYBAAoAHKvh9ABhbmlfY2xpcAC/AB0AAAALAFAAuQALkAEAAAAA' $sFileBin &= 'ABAVS5Ll4KO4aO4Fy4VyAL8IUAAAAAwAAAoADwsAAQAABAAAAAgAgzsAaHR0cDovL3d3dy5hbWFyYXNvZnR3YXJlLmNvbS9mbGFzaC1pbnRyb3MtYW5kLWJhbm5lcnMuaHRtAAAAkAYOAwAMALW6zdYAaQBAEAAAQAAAAA==' $sFileBin = Binary ( __Au3Obj_Mem_Base64Decode ( $sFileBin ) ) Return SetError ( 0, 0, $sFileBin ) EndFunc ;==> FireworksTransSwf() Func LzntDecompress ( $bBinary ); by trancexx $bBinary = Binary ( $bBinary ) Local $tInput = DllStructCreate ( 'byte[' & BinaryLen ( $bBinary ) & ']' ) DllStructSetData ( $tInput, 1, $bBinary ) Local $tBuffer = DllStructCreate ( 'byte[' & 16*DllStructGetSize ( $tInput ) & ']' ) Local $a_Call = DllCall ( 'ntdll.dll', 'int', 'RtlDecompressBuffer', 'ushort', 2, 'ptr', DllStructGetPtr ( $tBuffer ), 'dword', DllStructGetSize ( $tBuffer ), 'ptr', DllStructGetPtr ( $tInput ), 'dword', DllStructGetSize ( $tInput ), 'dword*', 0 ) If @error Or $a_Call[0] Then Return SetError ( 1, 0, '' ) Local $tOutput = DllStructCreate ( 'byte[' & $a_Call[6] & ']', DllStructGetPtr ( $tBuffer ) ) Return SetError ( 0, 0, DllStructGetData ( $tOutput, 1 ) ) EndFunc ;==> LzntDecompress() Func MemLib_BuildImportTable ( $CodeBase, $PEHeader ) Local Const $IMAGE_DIRECTORY_ENTRY_IMPORT = 1 Local Const $SizeOfPtr = DllStructGetSize ( DllStructCreate ( 'ptr', 1 ) ) Local $IMAGE_NT_HEADER = DllStructCreate ( $tagIMAGE_NT_HEADER, $PEHeader ) Local $SizeOfDataDirectory = DllStructGetSize ( DllStructCreate ( $tagIMAGE_DATA_DIRECTORY ) ) Local $ImportDirectoryPtr = $PEHeader + DllStructGetSize ( $IMAGE_NT_HEADER ) + $IMAGE_DIRECTORY_ENTRY_IMPORT * $SizeOfDataDirectory Local $ImportDirectory = DllStructCreate ( $tagIMAGE_DATA_DIRECTORY, $ImportDirectoryPtr ) Local $ImportSize = DllStructGetData ( $ImportDirectory, 'Size' ) Local $ImportVirtualAddress = DllStructGetData ( $ImportDirectory, 'VirtualAddress' ) Local $SizeOfImportDir = DllStructGetSize ( DllStructCreate ( $tagIMAGE_IMPORT_DESCRIPTOR ) ) Local $ImportList = '' If $ImportSize > 0 Then Local $ImportDescPtr = $CodeBase + $ImportVirtualAddress Local $ImportDesc, $NameOffset, $Name, $OriginalFirstThunk, $FirstThunk, $Handle, $FuncRef, $ThunkRef, $Ref, $IMAGE_IMPORT_BY_NAME, $NamePtr, $FuncName, $Ptr While 1 If API_IsBadReadPtr ( $ImportDescPtr, $SizeOfImportDir ) Then ExitLoop $ImportDesc = DllStructCreate ( $tagIMAGE_IMPORT_DESCRIPTOR, $ImportDescPtr ) $NameOffset = DllStructGetData ( $ImportDesc, 'Name' ) If $NameOffset = 0 Then ExitLoop $Name = Peek ( 'str', $CodeBase + $NameOffset ) $OriginalFirstThunk = DllStructGetData ( $ImportDesc, 'OriginalFirstThunk' ) $FirstThunk = DllStructGetData ( $ImportDesc, 'FirstThunk' ) $Handle = API_LoadLibrary ( $Name ) If $Handle Then $ImportList &= $Handle & ',' $FuncRef = $CodeBase + $FirstThunk $ThunkRef = $CodeBase + $OriginalFirstThunk If $OriginalFirstThunk = 0 Then $ThunkRef = $FuncRef While 1 $Ref = Peek ( 'ptr', $ThunkRef ) If $Ref = 0 Then ExitLoop If BitAND ( Peek ( 'byte', $ThunkRef + $SizeOfPtr - 1 ), 0x80 ) Then $Ptr = API_GetProcAddress ( $Handle, BitAND ( $Ref, 0xffff ) ) Else $IMAGE_IMPORT_BY_NAME = DllStructCreate ( $tagIMAGE_IMPORT_BY_NAME, $CodeBase + $Ref ) $NamePtr = DllStructGetPtr ( $IMAGE_IMPORT_BY_NAME, 2 ) $FuncName = Peek ( 'str', $NamePtr ) $Ptr = API_GetProcAddress ( $Handle, $FuncName ) EndIf If $Ptr = 0 Then Return SetError ( 1, 0, False ) Poke ( 'ptr', $FuncRef, $Ptr ) $ThunkRef += $SizeOfPtr $FuncRef += $SizeOfPtr WEnd Else Return SetError ( 1, 0, False ) EndIf $ImportDescPtr += $SizeOfImportDir WEnd EndIf Return $ImportList EndFunc ;==> MemLib_BuildImportTable() Func MemLib_CopySections ( $CodeBase, $PEHeader, $DllDataPtr ) Local $IMAGE_NT_HEADER = DllStructCreate ( $tagIMAGE_NT_HEADER, $PEHeader ) Local $SizeOfFileHeader = DllStructGetPtr ( $IMAGE_NT_HEADER, 'Magic' ) - $PEHeader Local $SizeOfOptionalHeader = DllStructGetData ( $IMAGE_NT_HEADER, 'SizeOfOptionalHeader' ) Local $NumberOfSections = DllStructGetData ( $IMAGE_NT_HEADER, 'NumberOfSections' ) Local $SectionAlignment = DllStructGetData ( $IMAGE_NT_HEADER, 'SectionAlignment' ) Local $SectionPtr = $PEHeader + $SizeOfFileHeader + $SizeOfOptionalHeader Local $Section, $VirtualAddress, $SizeOfRawData, $PointerToRawData, $Dest For $i = 1 To $NumberOfSections $Section = DllStructCreate ( $tagIMAGE_SECTION_HEADER, $SectionPtr ) $VirtualAddress = DllStructGetData ( $Section, 'VirtualAddress' ) $SizeOfRawData = DllStructGetData ( $Section, 'SizeOfRawData' ) $PointerToRawData = DllStructGetData ( $Section, 'PointerToRawData' ) If $SizeOfRawData = 0 Then $Dest = _MemVirtualAlloc ( $CodeBase + $VirtualAddress, $SectionAlignment, $MEM_COMMIT, $PAGE_READWRITE ) API_ZeroMemory ( $Dest, $SectionAlignment ) Else $Dest = _MemVirtualAlloc ( $CodeBase + $VirtualAddress, $SizeOfRawData, $MEM_COMMIT, $PAGE_READWRITE ) _MemMoveMemory ( $DllDataPtr + $PointerToRawData, $Dest, $SizeOfRawData ) EndIf DllStructSetData ( $Section, 'VirtualSize', $Dest - $CodeBase ) $SectionPtr += DllStructGetSize ( $Section ) Next EndFunc ;==> MemLib_CopySections() Func MemLib_FinalizeSections ( $CodeBase, $PEHeader ) Local Const $IMAGE_SCN_MEM_EXECUTE = 0x20000000 Local Const $IMAGE_SCN_MEM_READ = 0x40000000 Local Const $IMAGE_SCN_MEM_WRITE = 0x80000000 Local Const $IMAGE_SCN_MEM_NOT_CACHED = 0x4000000 Local Const $IMAGE_SCN_CNT_INITIALIZED_DATA = 64 Local Const $IMAGE_SCN_CNT_UNINITIALIZED_DATA = 128 Local Const $PAGE_WRITECOPY = 0x0008 Local Const $PAGE_EXECUTE_WRITECOPY = 0x0080 Local $IMAGE_NT_HEADER = DllStructCreate ( $tagIMAGE_NT_HEADER, $PEHeader ) Local $SizeOfFileHeader = DllStructGetPtr ( $IMAGE_NT_HEADER, 'Magic' ) - $PEHeader Local $SizeOfOptionalHeader = DllStructGetData ( $IMAGE_NT_HEADER, 'SizeOfOptionalHeader' ) Local $NumberOfSections = DllStructGetData ( $IMAGE_NT_HEADER, 'NumberOfSections' ) Local $SectionAlignment = DllStructGetData ( $IMAGE_NT_HEADER, 'SectionAlignment' ) Local $SectionPtr = $PEHeader + $SizeOfFileHeader + $SizeOfOptionalHeader Local $Section, $Characteristics, $SizeOfRawData, $Executable, $Readable, $Writeable, $ProtectList, $Protect, $Size, $PhysicalAddress For $i = 1 To $NumberOfSections $Section = DllStructCreate ( $tagIMAGE_SECTION_HEADER, $SectionPtr ) $Characteristics = DllStructGetData ( $Section, 'Characteristics' ) $SizeOfRawData = DllStructGetData ( $Section, 'SizeOfRawData' ) $Executable = ( BitAND ( $Characteristics, $IMAGE_SCN_MEM_EXECUTE ) <> 0 ) $Readable = ( BitAND ( $Characteristics, $IMAGE_SCN_MEM_READ ) <> 0 ) $Writeable = ( BitAND ( $Characteristics, $IMAGE_SCN_MEM_WRITE ) <> 0 ) Dim $ProtectList[8] = [$PAGE_NOACCESS, $PAGE_EXECUTE, $PAGE_READONLY, $PAGE_EXECUTE_READ, $PAGE_WRITECOPY, $PAGE_EXECUTE_WRITECOPY, $PAGE_READWRITE, $PAGE_EXECUTE_READWRITE] $Protect = $ProtectList[$Executable + $Readable * 2 + $Writeable * 4] If BitAND ( $Characteristics, $IMAGE_SCN_MEM_NOT_CACHED ) Then $Protect = BitOR ( $Protect, $PAGE_NOCACHE ) $Size = $SizeOfRawData If $Size = 0 Then If BitAND ( $Characteristics, $IMAGE_SCN_CNT_INITIALIZED_DATA ) Then $Size = DllStructGetData ( $IMAGE_NT_HEADER, 'SizeOfInitializedData' ) ElseIf BitAND ( $Characteristics, $IMAGE_SCN_CNT_UNINITIALIZED_DATA ) Then $Size = DllStructGetData ( $IMAGE_NT_HEADER, 'SizeOfUninitializedData' ) EndIf EndIf If $Size > 0 Then $PhysicalAddress = $CodeBase + DllStructGetData ( $Section, 'VirtualSize' ) API_VirtualProtect ( $PhysicalAddress, $Size, $Protect ) EndIf $SectionPtr += DllStructGetSize ( $Section ) Next EndFunc ;==> MemLib_FinalizeSections() Func MemLib_FreeLibrary ( $ModulePtr ) If Not MemLib_Vaild ( $ModulePtr ) Then Return 0 Local $Module = DllStructCreate ( $tagModule, $ModulePtr ) Local $CodeBase = DllStructGetData ( $Module, 'CodeBase' ) Local $DllEntry = DllStructGetData ( $Module, 'DllEntry' ) Local $Initialized = DllStructGetData ( $Module, 'Initialized' ) Local $ImportListPtr = DllStructGetData ( $Module, 'ImportList' ) Local $ExportListPtr = DllStructGetData ( $Module, 'ExportList' ) If $Initialized And $DllEntry Then Local $Success = MemoryFuncCall ( 'bool', $DllEntry, 'ptr', $CodeBase, 'dword', 0, 'ptr', 0 ) ; DLL_PROCESS_DETACH DllStructSetData ( $Module, 'Initialized', 0 ) EndIf If $ExportListPtr Then _MemGlobalFree ( $ExportListPtr ) If $ImportListPtr Then Local $ImportList = StringSplit ( Peek ( 'str', $ImportListPtr ), ',' ) For $i = 1 To $ImportList[0] If $ImportList[$i] Then API_FreeLibrary ( $ImportList[$i] ) Next _MemGlobalFree ( $ImportListPtr ) EndIf If $CodeBase Then _MemVirtualFree ( $CodeBase, 0, $MEM_RELEASE ) DllStructSetData ( $Module, 'CodeBase', 0 ) DllStructSetData ( $Module, 'ExportList', 0 ) _MemGlobalFree ( $ModulePtr ) Return 1 EndFunc ;==> MemLib_FreeLibrary() Func MemLib_GetExportList ( $CodeBase, $PEHeader ) Local Const $IMAGE_DIRECTORY_ENTRY_EXPORT = 0 Local $IMAGE_NT_HEADER = DllStructCreate ( $tagIMAGE_NT_HEADER, $PEHeader ) Local $SizeOfDataDirectory = DllStructGetSize ( DllStructCreate ( $tagIMAGE_DATA_DIRECTORY ) ) Local $ExportDirectoryPtr = $PEHeader + DllStructGetSize ( $IMAGE_NT_HEADER ) + $IMAGE_DIRECTORY_ENTRY_EXPORT * $SizeOfDataDirectory Local $ExportDirectory = DllStructCreate ( $tagIMAGE_DATA_DIRECTORY, $ExportDirectoryPtr ) Local $ExportSize = DllStructGetData ( $ExportDirectory, 'Size' ) Local $ExportVirtualAddress = DllStructGetData ( $ExportDirectory, 'VirtualAddress' ) Local $ExportList = '' If $ExportSize > 0 Then Local $IMAGE_EXPORT_DIRECTORY = DllStructCreate ( $tagIMAGE_EXPORT_DIRECTORY, $CodeBase + $ExportVirtualAddress ) Local $NumberOfNames = DllStructGetData ( $IMAGE_EXPORT_DIRECTORY, 'NumberOfNames' ) Local $NumberOfFunctions = DllStructGetData ( $IMAGE_EXPORT_DIRECTORY, 'NumberOfFunctions' ) Local $AddressOfFunctions = DllStructGetData ( $IMAGE_EXPORT_DIRECTORY, 'AddressOfFunctions' ) If $NumberOfNames = 0 Or $NumberOfFunctions = 0 Then Return '' Local $NameRef = $CodeBase + DllStructGetData ( $IMAGE_EXPORT_DIRECTORY, 'AddressOfNames' ) Local $Ordinal = $CodeBase + DllStructGetData ( $IMAGE_EXPORT_DIRECTORY, 'AddressOfNameOrdinals' ) Local $Ref, $Idx, $FuncName, $Addr For $i = 1 To $NumberOfNames $Ref = Peek ( 'dword', $NameRef ) $Idx = Peek ( 'word', $Ordinal ) $FuncName = Peek ( 'str', $CodeBase + $Ref ) If $Idx <= $NumberOfFunctions Then $Addr = $CodeBase + Peek ( 'dword', $CodeBase + $AddressOfFunctions + $Idx * 4 ) $ExportList &= $FuncName & Chr ( 1 ) & $Addr & Chr ( 1 ) EndIf $NameRef += 4 ; DWORD $Ordinal += 2 ; WORD Next EndIf Return $ExportList EndFunc ;==> MemLib_GetExportList() Func MemLib_GetProcAddress ( $ModulePtr, $FuncName ) Local $ExportPtr = Peek ( 'ptr', $ModulePtr ) If Not $ExportPtr Then Return 0 Local $ExportList = Peek ( 'str', $ExportPtr ) Local $Match = StringRegExp ( $ExportList, '(?i)' & $FuncName & '\001([^\001]*)\001', 3 ) If Not @Error Then Return Ptr ( $Match[0] ) Return 0 EndFunc ;==> MemLib_GetProcAddress() Func MemLib_LoadLibrary ( $DllBinary ) $DllBinary = Binary ( $DllBinary ) Local $DllData = DllStructCreate ( 'byte[' & BinaryLen ( $DllBinary ) & ']' ) Local $DllDataPtr = DllStructGetPtr ( $DllData ) DllStructSetData ( $DllData, 1, $DllBinary ) Local $IMAGE_DOS_HEADER = DllStructCreate ( $tagIMAGE_DOS_HEADER, $DllDataPtr ) If DllStructGetData ( $IMAGE_DOS_HEADER, 'e_magic' ) <> 0x5A4D Then Return SetError ( 1, 0, 0 ) EndIf Local $PEHeader = $DllDataPtr + DllStructGetData ( $IMAGE_DOS_HEADER, 'e_lfanew' ) Local $IMAGE_NT_HEADER = DllStructCreate ( $tagIMAGE_NT_HEADER, $PEHeader ) If DllStructGetData ( $IMAGE_NT_HEADER, 'Signature' ) <> 0x4550 Then Return SetError ( 1, 0, 0 ) EndIf Switch DllStructGetData ( $IMAGE_NT_HEADER, 'Magic' ) Case 0x20B ; IMAGE_NT_OPTIONAL_HDR64_MAGIC Return SetError ( 2, 0, 0 ) EndSwitch Local $ImageBase = DllStructGetData ( $IMAGE_NT_HEADER, 'ImageBase' ) Local $SizeOfImage = DllStructGetData ( $IMAGE_NT_HEADER, 'SizeOfImage' ) Local $SizeOfHeaders = DllStructGetData ( $IMAGE_NT_HEADER, 'SizeOfHeaders' ) Local $AddressOfEntryPoint = DllStructGetData ( $IMAGE_NT_HEADER, 'AddressOfEntryPoint' ) Local $ModulePtr = _MemGlobalAlloc ( DllStructGetSize ( DllStructCreate ( $tagModule ) ), $GPTR ) If $ModulePtr = 0 Then Return SetError ( 3, 0, 0 ) Local $Module = DllStructCreate ( $tagModule, $ModulePtr ) Local $CodeBase = _MemVirtualAlloc ( $ImageBase, $SizeOfImage, $MEM_RESERVE, $PAGE_READWRITE ) If $CodeBase = 0 Then $CodeBase = _MemVirtualAlloc ( 0, $SizeOfImage, $MEM_RESERVE, $PAGE_READWRITE ) If $CodeBase = 0 Then Return SetError ( 3, 0, 0 ) DllStructSetData ( $Module, 'CodeBase', $CodeBase ) _MemVirtualAlloc ( $CodeBase, $SizeOfImage, $MEM_COMMIT, $PAGE_READWRITE ) Local $Base = _MemVirtualAlloc ( $CodeBase, $SizeOfHeaders, $MEM_COMMIT, $PAGE_READWRITE ) _MemMoveMemory ( $DllDataPtr, $Base, $SizeOfHeaders ) MemLib_CopySections ( $CodeBase, $PEHeader, $DllDataPtr ) Local $LocationDelta = $CodeBase - $ImageBase If $LocationDelta <> 0 Then MemLib_PerformBaseRelocation ( $CodeBase, $PEHeader, $LocationDelta ) Local $ImportList = MemLib_BuildImportTable ( $CodeBase, $PEHeader ) If @Error Then MemLib_FreeLibrary ( $ModulePtr ) Return SetError ( 2, 0, 0 ) EndIf Local $ExportList = MemLib_GetExportList ( $CodeBase, $PEHeader ) Local $ImportListPtr = _MemGlobalAlloc ( StringLen ( $ImportList ) + 2, $GPTR ) Local $ExportListPtr = _MemGlobalAlloc ( StringLen ( $ExportList ) + 2, $GPTR ) DllStructSetData ( $Module, 'ImportList', $ImportListPtr ) DllStructSetData ( $Module, 'ExportList', $ExportListPtr ) If $ImportListPtr = 0 Or $ExportListPtr = 0 Then MemLib_FreeLibrary ( $ModulePtr ) Return SetError ( 3, 0, 0 ) EndIf Poke ( 'str', $ImportListPtr, $ImportList ) Poke ( 'str', $ExportListPtr, $ExportList ) MemLib_FinalizeSections ( $CodeBase, $PEHeader ) Local $DllEntry = $CodeBase + $AddressOfEntryPoint DllStructSetData ( $Module, 'DllEntry', $DllEntry ) DllStructSetData ( $Module, 'Initialized', 0 ) If $AddressOfEntryPoint Then Local $Success = MemoryFuncCall ( 'bool', $DllEntry, 'ptr', $CodeBase, 'dword', 1, 'ptr', 0 ) ; DLL_PROCESS_ATTACH If Not $Success[0] Then MemLib_FreeLibrary ( $ModulePtr ) Return SetError ( 4, 0, 0 ) EndIf DllStructSetData ( $Module, 'Initialized', 1 ) EndIf Return $ModulePtr EndFunc ;==> MemLib_LoadLibrary() Func MemLib_PerformBaseRelocation ( $CodeBase, $PEHeader, $LocationDelta ) Local Const $IMAGE_DIRECTORY_ENTRY_BASERELOC = 5 Local Const $IMAGE_REL_BASED_HIGHLOW = 3 Local Const $IMAGE_REL_BASED_DIR64 = 10 Local $IMAGE_NT_HEADER = DllStructCreate ( $tagIMAGE_NT_HEADER, $PEHeader ) Local $SizeOfDataDirectory = DllStructGetSize ( DllStructCreate ( $tagIMAGE_DATA_DIRECTORY ) ) Local $RelocDirectoryPtr = $PEHeader + DllStructGetSize ( $IMAGE_NT_HEADER ) + $IMAGE_DIRECTORY_ENTRY_BASERELOC * $SizeOfDataDirectory Local $RelocDirectory = DllStructCreate ( $tagIMAGE_DATA_DIRECTORY, $RelocDirectoryPtr ) Local $RelocSize = DllStructGetData ( $RelocDirectory, 'Size' ) Local $RelocVirtualAddress = DllStructGetData ( $RelocDirectory, 'VirtualAddress' ) If $RelocSize > 0 Then Local $Relocation = $CodeBase + $RelocVirtualAddress Local $IMAGE_BASE_RELOCATION, $VirtualAddress, $SizeOfBlock, $Dest, $Entries, $RelInfo, $Info, $Type, $Addr While 1 $IMAGE_BASE_RELOCATION = DllStructCreate ( $tagIMAGE_BASE_RELOCATION, $Relocation ) $VirtualAddress = DllStructGetData ( $IMAGE_BASE_RELOCATION, 'VirtualAddress' ) $SizeOfBlock = DllStructGetData ( $IMAGE_BASE_RELOCATION, 'SizeOfBlock' ) If $VirtualAddress = 0 Then ExitLoop $Dest = $CodeBase + $VirtualAddress $Entries = ( $SizeOfBlock - 8 ) / 2 $RelInfo = DllStructCreate ( 'word[' & $Entries & ']', $Relocation + 8 ) For $i = 1 To $Entries $Info = DllStructGetData ( $RelInfo, 1, $i ) $Type = BitShift ( $Info, 12 ) If $Type = $IMAGE_REL_BASED_HIGHLOW Or $Type = $IMAGE_REL_BASED_DIR64 Then $Addr = DllStructCreate ( 'ptr', $Dest + BitAND ( $Info, 0xFFF ) ) DllStructSetData ( $Addr, 1, DllStructGetData ( $Addr, 1 ) + $LocationDelta ) EndIf Next $Relocation += $SizeOfBlock WEnd EndIf EndFunc ;==> MemLib_PerformBaseRelocation() Func MemLib_Vaild ( $ModulePtr ) Local $ModuleSize = DllStructGetSize ( DllStructCreate ( $tagModule ) ) If API_IsBadReadPtr ( $ModulePtr, $ModuleSize ) Then Return False Local $Module = DllStructCreate ( $tagModule, $ModulePtr ) Local $CodeBase = DllStructGetData ( $Module, 'CodeBase' ) If Not $CodeBase Then Return False Return True EndFunc ;==> MemLib_Vaild() Func MemoryDllCall ( $Module, $RetType, $FuncName, $Type1 = '', $Param1 = 0, $Type2 = '', $Param2 = 0, $Type3 = '', $Param3 = 0, $Type4 = '', $Param4 = 0, $Type5 = '', $Param5 = 0, $Type6 = '', $Param6 = 0, $Type7 = '', $Param7 = 0, $Type8 = '', $Param8 = 0, $Type9 = '', $Param9 = 0, $Type10 = '', $Param10 = 0, $Type11 = '', $Param11 = 0, $Type12 = '', $Param12 = 0, $Type13 = '', $Param13 = 0, $Type14 = '', $Param14 = 0, $Type15 = '', $Param15 = 0, $Type16 = '', $Param16 = 0, $Type17 = '', $Param17 = 0, $Type18 = '', $Param18 = 0, $Type19 = '', $Param19 = 0, $Type20 = '', $Param20 = 0 ) Local $Ret, $OpenFlag = False Local Const $MaxParams = 20 If ( @NumParams < 3 ) Or ( @NumParams > $MaxParams * 2 + 3 ) Or ( Mod ( @NumParams, 2 ) = 0 ) Then Return SetError ( 4, 0, 0 ) If Not IsPtr ( $Module ) Then $OpenFlag = True $Module = MemoryDllOpen ( $Module ) If @Error Then Return SetError ( 1, 0, 0 ) EndIf Local $Addr = MemLib_GetProcAddress ( $Module, $FuncName ) If Not $Addr Then Return SetError ( 3, 0, 0 ) Poke ( 'ptr', $_MFHookPtr + 1, $Addr ) Switch @NumParams Case 3 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi ) Case 5 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1 ) Case 7 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2 ) Case 9 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3 ) Case 11 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3, $Type4, $Param4 ) Case 13 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3, $Type4, $Param4, $Type5, $Param5 ) Case Else Local $DllCallStr = 'DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi', $n = 1 For $i = 5 To @NumParams Step 2 $DllCallStr &= ', $Type' & $n & ', $Param' & $n $n += 1 Next $DllCallStr &= ' )' $Ret = Execute ( $DllCallStr ) EndSwitch Local $Err = @Error If $OpenFlag Then MemoryDllClose ( $Module ) Return SetError ( $Err, 0, $Ret ) EndFunc ;==> MemoryDllCall() Func MemoryDllClose ( $Module ) MemLib_FreeLibrary ( $Module ) EndFunc ;==> MemoryDllClose() Func MemoryDllOpen ( $DllBinary ) If Not IsDllStruct ( $_MFHookBak ) Then MemoryFuncInit() Local $Module = MemLib_LoadLibrary ( $DllBinary ) If @Error Then Return SetError ( @Error, 0, -1 ) Return $Module EndFunc ;==> MemoryDllOpen() Func MemoryFuncCall ( $RetType, $Address, $Type1 = '', $Param1 = 0, $Type2 = '', $Param2 = 0, $Type3 = '', $Param3 = 0, $Type4 = '', $Param4 = 0, $Type5 = '', $Param5 = 0, $Type6 = '', $Param6 = 0, $Type7 = '', $Param7 = 0, $Type8 = '', $Param8 = 0, $Type9 = '', $Param9 = 0, $Type10 = '', $Param10 = 0, $Type11 = '', $Param11 = 0, $Type12 = '', $Param12 = 0, $Type13 = '', $Param13 = 0, $Type14 = '', $Param14 = 0, $Type15 = '', $Param15 = 0, $Type16 = '', $Param16 = 0, $Type17 = '', $Param17 = 0, $Type18 = '', $Param18 = 0, $Type19 = '', $Param19 = 0, $Type20 = '', $Param20 = 0 ) If Not IsDllStruct ( $_MFHookBak ) Then MemoryFuncInit() Poke ( 'ptr', $_MFHookPtr + 1, $Address ) Local $Ret Switch @NumParams Case 2 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi ) Case 4 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1 ) Case 6 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2 ) Case 8 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3 ) Case 10 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3, $Type4, $Param4 ) Case 12 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3, $Type4, $Param4, $Type5, $Param5 ) Case Else Local $DllCallStr = 'DllCall($_KERNEL32DLL, $RetType, $_MFHookApi', $n = 1 For $i = 4 To @NumParams Step 2 $DllCallStr &= ', $Type' & $n & ', $Param' & $n $n += 1 Next $DllCallStr &= ')' $Ret = Execute ( $DllCallStr ) EndSwitch Return SetError ( @Error, 0, $Ret ) EndFunc ;==> MemoryFuncCall() Func MemoryFuncInit() Local $KernelHandle = API_LoadLibrary ( 'kernel32.dll' ) API_FreeLibrary ( $KernelHandle ) Local $HookPtr = API_GetProcAddress ( $KernelHandle, $_MFHookApi ) Local $HookSize = 7 $_MFHookPtr = $HookPtr $_MFHookBak = DllStructCreate ( 'byte[' & $HookSize & ']' ) If Not API_VirtualProtect ( $_MFHookPtr, $HookSize, $PAGE_EXECUTE_READWRITE ) Then Return False DllStructSetData ( $_MFHookBak, 1, Peek ( 'byte[' & $HookSize & ']', $_MFHookPtr ) ) Poke ( 'byte', $_MFHookPtr, 0xB8 ) Poke ( 'word', $_MFHookPtr + 5, 0xE0FF ) Return True EndFunc ;==> MemoryFuncInit() Func Peek ( $Type, $Ptr ) If $Type = 'str' Then $Type = 'char[' & API_lstrlenA ( $Ptr ) & ']' ElseIf $Type = 'wstr' Then $Type = 'wchar[' & API_lstrlenW ( $Ptr ) & ']' EndIf Return DllStructGetData ( DllStructCreate ( $Type, $Ptr ), 1 ) EndFunc ;==> Peek() Func Poke ( $Type, $Ptr, $Value ) If $Type = 'str' Then $Type = 'char[' & ( StringLen ( $Value ) + 1 ) & ']' ElseIf $Type = 'wstr' Then $Type = 'wchar[' & ( StringLen ( $Value ) + 1 ) & ']' EndIf DllStructSetData ( DllStructCreate ( $Type, $Ptr ), 1, $Value ) EndFunc ;==> Poke() Func Titchysiddll() ; Code Generated by BinaryToAu3Kompressor. Local $sFileBin = 'cbsATVqQAAMAAACCBAAw//8AALgAOC0BAEAEOBkAsAAMDh8Aug4AtAnNIbgAAUzNIVRoaXMAIHByb2dyYW0AIGNhbm5vdCAAYmUgcnVuIGkAbiBET1MgbW+AZGUuDQ0KJASGADvpjpN/iODAQQUDg6jywHwAB/EQl/PAZQAHUmljBmgBFwVzU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bDByMAB4MH4whDCKMACQMJYwnDCiMACoMK4wtDC6MIDAMMYwzDDSP2H/DwAPAA8ADwAPAA8ADwAPAP8PAA8ADwAPAA8ADwAPAA8A/w8ADwAPAA8ADwAPAA8ADwD/DwAPAA8ADwAPAA8ADwAPAP8PAA8ADwAPAA8ADwAPAA8A/w8ADwAPAA8ADwAPAA8ABAA=' $sFileBin = Binary ( BinaryCall_Base64Decode ( $sFileBin ) ) $sFileBin = Binary ( LzntDecompress ( $sFileBin ) ) Return SetError ( 0, 0, $sFileBin ) EndFunc ;==> Titchysiddll() Flash and Sid are loaded in memory. For a transparent background, look at lines 76/77 (Thanks to Chimp) Thanks to trancexx for SWF.au3 and Ward for MemoryDll.au3 Happy New Year 2017
    1 point
  5. SadBunny

    regex question [SOLVED]

    Well, the best website of the entire interwebz (except for this forum of course ) is this: https://regex101.com It is awesome for building and testing regular expressions and very nicely featured. There are some other sites but as far as I have seen nothing even comes close... Check this out (not mine, but from the publicly available library): https://regex101.com/r/mIA28O/1 You gotta love that sh*t! And it's free (well, you can donate but it is very modest about it) and you can save and publicize your regex work and use multiple flavors... It's just awesome.
    1 point
  6. nend

    regex question [SOLVED]

    I'm still stuck sometimes but this online tut. helped me a lot. https://regexone.com/ I've made this test program it's nice to test and make a expression
    1 point
  7. SadBunny

    regex question [SOLVED]

    No problem Watch out though - rege̢x҉ has a tend̕e͡nçy to drive yo u͝ ą̀͟bsò̡͘lu̶ţ̡ ely s̀̕͢t̴̀̕a̷͠r͢͞k̕͜͝ r̨͘a̵v͠͏i̵ǹ̵g̸̶ bonkers a̵̴ǹ͞͏d̸͞ is al̡҉͝ş̛̕o̴̡ ̷̧͘ex͏̶҉t͟͞ré̢mé̢l̀͏͢y̧҉͟ ̵a̶̴̴d̸̛ḑ͞i͏ç̡̢t̵͠ìv͜e̸̸͡ . It pushes i͜ts̕el̀f ̨on you̕ like a hellish s͢͢͞͠͠c̵̛̕̕o͡͠u̶̢̕r͏̷̢͘ģ̴̴͠͠e͜͟ ̴̧͞͝͞o̸̕͝͏f̡͏̸͡ ͟e̷̵̡̡͜v̸͟͜͞i͏̨͟l̨͢ an d̴̕҉ ̕ma҉̕͡ke͞s͢ ̡i͠t̶̨se͟l̡f͝ ̀s͞͝͡ęe҉̀̕m͞ ͞li̵͡k͡e ̛́t̵̢h̸e͜ ̵́̕ only hammer you will ever need to solve any problem! Damn you regex, daaaaamn you alllll to hellllllll W̷̡̡̪̤͕͉͙͎̳͋̎̓͑͐̑ͤ͆̎͊͟͠H̷̴̡̟̠͙͎͚̪͇̭̻̲̻͔͛̋ͧͣ͆̉͑̽́͌̄̓ͪ͘Y̵̴̗̘͚̞̦͈̮͈͚͈̖̍̔̂̇͡͞ͅ ̵̵̡̧͕̞͈̝̫͎̖̩͕̻͓̜̣̝͚͓̠̺͑ͬͮ͌̋ͮͪ̂ͧͫ͊ͤ̽͂͆̃͞R̒ͩ̂ͧ̊͒̿͛̿̽ͪ̿ͤ̒̐͒ͭͩͣ͜҉̸̘͓̭̗͙̯̠̼ͅĒ̢̫̜̘̱̠͇͕̘̦͔͖͎̫̻̦̂̅ͪ̃͛̕G̨̰͍̫̮̠̼͔̭͎̃ͬ̂̎ͦ͂ͦ̋ͯͩ̉̌̆̑̊̃̃͢͡E̥̣̺̜̹̞̲̗͖̮̗͊ͥ͌ͧͮ̂͋͑̈ͧͯ̃̾ͯ͘͞͞X̶̡̿͋͂ͧ̊̎ͨͬ͆̒͑̓̌͗̍̚͞͞͏̙̭͎͉͎̼̭ ̂̃̊͏͇̦̠͇̭͇̬̳̠̗̪̱̣͚̞̳̗́Ẇ̴̵̞̳̻̼̟͚̤̪̊̍̈̊̓ͧ̒̐̈́̇̕ͅH̷̥̹̼͙̮̮̻̯͉̹̞̰̙ͬͦͯ̑ͪͨ̌̽ͯ̍̉̓̈́̆͊̈̃̚͞͠͠Ÿ̢̞̘͖̼̰̠͉̞̻̙̯́͊ͭ͗̔̒͑̃̾͛ͦͅ
    1 point
  8. SadBunny

    regex question [SOLVED]

    Well, almost The dot is a "wildcard" that stands for any character, but only exactly ONE instance of any character (read: not zero, not more than one, but exactly one). In regex, you can consider it a character class. So, .* literally means "exactly ONE character, and that zero or more times", which ends up being "zero or more of any character". Yes, \s* means "a string of zero or more whitespace characters". It doesn't matter which whitespace characters or in which order they are. ({space} matches, {space}{space}{space}{tab}{tab}{space}{space}{tab}{space} also matches). Yes, your conclusion is correct, but it is important to always realize that the * means zero or more (whereas the + means one or more). So your "any quantity" can also be zero. Which is why my snippet had a testcase for "kk&kk".
    1 point
  9. Jon

    Forum Upgrade Status

    Forum upgraded to 4.1.17.1 Please delete your browser cache if you have any problems. 4.1.17.0 Accounts flagged as spammers are now more visibly different on the member list in AdminCP Added quite a few new embed providers codepen.io coub.com deviantart.com docs.com funnyordie.com gettyimages.com iFixit.com kickstarter.com meetup.com mixcloud.com mix.office.com on.aol.com reddit.com reverbnation.com screencast.com screenr.com slideshare.net smugmug.com ustream.tv Google Maps (requires free Google API key) Default location for an AdminCP tab honors the admin's ordering Staff notification emails for tickets in Commerce now include the ticket ID Auto-saved content in the editor will now expire after 48 hours If you load an editor that has previous auto-saved content you will now be prompted to keep or remove it You can now set pre-filled reasons for Warning actions that will automatically populate the member notes editor when a moderator warns a user Escape key will now cancel quick-edit on titles Adds a setting to restrict member birthday view to admins only or to completely disable prompting for birthday to member There are now more "save and reload" options in various places to keep your place when editing content or settings New check all box when viewing activity on a member profile for easier moderation You can now hide posts that are unapproved rather than just approve or delete When a moderator changes the status of a report in the ModCP the system now puts a reply in moderator comments noting the change When you see a "could not write file" error the file it was trying to write now shows in the error logs You can now quickly edit tags when viewing an item without having to edit it if you have permission If you are using multiple devices to login to a site you will be less likely to be logged out Tags can now be quickly edited when viewing an item Administrators can now create custom RSS feeds for various content Enhancements to IP discovery tools for moderators Actions for reports in ModCP now show when status is changed as a comment Redesigned support tool More REST API methods Password strength rating and requirement option Guest terms of service alert Minimum age requirement Ban Filters are now Word Filters and can set words to automatically moderate Display name history is now available on profile view Better analytics integration Leaderboard 4.1.16.0 Large number of bugs fixed in focus areas: Commerce, Pages databases, and IPS Connect Performance improvements in: profile view, sitemap generator, posting replies, and Activity Streams We now try to more reliably detect the AWS S3 endpoint for those using S3 file storage More efficient license key checking to keep the keys from being checked too often which can slow your site down There is now a column in tasks view to show the last time it ran to help diagnostics When a member changes their email or password they now get an email confirmation If group promotion based on date is enable the system will now auto-promote even if a member does not login There is now a setting to change the number of topics per page in the forum view If you move your site to a new URL you no longer have to update a constant if using the image proxy You can now press ctrl/cmd+enter in any editor window to submit the reply In Commerce ticket view there are keyboard shortcuts to perform common actions (such as press 'r' to open reply box or 'n' for note) There is now logic to prevent double-posting when the initial post encounters an error on submit Moderators can now remove all followers from an item Contact Us is now configurable with various options Announcements can now be restricted by member group Admins now have a setting to have members automatically follow content they start or reply to. Members can optionally override this. The editor will now show a message if a link that can be embedded (image, video, etc.) failed to embed for some reason. Admins get more detailed error reasons. If your datastore (cache system) is not working properly the AdminCP will now show you a warning telling you that it needs attention. When a member is banned/suspended the system now shows a more friendly page with information on their ban. Previously it showed a permission denied page. Redesigned ticket listing in Commerce New My History view in Commerce Security Questions for account security 4.1.15.0 Commerce Customer Standing Data now loads via AJAX for faster loading Lots of Commerce related bug fixes Passwords on new hosting accounts are now more secure REST API now supports adding Staff Notes to support requests REST API now supports editing purchases Remember me cookie is now 90 days rather than 7 days A race condition is fixed where the site may call to check the license way more often than needed Performance improvements on activity streams Performance improvement to online list widgets 4.1.14.0 This is a maintenance release to fix reported issues. In addition to a strong focus on overall stability, this release contains: Official PHP 7 support Major performance improvements to Activity Streams 4.1.13.0 New per-group setting to highlight posts made by certain groups. 2 theme settings control the color and border, which are editable in the easy theme editor. New setting to make providing a billing address optional for purchases in Commerce. Personal conversation management improvements: Can now filter personal conversations to just read/unread. Can now move multiple personal conversations into a different folder at once. Can search by recipient/sender name. Notifications about Calendar events now include the event date. New setting to control which images sizes should have a watermark applied in Gallery. New setting to control which IP pool to use for SparkPost if you have purchased dedicated IP addresses. Better handling of upgrades if files have been modified. The sidebar widget for showing Downloads files can now show just free or paid files. When searching templates or CSS files in the AdminCP template editor, it will search for templates or CSS files with a name matching the term provided, in addition to searching the content of them. When viewing a log in the AdminCP, it will now show you on which page the log occurred and by which member. When the search index is being rebuilt, a message is now shown on the search results page to indicate why results may not be complete. The "details" modal for applications and plugins now has a tab which shows the hooks associated with that application or plugin. The placeholders that display on date/time inputs (e.g. "HH:MM") can now be translated. Rebuilding the search index, and rebuilding posts after a 3.x upgrade now processes newest posts first for a more user-friendly experience after upgrading. When a file is deleted, a log is created and a new setting controls how to keep these logs for.
    1 point
  10. SadBunny

    regex question [SOLVED]

    The asterisk in regex is unlike the asterisk in for example a regular filespec, with which you are probably confusing it. In a filespec it just means "zero or more characters". (auto*.bat matches auto.bat, autoexec.bat auto_hello.bat etc.) Instead, in regex, it refers to the thing (the "token") that precedes it, and matches "zero or more repetitions of the preceding token". That token can be a character set (like in this case the set in character class \s, or something like [:alnum:] ), but it could also be a character set like [a-g] or a capturing group like (red|green|blue) (the pipe means OR). Note: the + means almost the same thing, but then "one or more repetitions of the preceding token". Note: there is another gotcha (well, many others, regex can be tricky sometimes ) in the difference between filespecs and regex patterns: the period (.) . In regex it means "any character". So putting all that together, if you take auto*.bat as your regex pattern, it would mean: Literal "aut", followed by zero or more occurrences of literal "o", followed by any character, followed by literal "bat". So it would match things you may not expect it to match thinking from a used-to-filespecs perspective, like: autoXbat autoooooooooooooooXbat autXbat (<-- note: zero occurrences of the "o" !) autobat (<-- read: zero occurrences of the "o", followed by one character before "bat" which matches the dot, and happens to be a literal "o") ... but "autbat" would not match, as there is no character in there to match the period (which requires one character) between "aut" and "bat". Note that regular expressions have nothing to do with files or filespecs. Last note: to specify what you originally thought * did, namely "zero or more characters", in regex you would use ".*", which would mean: zero or more repetitions of <any character>. So: abc.*xyz would be matched by "abcxyz", "abc123xyz", "abc {tab} I see dead people my preciousssssss xyz". Read (lots) more on: http://www.regular-expressions.info/repeat.html for repetitions, and ofcourse the other pages on www.regular-expressions.info or one of the other myriads of online resources. Hope this cleared it up a bit (but I have a tendency to complicate matters if I start explaining stuff - if so then sorry )
    1 point
  11. _Example() Func _Example() Local $sJSON = ClipGet() StringReplace($sJSON,'{','') ConsoleWrite("! { count=" & @extended & @CRLF) StringReplace($sJSON,'}','') ConsoleWrite("! } count=" & @extended & @CRLF) EndFunc
    1 point
  12. based on careca way I wrote a similar script , but using the huge allinone powershell command from OP ;============================================================================= ; ; more info at : https://www.tenforums.com/tutorials/27997-wireless-network-security-key-password-see-windows-10-a.html ; and : https://www.autoitscript.com/forum/topic/186200-help-with-powershell-command/ ; ; oneLess , 28 Dec 2016 ; ;============================================================================= ; #include <GUIConstantsEx.au3> #include <Array.au3> ; --->>> is needed only if you use [_ArrayDisplay ( )] function in script ; Global $_wi_fi_array [1][2] $_wi_fi_array [0][0] = 0 $_wi_fi_array [0][1] = "[number of saved wireless networks]" ; ; _populate_wi_fi_array ( ) ; ; _ArrayDisplay ( $_wi_fi_array , "Saved Wireless Networks Info" , "" , 0 , -1 , "SSID|Password" ) ; or process as your need the array ; ; ;============================================================================= Func _populate_wi_fi_array ( ) ; Local $_i = 1 , $_j , $_k = 0 Local $_command = '(netsh wlan show profiles) | Select-String "\:(.+)$" | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name="$name" key=clear)} | Select-String "Key Content\W+\:(.+)$" | %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Format-Table -AutoSize' Local $_string_to_check = 'PS ' & @ScriptDir Local $_run , $_in_str = 0 Local $_read , $_read_2 , $_read_3 , $_read_4 , $_read_5 ; $_run = Run ( 'powershell' , @ScriptDir , @SW_HIDE , $STDIN_CHILD + $STDOUT_CHILD ) Do Sleep ( 20 ) $_read = StdoutRead ( $_run , True , False ) $_in_str = StringInStr ( $_read , $_string_to_check ) Until $_in_str <> 0 ; Sleep(300) StdinWrite ( $_run , $_command & @CRLF) ; Do Sleep ( 20 ) $_read = StdoutRead($_run, True, False) $_read = StringStripWS($_read, 3) $_in_str = StringInStr($_read, 'PROFILE_NAME' & ' ') $_read = StringReplace ( $_read , $_string_to_check , $_string_to_check ) Until @extended = 2 ; $_read_2 = StringSplit($_read, 'PROFILE_NAME ', 1 ) If $_read_2[0] = 1 Then ; no saved wireless networks Else $_read_3 = $_read_2[$_read_2[0]] $_read_4 = StringSplit ( $_read_3 , @CRLF ) ; For $_j = 1 To $_read_4 [0] Select Case StringInStr ( $_read_4 [$_j] , " PASSWORD" , 1 ) > 0 ; do nothing , so will be excluded Case StringInStr ( $_read_4 [$_j] , "------" ) > 0 ; Case StringInStr ( $_read_4 [$_j] , $_string_to_check ) > 0 ; Case StringLen ( $_read_4 [$_j] ) = 0 ; Case Else $_k = $_k + 1 ReDim $_wi_fi_array [$_k+1][2] $_wi_fi_array [0][0] = $_k ; number of SSIDs $_read_5 = StringSplit ( StringStripWS ( $_read_4 [$_j] , 7 ) , " " ) $_wi_fi_array [$_k][1-1] = $_read_5 [1] ; SSID $_wi_fi_array [$_k][2-1] = $_read_5 [2] ; password EndSelect Next EndIf ; EndFunc ;==>_populate_wi_fi_array ;============================================================================= Thank again careca for your clear script. I never understand before how to working proper with the console in/out . /edit : added @ScriptDir as working folder in run/powershell command if is not added , the script works ok anywhere on hdd but no from %temp% folder (download and run from internet link) I don't know why, but now is working. The script compiled x86 will work also in x64 environment. No need for 2 compilations. c
    1 point
  13. SadBunny

    regex question [SOLVED]

    Is this what you mean? ConsoleWrite(doThingy("kk&kk") & @CRLF) ConsoleWrite(doThingy("kk& kk") & @CRLF) ConsoleWrite(doThingy("kk &kk") & @CRLF) ConsoleWrite(doThingy("kk & kk") & @CRLF) ConsoleWrite(doThingy("kk & kk") & @CRLF) ConsoleWrite(doThingy(" & foo &bar &foobar& bar& foo") & @CRLF) Func doThingy($s) Return StringRegExpReplace($s, "\s*&\s*", " & ") EndFunc ;==>doThingy Output: kk & kk kk & kk kk & kk kk & kk kk & kk & foo & bar & foobar & bar & foo
    1 point
  14. Just as the author/s of the functions WinGetPos and WinGetClientSize had these functions return arrays, so to your _WindowPositionAndSize function can be rewritten to return an array. Func _WindowPositionAndSize($WindowID) ; Retrieve the positions Local $aPos = WinGetPos($WindowID) ; Retrieve the sizes Local $aSize = WinGetClientSize($WindowID) Local $aRetArray[4] ; One array returned can have 4 values. Global variables not required. $aRetArray[0] = $aPos[0] $aRetArray[1] = $aPos[1] $aRetArray[2] = $aSize[0] $aRetArray[3] = $aSize[1] Return $aRetArray EndFunc ;==>_WindowPositionAndSize
    1 point
  15. Yes you can (create SQLite functions written in AutoIt) but it isn't worth the burden, especially in you "archive" use case. When the expected benefit is large enough it's much better to write directly an extension function in C and load it at connection time, or auto-load it for all subsequent connections in the same run, or statically include it in a homebrew SQLite.dll build. If ever you're interessed to add AutoIt functions as extensions to SQLite you can use this (posted on the French forum): https://autoitscript.fr/forum/viewtopic.php?f=21&t=13556&p=94618
    1 point
  16. Subz, You're right, I used the code in #9. This thread seems to be related to this thread. I'm having trouble making heads or tails of either of the threads or what the OP wants. Good luck and Merry Xmas! kylomas Subz - F.Y.I. another way to handle autocomplete by monitoring $CBN_EDITCHANGE ; ; ; #include <GuiComboBox.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $cCombo1, $cCombo2 _Main() Func _Main() ; Create GUI GUICreate("ComboBox Auto Complete", 400, 296) $cCombo1 = GUICtrlCreateCombo("", 2, 2, 396, 296) GUICtrlSetData(-1, "Apple|Orange|Tomato") $cCombo2 = GUICtrlCreateCombo("", 2, 42, 396, 296) GUICtrlSetData(-1, "One|Two|Three") GUISetState() GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>_Main Func _Edit_Changed($cCombo) _GUICtrlComboBox_AutoComplete($cCombo) EndFunc ;==>_Edit_Changed Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam) #forceref $hWnd, $iMsg, $ilParam $iIDFrom = BitAND($iwParam, 0xFFFF) ; Low Word $iCode = BitShift($iwParam, 16) ; Hi Word If $iCode = $CBN_EDITCHANGE Then Switch $iIDFrom Case $cCombo1 _Edit_Changed($cCombo1) Case $cCombo2 _Edit_Changed($cCombo2) EndSwitch EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND
    1 point
  17. Here's a different approach: #include <Array.au3> #include <Array.au3> #include <ButtonConstants.au3> #include <ColorConstants.au3> #include <ComboConstants.au3> #include <Date.au3> #include <EditConstants.au3> #include <File.au3> #include <GUIComboBox.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <GuiListView.au3> #include <ListViewConstants.au3> #include <Misc.au3> #include <MsgBoxConstants.au3> #include <StaticConstants.au3> #include <String.au3> #include <WindowsConstants.au3> #include <StringConstants.au3> #include <FileConstants.au3> #include <GuiTab.au3> #include <GuiButton.au3> #include <GuiMenu.au3> #include <WinAPI.au3> #include <Constants.au3> #include <WinAPIFiles.au3> #include <GuiDateTimePicker.au3> #include <Sound.au3> #include <GuiScrollBars.au3> ;I know I don't need all the above, its just a template that I throw everything into so I can move along each time ;Looking to create seris of Listviews but ONLY ONE is viewable at a time ;thought the array would be the place to store the needed data to CHANGE STATE depending upon any button I would put on it. Global $ListAll[13][2] $ListAll[0][0] = "ControlID" $ListAll[0][1] = "Handle" Local $matrix[8][18] = [[0, "$List1", "$List2", "$List3", "$List4", "$List5", "$List6", "$List7", "$List8", "$List9", _ "$List12", "$List13", "$List100", "$Button4", "$Button12", "$Button13", "$Button14", "$Button15"], _ ["Hide", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["Show", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], _ ["Enable", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["disABLE", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["Checked", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], _ ["Unchecked", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["ControlID", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] ;_ArrayDisplay($matrix, "LABELS") ;update for state in column 0; for later, not the issue with WINAPI $matrix[1][0] = $GUI_HIDE $matrix[2][0] = $GUI_SHOW $matrix[3][0] = $GUI_ENABLE $matrix[4][0] = $GUI_DISABLE $matrix[5][0] = $GUI_CHECKED $matrix[6][0] = $GUI_UNCHECKED ;_ArrayDisplay($matrix, "Update It") ; updated $main = GUICreate("Dash Board", 680, 515, 150, 100) ;height was 480 ;$Button14 = GUICtrlCreateButton("Matrix", 10, 140, 120, 33) ;load the listviews ;GUICtrlSetState($Button14, $GUI_enABLE) ;GUICtrlSetState($Button14, $GUI_show) ;GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") ;GUICtrlSetColor(-1, 0xFF0000) ;GUICtrlSetBkColor(-1, 0xE3E3E3) ;GUICtrlSetState($Button14, $GUI_FOCUS) Local $Show = 0 GUISetState(@SW_SHOW) GUISetState() _SeeAll() While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE Exit ;Case $Button14 ; _SeeAll() EndSwitch If _IsPressed('01') Then Sleep(50) CheckClick() EndIf Sleep(50) WEnd ;============================================================================= Func CheckClick() $Cur = GUIGetCursorInfo($main) If $Cur[4] <> 0 Then For $u = 3 To 14 If $u = $Cur[4] Then If $Show = 1 Then GetBack() ExitLoop Else GUICtrlSetState($u, $GUI_SHOW) $Show = 1 EndIf Else GUICtrlSetState($u, $GUI_HIDE) EndIf Next EndIf EndFunc ;==>CheckClick ;============================================================================= Func GetBack() For $u = 3 To 14 GUICtrlSetState($u, $GUI_SHOW) Next $Show = 0 EndFunc ;==>GetBack ;============================================================================= Func _SeeAll(); create all listviews for viewing before any selection For $i = 4 To 15 GUICtrlDelete($i) Next $j = 40 GUISetState(@SW_LOCK) For $i = 1 To 12 $ListAll[$i][0] = GUICtrlCreateListView("$ListAll" & $i, 154, $j, 500, 200) $ListAll[$i][1] = GUICtrlGetHandle($ListAll[$i][0]) _GUICtrlListView_SetExtendedListViewStyle($ListAll, BitOR($LVS_EX_HEADERDRAGDROP, $LVS_EX_GRIDLINES)) _GUICtrlListView_AddColumn($ListAll[$i][0], "A", 70) _GUICtrlListView_AddColumn($ListAll[$i][0], "B", 70) _GUICtrlListView_AddColumn($ListAll[$i][0], "C", 70) _GUICtrlListView_AddColumn($ListAll[$i][0], "D", 70) _GUICtrlListView_AddColumn($ListAll[$i][0], "E", 70) _GUICtrlListView_AddColumn($ListAll[$i][0], "F", 70) GUICtrlSetFont(-1, 8.5, 700, 0, "MS Ariel") GUICtrlSetBkColor($ListAll[$i][0], $COLOR_aqua) GUICtrlSetFont(-1, 8.5, 700, 0, "MS Ariel") GUICtrlSetState($ListAll[$i][0], $matrix[2][0]); GUICtrlSetState($ListAll[$i][0], $matrix[3][0]) $matrix[2][$i] = 1 $matrix[3][$i] = 1 $j = $j + 30 Next GUISetState(@SW_UNLOCK) ;_ArrayDisplay($ListAll, " listview array") ; controlID column 0, handle column 1 EndFunc ;==>_SeeAll Click the same to show the hidden ones, no deleting ids anymore.
    1 point
  18. Sorry, Xmas eve here in NZ, so haven't had a lot of time to look over it all but personally I would probably just check if {ENTER} is pressed within the ComboBox and then send a {TAB} for example: #include <Array.au3> #include <ColorConstants.au3> #include <GuiComboBox.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <ListViewConstants.au3> #include <Misc.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> Global $bGUI_COMBOBOX01 = False, $bGUI_COMBOBOX02 = False Global $hGUI_COMBOBOX01, $hGUI_COMBOBOX02 Global $hGUI_LISTVIEW01, $hGUI_LISTVIEW02 Global $aListView01[1][6], $aListView02[1][6], $aListView03[1][6], $aListView04[1][6], $aListView05[1][6], $aListView06[1][6], $aListView07[1][6], $aListView08[1][6], $aListView09[1][6], $aListView10[1][6], $aListView11[1][6], $aListView12[1][6] Global $aComboBox[13] = [12, 'ListView 01', 'ListView 02', 'ListView 03', 'ListView 04', 'ListView 05', 'ListView 06', 'ListView 07', 'ListView 08', 'ListView 09', 'ListView 10', 'ListView 11', 'ListView 12'] Global $aListView[13] = [12, $aListView01, $aListView02, $aListView03, $aListView04, $aListView05, $aListView06, $aListView07, $aListView08, $aListView09, $aListView10, $aListView11, $aListView12] AssignLV() Example() Func Example() Local $hGUI $hGUI = GUICreate("Dash Board", 510, 480, 150, 100) $hGUI_COMBOBOX01 = GUICtrlCreateCombo("", 5, 5, 250, 20, $CBS_DROPDOWN) GUICtrlSetData($hGUI_COMBOBOX01, _ArrayToString($aComboBox, '|', 1)) $hGUI_LISTVIEW01 = GUICtrlCreateListView('Column A|Column B|Column C|Column D|Column E|Column F', 5, 30, 500, 200, '', BitOR($LVS_EX_HEADERDRAGDROP, $LVS_EX_GRIDLINES)) GUICtrlSetFont($hGUI_LISTVIEW01, 8.5, 700, 0, "MS Ariel") GUICtrlSetBkColor($hGUI_LISTVIEW01, $COLOR_aqua) $hGUI_COMBOBOX02 = GUICtrlCreateCombo("", 5, 250, 250, 20) GUICtrlSetData($hGUI_COMBOBOX02, _ArrayToString($aComboBox, '|', 1)) $hGUI_LISTVIEW02 = GUICtrlCreateListView('Column A|Column B|Column C|Column D|Column E|Column F', 5, 275, 500, 200, '', BitOR($LVS_EX_HEADERDRAGDROP, $LVS_EX_GRIDLINES)) GUICtrlSetFont($hGUI_LISTVIEW02, 8.5, 700, 0, "MS Ariel") GUICtrlSetBkColor($hGUI_LISTVIEW02, $COLOR_TEAL) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") While 1 $MSG = GUIGetMsg() Switch $MSG Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd GUIDelete() EndFunc Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $hWndFrom, $iIDFrom, $iCode, $iGUI_COMBOBOX $hWndFrom = $lParam $iIDFrom = BitAND($wParam, 0xFFFF) $iCode = BitShift($wParam, 16) Switch $iIDFrom Case $hGUI_COMBOBOX01 Switch $iCode Case $CBN_EDITCHANGE _Edit_Changed($hGUI_COMBOBOX01) $bGUI_COMBOBOX01 = True Case $CBN_SELENDCANCEL, $CBN_SELCHANGE If _GUICtrlComboBox_SelectString($hGUI_COMBOBOX01, GUICtrlRead($hGUI_COMBOBOX01)) >= 0 Then _GUICtrlListView_DeleteAllItems($hGUI_LISTVIEW01) $iGUI_COMBOBOX = _GUICtrlComboBox_GetCurSel($hGUI_COMBOBOX01) + 1 _GUICtrlListView_AddArray($hGUI_LISTVIEW01, $aListView[$iGUI_COMBOBOX]) For $i = 0 To _GUICtrlListView_GetColumnCount($hGUI_LISTVIEW01) - 1 If $i = _GUICtrlListView_GetColumnCount($hGUI_LISTVIEW01) - 1 Then _GUICtrlListView_SetColumnWidth($hGUI_LISTVIEW01, $i, $LVSCW_AUTOSIZE_USEHEADER) ExitLoop EndIf _GUICtrlListView_SetColumnWidth($hGUI_LISTVIEW01, $i, 70) Next Else _GUICtrlListView_DeleteAllItems($hGUI_LISTVIEW01) _GUICtrlComboBox_SetCurSel($hGUI_COMBOBOX01, -1) EndIf Case $CBN_KILLFOCUS $bGUI_COMBOBOX01 = False EndSwitch Case $hGUI_COMBOBOX02 Switch $iCode Case $CBN_EDITCHANGE _Edit_Changed($hGUI_COMBOBOX02) $bGUI_COMBOBOX02 = True Case $CBN_SELENDCANCEL, $CBN_SELCHANGE If _GUICtrlComboBox_SelectString($hGUI_COMBOBOX02, GUICtrlRead($hGUI_COMBOBOX02)) >= 0 Then _GUICtrlListView_DeleteAllItems($hGUI_LISTVIEW02) $iGUI_COMBOBOX = _GUICtrlComboBox_GetCurSel($hGUI_COMBOBOX02) + 1 _GUICtrlListView_AddArray($hGUI_LISTVIEW02, $aListView[$iGUI_COMBOBOX]) For $i = 0 To _GUICtrlListView_GetColumnCount($hGUI_LISTVIEW02) - 1 If $i = _GUICtrlListView_GetColumnCount($hGUI_LISTVIEW02) - 1 Then _GUICtrlListView_SetColumnWidth($hGUI_LISTVIEW02, $i, $LVSCW_AUTOSIZE_USEHEADER) ExitLoop EndIf _GUICtrlListView_SetColumnWidth($hGUI_LISTVIEW02, $i, 70) Next Else _GUICtrlListView_DeleteAllItems($hGUI_LISTVIEW02) _GUICtrlComboBox_SetCurSel($hGUI_COMBOBOX02) EndIf Case $CBN_KILLFOCUS $bGUI_COMBOBOX02 = False EndSwitch EndSwitch If _IsPressed('0D') Then If $bGUI_COMBOBOX01 = True Then Send('{TAB}') ElseIf $bGUI_COMBOBOX02 = True Then Send('{TAB}') EndIf EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND Func _Edit_Changed($hGUI_COMBOBOX) _GUICtrlComboBox_AutoComplete($hGUI_COMBOBOX) EndFunc Func AssignLV() Local $aTempView For $x = 1 To 12 $aTempView = $aListView[$x] ReDim $aTempView[Random(4, 30)][6] For $y = 0 To UBound($aTempView) - 1 $aTempView[$y][0] = $x & '-' & $y & 'A' $aTempView[$y][1] = $x & '-' & $y & 'B' $aTempView[$y][2] = $x & '-' & $y & 'C' $aTempView[$y][3] = $x & '-' & $y & 'D' $aTempView[$y][4] = $x & '-' & $y & 'E' $aTempView[$y][5] = $x & '-' & $y & 'F' Next $aListView[$x] = $aTempView Next EndFunc
    1 point
  19. Global $sServer = 'SEDBS154.domain.org\InstanceName'
    1 point
  20. Remark 1: Wiki page are talking about ADO in general - I mean not related to my UDF. Wiki examples for ADO are very similar as I changed many of them to use the same variable names as in my ADO.au3 UDF. Remark 2: In some cases to correctly use Wiki Examples for ADO you should also use COM Error Handler. Wiki Examples for ADO showing to you only the concept how to use ADO in AutoIt. Of course it should use out of the box, but you are doing something wrong (I think so) and for this case you should use COM Error Handler Here is example: ; Error monitoring. This will trap all COM errors while alive. Global $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc") Global Const $iCursorType = 0 ; adOpenForwardOnly Global Const $iLockType = 1 ; adLockReadOnly Global Const $iOptions = 512 ; adCmdTableDirect - Return all rows from the specified table Global $oConnection = ObjCreate("ADODB.Connection") ; Create a connection object Global $sFilename = @ScriptDir & "\ADO_Example_Excel.xlsx" ;Global $sConnectionString = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' & $sFilename & ';Extended Properties="Excel 8.0;HDR=No"' ;xls Global $sConnectionString = 'Microsoft.ACE.OLEDB.12.0;Data Source=' & $sFilename & 'Extended Properties="Excel 12.0 Xml;HDR=No"' ;xlsx $oConnection.Open($sConnectionString) ; Open the connection ;"HDR=Yes;" indicates that the first row contains columnnames, not data. "HDR=No;" indicates the opposite. Global $oRecordset = ObjCreate("ADODB.Recordset") ; Create a recordset object Global $sSQL_Query = "Select F1,F2 FROM [Sheet1$A1:B2]" ; Select all records and all fields of the selected range A1:B2 $oRecordset.Open($sSQL_Query, $oConnection, $iCursorType, $iLockType, $iOptions) ; Issue the SQL query If Not @error Then With $oRecordset While Not .EOF ; repeat until End-Of-File (EOF) is reached ; Write the content of all fields to the console separated by | by processing the fields collection ConsoleWrite("Process the fields collection: ") For $oField In .Fields ConsoleWrite($oField.Value & "|") Next ConsoleWrite(@CR) ; Write a second line by accessing all fields of the collection by name or item number ConsoleWrite("Process the fields by name/item number: " & .Fields("F1").Value & "|" & .Fields(1).Value & "|" & @CR) .MoveNext ; Move To the Next record WEnd EndWith ; Clean Up Recordset $oRecordset.Close ; Close the recordset $oRecordset = 0 ; Release the recordset object EndIf ; Clean Up Connection $oConnection.Close ; Close the connection $oConnection = 0 ; Release the connection object ; User's COM error function. Will be called if COM error occurs Func _ErrFunc($oError) ; Do anything here. ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_ErrFunc QUESTION: in ADO_EXAMPLE.au3 there is a good example: Func _Example_MSExcel() Local $sFileFullPath = Default ; Here put FileFullPath to your Excel File or use Default to open FileOpenDialog Local $sProvider = Default Local $sExtProperties = Default Local $HDR = Default Local $IMEX = Default Local $sConnectionString = _ADO_ConnectionString_Excel($sFileFullPath, $sProvider, $sExtProperties, $HDR, $IMEX) _Example_1_RecordsetToConsole($sConnectionString, "select * from [Sheet1$]") _Example_2_RecordsetDisplay($sConnectionString, "select * from [Sheet1$]") _Example_3_ConnectionProperties($sConnectionString) EndFunc ;==>_Example_MSExcel Did you try it ?
    1 point
×
×
  • Create New...