HezzelQuartz Posted Thursday at 05:41 AM Posted Thursday at 05:41 AM I just create tool to patch / modify hex file While 1 While $Standby = True ; Open the file for binary read and load content $hFile = FileOpen('D:\Projects\exampleori', 16) $bRead = FileRead($hFile) FileClose($hFile) ;Display a progress bar window. ProgressOn("Progress Meter", "Begin Convert / Revert Process", "0%", 1180, 1400, 16) ; Do your processing stuff ProgressSet(((33-33)*100/26889) & "%", "Starting Convert / Revert Process") $bRead = StringRegExpReplace($bRead, $suba64w0w0w0, $mova64w0c0) $bRead = StringRegExpReplace($bRead, $suba64w0w1w1, $mova64w0c0) $bRead = StringRegExpReplace($bRead, $suba64w0w2w2, $mova64w0c0) ... ... ... $bRead = StringRegExpReplace($bRead, $mova64x29x29, $nopa64) $bRead = StringRegExpReplace($bRead, $mova64x30x30, $nopa64) $bRead = StringRegExpReplace($bRead, $mova64x31x31, $nopa64) ProgressSet(100 & "%", "Done", "Complete") Sleep(500) ; Close the progress window. ProgressOff() ;Open the file for binary write and save content $hFile = FileOpen('D:\Projects\exampleoriconvert', 18) FileWrite($hFile, $bRead) FileClose($hFile) ; $Standby = False WEnd WEnd when I run it, It needs about 3 hours to be completed If I want to patch 4 files at the same time, I create 4 copy of my autoit file, then run it one by one How to execute my tools to patch 4 files at the same time using only 1 autoit file? I want the result to be like the picture below
argumentum Posted Thursday at 06:13 AM Posted Thursday at 06:13 AM 31 minutes ago, HezzelQuartz said: How to execute my tools to patch 4 files at the same time using only 1 autoit file? fork it. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Nine Posted Thursday at 01:49 PM Posted Thursday at 01:49 PM Or multi-thread it... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy
HezzelQuartz Posted Thursday at 09:36 PM Author Posted Thursday at 09:36 PM @Nine @argumentum Sorry for noob question, What is the difference between fork.udf and pmt.udf?
argumentum Posted Thursday at 11:03 PM Posted Thursday at 11:03 PM 1 hour ago, HezzelQuartz said: @Nine @argumentum Sorry for noob question, What is the difference between fork.udf and pmt.udf? Simple: mine is better. Try @Nine's or mine, is all the same. Make your own. The UDFs give you something already though out. At least to give you an idea. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Nine Posted Thursday at 11:36 PM Posted Thursday at 11:36 PM 31 minutes ago, argumentum said: Simple: mine is better. Denial is beautiful thing... argumentum 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy
ioa747 Posted Friday at 08:52 PM Posted Friday at 08:52 PM (edited) For simple such tasks I use _CmdLineWatcher() expandcollapse popup;~ #NoTrayIcon #include <Array.au3> ; Important Note: ; The parameter received from $CmdLine is of type text. ; If the function requires a different variable type, ; it is essential to perform a type check within the function and, ; if needed, convert the parameter to the appropriate type. _CmdLineWatcher() Local $Executable = @Compiled ? '"' & @ScriptFullPath & '"' : '"' & @AutoItExe & '" "' & @ScriptFullPath & '"' Run($Executable & ' _Msg "1st Msg" "This is first msg" 3') Run($Executable & ' _Msg "2nd Msg" "This is second msg" 3') Run($Executable & ' _Msg "3rd Msg" "This is third msg" 3') Run($Executable & ' _Msg "4th Msg" "This is fourth msg" 3') Sleep(100) Run($Executable & ' _ride "1st Msg" 20 20 1') Run($Executable & ' _ride "2nd Msg" ' & @DesktopWidth * 0.8 & ' 20 1') Run($Executable & ' _ride "3rd Msg" ' & @DesktopWidth * 0.8 & ' ' & @DesktopHeight * 0.8 & ' 1') Run($Executable & ' _ride "4th Msg" 20 ' & @DesktopHeight * 0.8 & ' 1') Sleep(1000) Run($Executable & ' _ride "1st Msg" ' & @DesktopWidth * 0.8 & ' 20') Run($Executable & ' _ride "2nd Msg" ' & @DesktopWidth * 0.8 & ' ' & @DesktopHeight * 0.8) Run($Executable & ' _ride "3rd Msg" 20 ' & @DesktopHeight * 0.8) Run($Executable & ' _ride "4th Msg" 20 20') ;--------------------------------------------------------------------------------------- Func _Msg($title, $msg, $timeout = 0) MsgBox(0, $title, $msg, $timeout) EndFunc ;==>_Msg ;--------------------------------------------------------------------------------------- Func _ride($title, $destX, $destY, $step = 100) Local $hWnd = WinGetHandle($title) If $hWnd Then Local $aPos = WinGetPos($hWnd) Local $stepX = ($destX - $aPos[0]) / $step Local $stepY = ($destY - $aPos[1]) / $step Local $x = $aPos[0], $y = $aPos[1] For $i = 1 To $step $x += $stepX $y += $stepY WinMove($hWnd, "", $x, $y) Next EndIf EndFunc ;==>_ride ;--------------------------------------------------------------------------------------- Func _CmdLineWatcher() ; Run('"' & @AutoItExe & '" "' & @ScriptFullPath & '" FoldersGUI ' & $hWnd & ' 1') Local $aArgs = $CmdLine Local $sFunc If $aArgs[0] > 0 Then $sFunc = $aArgs[1] _ArrayDelete($aArgs, 1) $aArgs[0] = "CallArgArray" Call($sFunc, $aArgs) If @error = 0xDEAD And @extended = 0xBEEF Then ToolTip("error !! Function does not exist" & @CRLF & "or wrong number of parameter", Default, Default, @ScriptName, 3) Sleep(4000) ToolTip("") EndIf Exit EndIf EndFunc ;==>_CmdLineWatcher ;---------------------------------------------------------------------------------------- a real example of use you can see here: 212478-active_filedlg/ Edited Friday at 09:29 PM by ioa747 added ;~ #NoTrayIcon I know that I know nothing
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now