Leaderboard
Popular Content
Showing content with the highest reputation on 12/29/2016 in all areas
-
This is my list of do's and don't when automating an application using AutoIt. 1. You should always write out a pseudo script defining what you want to do BEFORE you write any code. The best way to define what you are doing is document your steps you do manually. Keep it simple. 2. Hooking into controls for non- web based applications: In many cases the basic AutoIt commands will work fine. If not then this will work: https://www.autoitscript.com/forum/topic/153520-iuiautomation-ms-framework-automate-chrome-ff-ie/ 3. If you are working with a web based application you can use IE.au3 or take a look at this: https://www.autoitscript.com/forum/topic/153520-iuiautomation-ms-framework-automate-chrome-ff-ie/ 4. Pixel searching: It should NEVER be used unless there is no other option (and all other methods have been tried first to hook into the control in question). The reasons being are many: If the pixel gets moved for some reason - your script breaks. window resized - script breaks pixel color is changed due to the app being updated in some manner - script breaks it is slow for for some cases you may have to search a large area. 5. Command line switches - if you are dealing with a package you wish to install and you wish to automate it - look to see if the package supports command line switches. This can make a multi-line script a simple one line script and make your installs much more stable. 6. Script stability: What this basically means is you account for possible failures that may occur when your script runs. For example if your script is waiting for a window to gain focus, you may want to put in a time out or an alert if the window fails to appear. There are many options that one can do for this sort of thing. If you are not sure on what to do, ask in the forum and another member can make a few suggestions for you. 7. The AutoIt help file is your friend. For just about every command there is an example and you have a search function in the help file. USE IT! If you can't find what you need there then look in the forum and use the forum's search function FIRST before posting a question. 8. When you run into trouble with your script: Post it in the Help and support section of the AutoIt forum so we can help you.1 point
-
Too late. You have already offended me, insulted my intelligence and disrespected my constitutional freedoms. It is the worst thing that ever happened to me and I am already on the phone with Dr. Phil's production team.1 point
-
Then I redirect the advice to @akira28911 point
-
1 point
-
AndreyS, I always use an underlaid label like this: #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $cHiLite_1 = GUICtrlCreateLabel("", 5, 5, 110, 110) GUICtrlSetState($cHiLite_1, $GUI_DISABLE) $cButton_1 = GUICtrlCreateLabel("Press me 1", 10, 10, 100, 100) GUICtrlSetBkColor($cButton_1, 0xCCFFCC) $cHiLite_2 = GUICtrlCreateLabel("", 155, 5, 110, 110) GUICtrlSetState($cHiLite_2, $GUI_DISABLE) $cButton_2 = GUICtrlCreateLabel("Press me 2", 160, 10, 100, 100) GUICtrlSetBkColor($cButton_2, 0xCCFFCC) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cButton_1 GUICtrlSetBkColor($cHiLite_1, 0xFF0000) GUICtrlSetBkColor($cHiLite_2, 0xFEFEFE) Case $cButton_2 GUICtrlSetBkColor($cHiLite_2, 0xFF0000) GUICtrlSetBkColor($cHiLite_1, 0xFEFEFE) EndSwitch WEnd M231 point
-
AutoIt OpenProgram, OpenFile, Run .exe's, CloseFile/Program, Repeat on a new file
DarylDixon reacted to careca for a topic
Why the -1? Run($monarch & ' "' & $path & $FileArray[$i] -1 & '"') Also Line _FileListToArray($path, "*." & $extension,1) could simply be: _FileListToArray($path, "*.pdf", 1)1 point -
AutoIt OpenProgram, OpenFile, Run .exe's, CloseFile/Program, Repeat on a new file
DarylDixon reacted to Subz for a topic
What happens if you try something like: #include <File.au3> Opt('ExpandVarStrings', 1) Global $hMonarch = "C:\Program Files\Datawatch Monarch 13\DPS\DWDataPrepStudio.exe" Global $sPath = "C:\PDF" ;~ ... <rest of your code here> Global $aFileList = _FileListToArrayRec($sPath, '*.pdf', 1, 1, 0, 2) If @error Then Exit For $i = 1 To $aFileList[0] Run('"$hMonarch$" "' & $aFileList[$i] & '"');Runs Monarch ;~ ... <rest of your code here> Next1 point -
Why do you care about the size? you're not carrying it around, are you? What Mlipok posted can be used as udf, so it's not even in the main script, you just call the function.. You basically ignored the code, and proceeded to "improve" your way. Local $iFileSize = InetGetSize('http://download.windowsupdate.com/d/msdownload/update/software/secu/2016/11/windows10.0-kb3205386-x64_90dce4e2430a24e5a94e3d6d35883dc19718ab7d.cab') If $iFileSize < 104857600 Then MsgBox(0, "", Round($iFileSize/1024/1024,-1) & " MB") Else MsgBox(0, "", Round($iFileSize/1024/1024/1024,2) & " GB") EndIf shorter by 2 lines, who cares?1 point
-
; #FUNCTION# ==================================================================================================================== ; Name ..........: _String_GetFormattedSizeEx ; Description ...: Return ByteSize in human-readable format ("complex format" GB + MB + KB ) ; Syntax ........: _String_GetFormattedSizeEx($iByteSize) ; Parameters ....: $iByteSize - an integer value. ; Return values .: ByteSize in format like this: 7 GB 770 MB 089 KB ; Author ........: mLipok ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _String_GetFormattedSizeEx($iByteSize) Local $sKB = _String_GetFormattedSize($iByteSize, 0, 'KB') Local $sMB = _String_GetFormattedSize($iByteSize, 0, 'MB') Local $sGB = _String_GetFormattedSize($iByteSize, 0, 'GB') Return $sGB & ' ' & StringRight($sMB, 6) & ' ' & StringRight($sKB, 6) EndFunc ;==>_String_GetFormattedSizeEx ; #FUNCTION# ==================================================================================================================== ; Name ..........: _String_GetFormattedSize ; Description ...: Return ByteSize in human-readable format (one of avalaible size format) ; Syntax ........: _String_GetFormattedSize($iByteSize[, $iRound = 2[, $sRetFormat = -1]]) ; Parameters ....: $iByteSize - an integer value. ; $iRound - [optional] an integer value. Default is 2. ; $sRetFormat - [optional] a string value. Default is -1. ; Return values .: ByteSize in choosen format ; Author ........: MrCreatoR ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: https://www.autoitscript.com/forum/topic/110713-convertfilesize-udf/#comment-777347 ; Example .......: No ; =============================================================================================================================== Func _String_GetFormattedSize($iByteSize, $iRound = 2, $sRetFormat = -1) Local $asBytes[9] = [8, 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] ;Last two unreachable ;) Local $iBytes_Val = 2 ^ 10 If $iByteSize < $iBytes_Val Then Return $iByteSize & ' Bytes' Local $iRetFormat_IsString = IsString($sRetFormat) Local $iFor = 1, $iTo = 8, $iStep = 1 If $iRetFormat_IsString Then If Not StringRegExp($sRetFormat, "\A(?i)(KB|MB|GB|TB|PB|EB|ZB|YB)\z") Then Return SetError(1, 0, $iByteSize) Else $iFor = 8 $iTo = 1 $iStep = -1 EndIf For $i = $iFor To $iTo Step $iStep If ($iRetFormat_IsString And $sRetFormat = $asBytes[$i]) Or _ (Not $iRetFormat_IsString And $iByteSize >= $iBytes_Val ^ $i) Then Return Round($iByteSize / $iBytes_Val ^ $i, $iRound) & ' ' & $asBytes[$i] EndIf Next EndFunc ;==>_String_GetFormattedSize1 point
-
akira289, Are you sure? Look at what you have in that snippet: #cs Button: Return Value: OK 1 CANCEL 2 ABORT 3 RETRY 4 IGNORE 5 YES 6 NO 7 TRY AGAIN ** 10 CONTINUE ** 11 #ce "YES" looks as if it returns "6" - which is exactly what it does. M231 point
-
#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 $Ret[0] EndFun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rfn4mJH5+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+g4BgMAAAQACRBg0BABj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AEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAA/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/wlMBQAABgAtAIY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AAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAD8DBwAAAIECAAAABgBAAAIHAQD/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/PAZQAHUmljBmgBFwVzUEUAAEyAAQQ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whDCKMACQMJYwnDCiMACoMK4wtDC6MIDAMMYwzDDSP2H/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 20171 point
-
SciTE auto unfolding
argumentum reacted to mLipok for a topic
I found this bug in 23-12-2016 example: use this small snippet reg #cs ; a #CE #include <Array.au3> #include <MsgBoxConstants.au3> #include <Process.au3> Fold them all. Focus cursor in first line just after reg and hit spacebar. It seams this is the same bug. It is already reported to scintilla dev team: https://sourceforge.net/p/scintilla/bugs/1896/1 point -
"AutoIt Window Info" tool detects standard Windows controls implemented with the functions in ComCtl32.dll. You can find a list of the controls in the Control Library. Many modern controls including modern Microsoft controls are not detected by "AutoIt Window Info" tool. These controls can be detected with Inspect.exe in Windows SDK or the "Simple Spy Tool" in the UI Automation framework.1 point
-
First question, once you do your _FileListToArray line, does an _ArrayDisplay command show you what you would expect (i.e. the full path name of all the files in the directory)? Secondly, on your run line: Run($monarch & ' "' & $path & $FileArray[$i] -1 & '"') ;Runs Monarch Have you output that to the Console to confirm you're not missing any /'s? Beyond those two simple checks, and if the process is successful all the way through your first For iteration, you're going to have to explain more about what these embedded executables are doing. The problem may lay with one of them, rather than your main script.1 point
-
Simple variables Numeric variables The most interesting aspect of AccessingVariables UDF is the possibility to get a pointer to a native AutoIt array, and thereby being able to manipulate the elements through fast functions of compiled code. But you can also get pointers to simple AutoIt variables (not arrays) eg. numeric and string variables, and then you can access these variables through functions coded in a another language or functions coded in AutoIt. The pointers you get are pointers to variants. The functions whether coded in AutoIt or another language must be able to handle variants. Here are some (AutoIt) examples related to simple numeric variables. You find the examples in zip (updated) in bottom of first post. The examples are located in Examples\Demo examples\5) Simple numeric variables\. Example1.au3 In AutoIt there are three internal numeric data types: Int32 (VT_I4, 4 bytes signed integer) covering the range -2,147,483,648 - 2,147,483,647 Int64 (VT_I8, 8 bytes signed integer), -9,223,372,036,854,775,808 - 9,223,372,036,854,775,807 Double (VT_R8, 8 bytes double), -1.79769313486232E+308 - 1.79769313486232E+308 Use this notation for the largest negative Int64 integer: $iInt = "-9223372036854775808" Int32 and Int64 are exact integer data types covering limited ranges. Double is a fast compact but not accurate data type covering a large range. VarGetType returns the internal representation of a variable. Note that unsigned 64 bit integers in the range 9,223,372,036,854,775,808 - 18,446,744,073,709,551,615 are not represented by internal integer types. These integers may be stored in a "uint64" structure (DllStructCreate), or you can code a function where you interpret Int64 signed integers as unsigned 64 bit integers. Double is the only native data type that directly supports these large integers. Use this notation: $fInt1 = 9223372036854775808.0 $fInt2 = 18446744073709551615.0 This is demonstrated in Example1.au3. Last in the example the inaccuracies that arises when the two integers above are stored as Doubles are calculated in two different ways: With variant calculations through the UDF, and with string calculations without using the UDF. Code to calculate Double inaccuracies with variants: Func DoubleErrorVariants( $pfInt, $psInt ) Local $tVar = DllStructCreate( $tagVARIANT ), $pVar = DllStructGetPtr( $tVar ) Local $tRes = DllStructCreate( $tagVARIANT ), $pRes = DllStructGetPtr( $tRes ) ; Change float to decimal VariantChangeType( $pVar, $pfInt, 0, $VT_DECIMAL ) ; Change type to $VT_DECIMAL ; Print decimal value VariantChangeType( $pRes, $pVar, 0, $VT_BSTR ) Local $pBStr = DllStructGetData( $tRes, "data" ) ConsoleWrite( "$fInt = " & SysReadString( $pBStr ) & @CRLF ) ; Calculate inaccuracy VarSub( $pVar, $psInt, $pRes ) ; $pRes = $pVar - $psInt = $pfInt - $psInt ; Print inaccuracy VariantChangeType( $pRes, $pRes, 0, $VT_BSTR ) $pBStr = DllStructGetData( $tRes, "data" ) ConsoleWrite( "$iErr = " & SysReadString( $pBStr ) & " (variants)" & @CRLF ) EndFunc Output in SciTE console from the last part of the example: $sInt = 9223372036854775808 Hex = 0x8000000000000000 (unsigned) $fInt = 9.22337203685478e+018 $fInt = 9223372036854780000 $iErr = 4192 (variants) $fInt = 9223372036854780000 $iErr = 4192 (strings) Type = Double ptr = 0x00DC8A60 ($pVariant) vt = 0x0005 (VT_R8, 8 bytes double) data = 9.22337203685478e+018 $sInt = 18446744073709551615 Hex = 0xFFFFFFFFFFFFFFFF (unsigned) $fInt = 1.84467440737096e+019 $fInt = 18446744073709600000 $iErr = 48385 (variants) $fInt = 18446744073709600000 $iErr = 48385 (strings) Type = Double ptr = 0x00DC8A18 ($pVariant) vt = 0x0005 (VT_R8, 8 bytes double) data = 1.84467440737096e+019 Example2.au3 It's not too hard to code a function where integers stored as Int64 values are interpreted as unsigned 64 bit integers in the range 0 - 18,446,744,073,709,551,615. But in the range 9,223,372,036,854,775,808 - 18,446,744,073,709,551,615 it's not possible to enter these figures as literal decimal integers. Not even if they are stored as strings. Now when we can handle variants it's possible to do something about it. Example2.au3 shows how to enter unsigned 64 bit integers as literal decimal strings. It's very simple. You need one code line. Example3.au3 In Example2.au3 unsigned 64 bit integers can be entered as literal decimal strings and stored as Int64 variables. The variables are printed in SciTE console as hexadecimal numbers. Example3.au3 shows how to print the variables as literal decimal integers. Output in SciTE console: $su8 = 18446744073709551615 $su8 = 18,446,744,073,709,551,615 $su8 = 0 $su8 = 255 $su8 = 65,535 $su8 = 16,777,215 $su8 = 4,294,967,295 $su8 = 1,099,511,627,775 $su8 = 281,474,976,710,655 $su8 = 72,057,594,037,927,935 $su8 = 18,446,744,073,709,551,615 Example3.au3 (2016-12-30) The day before yesterday I added an incorrect version of Example3.au3 to the zip at bottom of first post. The correct version is added to the zip below. Numeric variants There are eight numeric variant types: VT_UI1, byte, 1 byte, 0 to 255 VT_I2, short, 2 bytes, -32,768 to 32,767 VT_I4, integer, 4 bytes, -2,147,483,648 to 2,147,483,647 VT_I8, longlong, 8 bytes, -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 VT_R4, single, 4 bytes, -3.402823E+38 to 3.402823E+38 VT_R8, double, 8 bytes, -1.79769313486232E+308 to 1.79769313486232E+308 VT_CY, currency, 8 bytes, -922,337,203,685,477.5808 to 922,337,203,685,477.5807 VT_DECIMAL, decimal, 16 bytes, -/+79,228,162,514,264,337,593,543,950,335 (0 decimal places), -/+7.9228162514264337593543950335 (28 decimal places) Single and double are not exact types. All the others are exact types. The fact that these types are considered numerical means that they can be used in calculations with the Variant Arithmetic Functions. In particular decimal type is interesting. It uses 16 bytes of storage. If you are running 32 bit it uses the entire variant structure. The data range is -79,228,162,514,264,337,593,543,950,335 to 79,228,162,514,264,337,593,543,950,335 with zero decimal places and -7.9228162514264337593543950335 to 7.9228162514264337593543950335 with 28 decimal places. It's defined in this way (DECIMAL structure): Global Const $tagDEC = "word wReserved;byte scale;byte sign;uint Hi32;uint Lo32;uint Mid32" Example4.au3 The only way to specify an exact decimal value in AutoIt is to enter it as a literal decimal string. Example4.au3 shows how decimal types are stored in variant and decimal structures. This is done with _WinAPI_DisplayStruct. You must change the digit grouping symbol (1000 separator) and decimal symbol to your local symbols in top of script. Example5.au3 Example5.au3 shows how to add numeric variants. Again you must change the digit grouping symbol (1000 separator) and decimal symbol to your local symbols in top of script. The other Variant Arithmetic Functions can be implemented more or less in the same way. UDFs Based on the variant decimal type it should be possible to create a couple of interesting UDFs: A UDF to handle 12 bytes integers. And a UDF to perform exact calculations on very large decimal numbers with up to 28 decimals. With regard to the latter probably two variants are needed to handle each decimal number. A variant for the integer part and a variant for the decimal part. I'll not make any UDFs on these topics myself, but if anyone is interested you can use the ideas. Note that since all five examples in this post is about simple variables (not arrays), AccessingVariables UDF is not strictly necessary. You can implement all the examples using only DllStruct-functions where you manipulate variant- and BSTR-structures directly. Zip All examples are located in Examples\Demo examples\5) Simple numeric variables\ in zip at bottom of first post.1 point
-
#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> Example() Func Example() GUICreate("My GUI picture", 350, 300, -1, -1, $WS_SIZEBOX + $WS_SYSMENU) ; will create a dialog box that when displayed is centered GUISetBkColor(0xE0FFFF) Local $idPic = GUICtrlCreatePic("E:\Release\AutoIt3\Examples\GUI\Advanced\Images\green.bmp", 50, 50, 200, 50) ; change this path according to where you have autoit installed GUICtrlCreateLabel("", 50, 50, 200, 50, $ss_blackframe) GUISetState(@SW_SHOW) ; Loop until the user exits. Local $idMsg ; Loop until the user exits. While 1 $idMsg = GUIGetMsg() If $idMsg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() EndFunc ;==>Example This should do it.1 point
-
thx this works like a charm $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Initialize a COM error handler $URL="http://localhost:17556/" $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") ;~ GET /status HTTP/1.1 ;~ Host: localhost:17556 ;~ Cache-Control: no-cache $restCMD="/status" $oHTTP.Open("GET", $URL & $restCMD, true) ;~ $oHTTP.setRequestHeader ("Cache-Control:","no-cache") ;~ $oHTTP.SetRequestHeader("Content-Type", "xml") $oHTTP.Send("") sleep(2000) ;~just wait a little $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status ;~ $objHTTP.open ("POST", "url", False) ;~ $objHTTP.setRequestHeader ("Content-Type", "text/xml;charset=UTF-8") ;~ $objHTTP.setRequestHeader("Content-Length",StringLen($YourXMLText)) ;~ $objHTTP.setRequestHeader("Connection","If is needed") ;~ $objHTTP.setRequestHeader("User-Agent","If is needed") ;~ $objHTTP.send ($YourXMLText) ConsoleWrite($oStatusCode & @CRLF) ConsoleWrite($oReceived & @CRLF) If $oStatusCode = 200 Then ;Process the response $oReceived ;ConsoleWrite(@CRLF & "Response" & @CRLF & $oReceived & @CRLF) Else MsgBox(16, "Error " & $oStatusCode, $oReceived, 7) EndIf ; This is my custom defined error handler Func MyErrFunc() Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & hex($oMyError.number,8) & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) Endfunc1 point
-
This listing provides an effect similar to that illustrated in your example (a moving frame that lights the DOM obj behind the mouse pointer), without affecting the source code of the web page. p.s. The View Zoom on the IE browser must be set to 100% to work properly #include <IE.au3> #include <WinAPI.au3> #include <GUIConstantsEx.au3> ; #include <WinAPIEx.au3> #include <WindowsConstants.au3> Local $oIE = _IECreate("https://www.autoitscript.com/forum/") Local $oDoc = _IEDocGetObj($oIE) Local $oIE_hwnd = _IEPropertyGet($oIE, "hwnd") Local $oElement, $oElement_save, $aMousePos Local $aBrowserPos[6] ; x , y , width , height , x right , y bottom Local $aOverlayPos[4] ; coordinates of the overlay frame ; Create a Phantom window with a visible frame Local $aParentPos, $AlphaKey = 0xABABAB Local $iBorderColor = 0x00FF00, $iBorderThickness = 5 $hOverlay = GUICreate("", -50, -50, 10, 10, $WS_POPUPWINDOW, $WS_EX_LAYERED + $WS_EX_TOPMOST) ; transparent $Panel = GUICreate("", 48, 48, 10, 10, $WS_CHILD + $WS_VISIBLE, -1, $hOverlay) ; this new window becomes a child of $hOverlay window GUISetBkColor($iBorderColor, $hOverlay) GUISetBkColor($AlphaKey, $Panel) _WinAPI_SetLayeredWindowAttributes($hOverlay, $AlphaKey, 0, $LWA_COLORKEY) GUISetState(@SW_SHOW, $hOverlay) While WinExists($oIE_hwnd) $aMousePos = MouseGetPos() ; Now we get reference to the DOM object behind the mouse pointer $oElement = $oDoc.elementFromPoint($aMousePos[0] - $oIE.document.parentwindow.screenLeft, $aMousePos[1] - $oIE.document.parentwindow.screenTop) If IsObj($oElement) And $oElement <> $oElement_save Then $oElement_save = $oElement $aBrowserPos[0] = Int($oIE.document.parentwindow.screenLeft) ; X position on the desktop of the left edge of the browser $aBrowserPos[1] = Int($oIE.document.parentwindow.screenTop) ; Y position on the desktop of the top border of the browser $aBrowserPos[2] = Int($oIE.document.documentElement.clientWidth) ; Width of browser's client area $aBrowserPos[3] = Int($oIE.document.documentElement.clientHeight) ; Height of browser's client area $aBrowserPos[4] = $aBrowserPos[0] + $aBrowserPos[2] ; X position on the desktop of the right border of the browser $aBrowserPos[5] = $aBrowserPos[1] + $aBrowserPos[3] ; Y position on the desktop of the bottom border of the browser ; $oRect = $oElement.getBoundingClientRect() ; coordinates of the DOM object within the client area of the browser ; $aOverlayPos[0] = Int($oRect.left) + $aBrowserPos[0] ; X position of the left overlay border (absolute desktop coordinates) If $aOverlayPos[0] < $aBrowserPos[0] Then $aOverlayPos[0] = $aBrowserPos[0] ; if left border of the DOM obj is out of browser, overlay border stays anyway within the screen $aOverlayPos[1] = Int($oRect.Top) + $aBrowserPos[1] ; Y position of the top overlay border If $aOverlayPos[1] < $aBrowserPos[1] Then $aOverlayPos[1] = $aBrowserPos[1] ; if top border of obj is out of browser, overlay border stays anyway within the screen $aOverlayPos[2] = Int($oRect.right - $oRect.left) ; width of the obj If $aOverlayPos[0] + $aOverlayPos[2] > $aBrowserPos[4] Then $aOverlayPos[2] = $aBrowserPos[4] - $aOverlayPos[0] ; if obj's width is out of bounds, force the edge within the browser $aOverlayPos[3] = Int($oRect.bottom - $oRect.top) ; Height of the obj If $aOverlayPos[1] + $aOverlayPos[3] > $aBrowserPos[5] Then $aOverlayPos[3] = $aBrowserPos[5] - $aOverlayPos[1] ; stay within browser's bounds ; WinMove($hOverlay, "", $aOverlayPos[0], $aOverlayPos[1], $aOverlayPos[2], $aOverlayPos[3]) $aParentPos = WinGetPos($hOverlay) ; x, y, width, height WinMove($Panel, "", $iBorderThickness - 1, $iBorderThickness - 1, Int($aParentPos[2] - $iBorderThickness * 2), Int($aParentPos[3] - $iBorderThickness * 2)) EndIf WEnd1 point
-
FileInstall Directory Helper
hudsonhock reacted to SmOke_N for a topic
This was made for someone that was using FileInstall() wrong and asking for help. Since FileInstall() doesn't allow wildcards, and you must use a string for the source, this simply lets you choose a directory that you want to install, allows you to pick the extension to install or just use the wild card, allows you to choose the destination path, and allows you to choose the flag. It will bring everything up in the edit box, and you can use the copy button to copy the data, then paste it to your script. <snip> Feel free to add, critique, whatever... it was just thrown together quickly. Edit: Fixed version. Edit: Added the option to exclude the drive and directory from 1st parameter of FileInstall. Edit - 2014/12/02 Updated code... uses _FileListToArrayRec to allow recursive option now. Also goes to the computer location rather than homedrive. Note: Yes, there is a recursive option to get all the folders/files, however, I did not add code to check the directory paths and making sure they were created, this was a brain fart moment. But I do not have time at the moment to screw around with that, so if you want recursive and want to keep them installed in their directory paths, you may need to do each folder individually without recurse mode. <snip> Edit2 - 2014/12/02 I think I've fixed the recursion issue, added the choice of saving the hierarchy of the folder, should create the directories for you. I tried this on a huge folder of .au3 files, everything looked right. #include <GUIConstantsEx.au3> #include <File.au3> Global $sMyComputerCLSID = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}" Global $gsDirData = "" Global $ghMain = GUICreate('FileInstall Directory', 600, 380) Global $giOutPut = GUICtrlCreateEdit('', 10, 10, 580, 300) GUICtrlCreateLabel('Extension:', 20, 318, 50, 20, 0x001) Global $giExtension = GUICtrlCreateInput('*', 75, 315, 50, 20) GUICtrlCreateLabel('Destination Path:', 130, 318, 90, 20, 0x001) Global $giDestPath = GUICtrlCreateInput('@TempDir & "\"', 220, 315, 200, 20) GUICtrlCreateLabel('Flag:', 425, 318, 30, 20, 0x001) Global $giFlag = GUICtrlCreateCombo('', 455, 315, 40, 300) GUICtrlSetData($giFlag, '0|1|', '0') Global $giDirDrive = GUICtrlCreateCheckbox("Long Path", 500, 315) Global $giDirRecurse = GUICtrlCreateCheckbox("Dir Recurse", 500, 335) Global $giDirHierarchy = GUICtrlCreateCheckbox("Keep Hierarchy", 500, 355) Global $giGetDir = GUICtrlCreateButton('Directory Get Files', 110, 345, 150, 30) Global $giCopyData = GUICtrlCreateButton('Copy Data', 320, 345, 150, 30) GUISetState() While 1 Switch GUIGetMsg() Case - 3 Exit Case $giGetDir $gsDirData = _GetDirData(GUICtrlRead($giExtension), (GUICtrlRead($giDirDrive) <> 1), _ GUICtrlRead($giDestPath), GUICtrlRead($giFlag), GUICtrlRead($giDirRecurse), _ GUICtrlRead($giDirHierarchy) = $GUI_CHECKED) If Not @error Then GUICtrlSetData($giOutPut, '') GUICtrlSetData($giOutPut, $gsDirData) EndIf Case $giCopyData ClipPut(GUICtrlRead($giOutPut)) EndSwitch WEnd Func _GetDirData($sExt, $bExcludeLongName, $sDestPath, $nFlag, $nRecursive, $bHierarchy) Local $sDir = FileSelectFolder("Select a Directory to FileInstall", $sMyComputerCLSID) If @error Then Return SetError(1, @extended, "") EndIf $nRecursive = ($nRecursive = $GUI_CHECKED) ? 1 : 0 Local $aFiles = _FileListToArrayRec($sDir, "*." & $sExt, 1, $nRecursive, 0, 2) If Not IsArray($aFiles) Then Return SetError(2, @extended, "") EndIf Local $sTDrive, $sTDir, $sTFName, $sTExt Local $sHold = "" _GetExistStr($sDestPath, $sHold) Local $sFinstall = "" Local $sTmpDest = "" Local $sHoldStr = "" If $bHierarchy Then ; main folder searching _PathSplit($sDir, $sTDrive, $sTDir, $sTFName, $sTExt) If StringRight(StringRegExpReplace($sDestPath, "[\\/]+\z", ""), _ StringLen($sTFName)) <> $sTFName Then $sTmpDest = StringRegExpReplace($sDestPath, _ "(\&\s*(?:\x27|\x22)[\\/]+(?:\x27|\x22))", "") & ' & "\' & $sTFName & '\"' If Not StringInStr($sHoldStr, $sTDir & @LF) Then $sHoldStr &= $sTDir & @LF _GetExistStr($sTmpDest, $sHold) EndIf EndIf EndIf Local Static $sScrDir = StringRegExpReplace(@ScriptDir, "\\+\z", "") For $i = 1 To UBound($aFiles) - 1 $sTmpDest = $sDestPath _PathSplit($aFiles[$i], $sTDrive, $sTDir, $sTFName, $sTExt) If $bExcludeLongName Then If $sScrDir = StringRegExpReplace($sTDrive & $sTDir, "\\+\z", "") Then $aFiles[$i] = $sTFName & $sTExt EndIf EndIf If $bHierarchy Then $sTmpDest = StringRegExpReplace($sTmpDest, _ "(\&\s*(?:\x27|\x22)[\\/]+(?:\x27|\x22))", "") & ' & "' & $sTDir & '"' If Not StringInStr($sHoldStr, $sTDir & @LF) Then $sHoldStr &= $sTDir & @LF _GetExistStr($sTmpDest, $sHold) EndIf EndIf $sFinstall &= "FileInstall(""" & $aFiles[$i] & '", ' & $sTmpDest & ", " & $nFlag & ")" & @CRLF Next $sHold &= $sFinstall $sHold = StringTrimRight($sHold, 2) Return $sHold EndFunc Func _GetExistStr($sDestPath, ByRef $sOutData) $sOutData &= 'If Not FileExists(' & $sDestPath & ') Then' & @CRLF $sOutData &= ' Do' & @CRLF $sOutData &= ' DirCreate(' & $sDestPath & ')' & @CRLF $sOutData &= ' Until FileExists(' & $sDestPath & ')' & @CRLF $sOutData &= 'EndIf' & @CRLF EndFunc .1 point -
If you have big arrays I suggest you to do the following: #include <array.au3> dim $arr1[4] $arr1[0]="" $arr1[1]="ABC" $arr1[2]="" $arr1[3]="xyz" $s_array = _ArrayToString($arr1, "|") $s_array = StringReplace($s_array, "||", "|") $arr2 = StringSplit($s_array, "|", 2) It is much faster than _ArrayDelete() because you don't have to redim the array all the time.1 point
-
Solution of the problem: You can use 'Msxml2.XMLHTTP.6.0' instead of 'winhttp.winhttprequest.5.1' it allows you to control your condition through a property readyState1 point