Leaderboard
Popular Content
Showing content with the highest reputation on 07/14/2015 in all areas
-
AutoIt v3.3.15.0 Beta View File 3.3.15.0 (14th July, 2015) (Beta) AutoIt: Changed: Location of the link pointing to the #pragma directive. Found in the language directives page.Changed: PCRE regular expression engine updated to 8.37. Fixed #3068: Switch comment was incorrect in the documentation.Fixed #2997: Fixed bug with caseless UTF regular expressions.Fixed #3009: MouseGetCursor() for HAND.Fixed #2899: WinGetHandle("LAST") @error.Fixed #2945: Center and right justified text broken on native buttons when colours set.Fixed #2916: GUISetCoord() not used in GUICtrlCreatePic().Fixed #2869: GUICtrlSetTip() displays wrong tip.Fixed #2892: GUICtrlSetData() on Dummy Control.UDFs: Removed: _MathCheckDiv() documentation has been removed, as it was a basic wrapper for Mod($iNum1, $iNum2) THIS IS A SCRIPT BREAKING CHANGERemoved #3071: 4th example from the Random() documentation, as it was for a workaround that isn't required anymore.Fixed #3069: AutoIt Constants include constant help page.Fixed #3075: _WinAPI_WaitForSingleObject() - TimeOut parameters description. Submitter Jon Submitted 07/14/2015 Category Beta4 points
-
listview edit udf
argumentum and one other reacted to Kanashius for a topic
This UDF can be used to simply edit an Listview. There will be created an inputfield at the position of the subitem, with enter you save, use esc to interrupt,... You can specify single rows and cols or single field (giving row and col,...), also you can specify, if a singleclick or a doubleclick is needed to edit. If you like it, please leave me a comment, also if you have any suggestions to make it better or if you found bugs. I reworked the UDF with AutoIt v3.3.16.1 and added the functionality to use tab to go to the next cell. Files without version numbers contain the current version. Changelog: v1.1.0: - Release v2.0.0: - Add the ability to switch to the next editable cell with tab - Rework to AutoIt v3.3.16.1 (partly) using maps v3.0.0: - Fully reworked to use maps instead of structs (more flexibility/performance) - Uses maps to save editable rows/cols to make ..._isCellEditable faster (No string parsing every time) - Bugfixes v3.0.1: - Fixes Bug with the registered keys not working systemwide v3.0.2: - Fixes Bug where the key input gui wide - The last edited item is now selected - The selection moves with the editable cell, when using ..__updateNextCellIndex (Using the tab key) ListViewEditInput_v1_1_0.au3 Example_v1_1_0.au3 Example_v2_0_0.au3 ListViewEditInput_v2_0_0.au3 Example.au3 ListViewEditInput.au32 points -
I will try to maintain this topic by inserting links in the first post (here) to the snippets to keep track of the snippets. My examples are using AndyG's AssembleIt UDF / AssembleIt2 UDF which is here: AssembleIt.au3 (needs FASM.au3 -> see link below (ward)) ;AssembleIt by Andy @ www.autoit.de ;BIG thx to progandy for the "Buttons" in the debugger ;see examples how to call _AssembleIt() ;Listview changed in Debugger 12.05.2012 ;SSE-Register are nor in the right direction (bitwise from right to left) 20.02.2012 ;Debugger included 07.04.2011 ;modified by UEZ 05.03.2015 #include-once #include "FASM.au3" #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> ;#include <GUIListBox.au3> #include <GuiStatusBar.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <array.au3> #include <GuiListView.au3> #include <WinAPI.au3> ;Opt("MustDeclareVars", 1) If @AutoItX64 Then MsgBox(0, "_AssembleIt Error", "Sorry, 64Bit is not supported. Program will be terminated!") Exit EndIf Global $_ASSEMBLEIT_FLAG = 1 Global $Fasm = FasmInit() If @error Then MsgBox(0, "_AssembleIt Error", "Not able to FasmInit! Program will be terminated!") Exit EndIf ; #FUNCTION# ====================================================================================== ; Name ..........: _AssembleIt() ; Description ...: "Wrapper" for the FASM.au3 by Ward ; Syntax ........: _AssembleIt($Returntype, $sFunc, $Type1 = "type", $Param1 = 0, $Type2 = "type", $Param2 = 0.... ; Parameters ....: $Returntype - Data type returned by the assembled program ; $sFunc - Name of the function, in which the Assemblercode is contained ; $sType1 - DataType of Parameter1 ; $sParam1 - Parameter1 ; $sType2 - DataType of Parameter2 ; $sParam2 - Parameter2.....and so on, you can pass up to 20 parameters ; ; Return values .: Success depends on $Returntype @error=0 ; Failure @error = -2 FasmReset has failed ; Failure @error = -3 Error in Assemblercode detected by Fasm ; Failure @error = -4 Function with Assemblercode doesn´t exist (i.e. wrong functionname) ; Failure @error = -5 Error while executing MemoryFuncCall ; ; Author ........: Andy @ www.autoit.de ; Modified ......: ; Remarks .......: _AssembleIt() instructs MemoryFuncCall with cdecl-convention, so only a RET is necessary at the end of the ASM-code ; If $_ASSEMBLEIT_FLAG = 0 is set before calling AssembleIt(), an AutoIt-code to call the opcodes without the need of FASM.au3 is created ; Related .......: Fasm.au3 by Ward http://www.autoitscript.com/forum/index.php?showtopic=111613&view=findpost&p=782727 ; Link ..........: ; Example .......: ; ================================================================================================= Func _AssembleIt($Returntype, $sFunc, $Type1 = "int", $Param1 = 0, $Type2 = "int", $Param2 = 0, $Type3 = "int", $Param3 = 0, $Type4 = "int", $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) ;assembles the code FasmReset($Fasm) If @error Then MsgBox(0, "_AssembleIt Error", "Error in Function FasmReset()") Return SetError(-2, 0, "ERROR -2") EndIf If $sFunc <> "" Then Call($sFunc) ;extract Assemblercode from function $sFunc() If @error = 0xDEAD Then MsgBox(0, "_AssembleIt Error", "The called function " & $sFunc & " doesn´t exist or contains errors!") Return SetError(-4, 0, "ERROR -4") EndIf Local $bytecode = FasmGetBinary($Fasm) ;assemble ASM-code to opcodes If @extended Then ;shows errors during assembling Local $Error = FasmGetLastError() ;gets errors MsgBox(0, "FASM-ERROR in function " & $sFunc & "()", "Error Code:" & $Error[0] & _ @CRLF & "Error Message:" & $Error[1] & @CRLF & "Error Line:" & $Error[2] & @CRLF) Return SetError(-3, 0, "ERROR -3") Else ;no errors during assembling the code FileDelete("asm_test.bin") ;creates binary file with opcodes, in the case that someone wants to use an external debugger^^ FileWrite("asm_test.bin", BinaryToString(String(FasmGetBinary($Fasm)))) ; ConsoleWrite($bytecode & @CRLF) ;opcodes, can easily be copied and inserted somewhere.... If $_ASSEMBLEIT_FLAG = 0 Then ;if less then 4 parameters, CallWindowProcW is possible If @NumParams > 10 Then ;only a maximum of 4 parameters in CallWindowProcW posssible MsgBox(0, "_AssembleIt Error", "The $_ASSEMBLEIT_FLAG is set to 0, but more than 4 Parameters are used in the Function " & $sFunc & @CRLF & _ "Please reduce the number of parameters to a maximum of 4 if you want an AutoItscript with a CallWindowProcW-call!") Exit Else ;all is ready to create an AutoItscript which can execute the opcodes without FASM.au3 Local $scriptstring = 'Local $iRet, $tCodeBuffer = DllStructCreate("byte ASM[' & StringLen($bytecode) / 2 - 1 & ']") ;reserve memory for ASM opcodes' & @CRLF & _ '$tCodeBuffer.ASM = "' & $bytecode & '" ;write opcodes into memory (struct)' & @CRLF $scriptstring &= '$iRet = DllCall("user32.dll", "' & $Returntype & '", "CallWindowProcW", "ptr", DllStructGetPtr($tCodeBuffer)' Local $n = 1 For $i = 3 To 9 Step 2 ;CallWindowProcW must be called with 4 parameters... $scriptstring &= ', "' & Eval("Type" & $n) & '", ' If Eval("Param" & $n) <> 0 Or Eval("Param" & $n) <> "" Then $scriptstring &= "Param" & $n Else $scriptstring &= '0' EndIf $n += 1 Next $scriptstring &= ')' & @CRLF ClipPut($scriptstring) ;puts the AutoItcode into Clipboard MsgBox(0, "_AssembleIt() Info!", "The following code was created and written into the Clipboard:" & _ @CRLF & @CRLF & $scriptstring & @CRLF & @CRLF & @CRLF & _ "This code can now be inserted into an AutoIt-Script, please adapt the parameters in the Dll-call to the used AutoIt-variables!" & _ @CRLF & "The Program will be terminated!") FasmExit($Fasm) Exit EndIf ElseIf $_ASSEMBLEIT_FLAG = 2 Then $scriptstring = '$tCodeBuffer.ASM = "' & $bytecode & '" ;write opcodes into memory (struct) / length: ' & StringLen($bytecode) / 2 - 1 ClipPut($scriptstring) MsgBox(0, "_AssembleIt() Info!", "ONLY the byte code line was created and written into the Clipboard:" & _ @CRLF & @CRLF & $scriptstring) FasmExit($Fasm) Exit EndIf ;MemoryFuncCall Local $scriptstring = 'MemoryFuncCall("' & $Returntype & ':cdecl",' & FasmGetFuncPtr($Fasm) ;cdecl instructs the function to clean the stack, only a simple RET at the end is necessary ;Local $scriptstring = 'MemoryFuncCall("' & $Returntype & '",' & FasmGetFuncPtr($Fasm) ;if "compatible" mode to existing programs is required, please commend out this line Local $n = 1 For $i = 3 To @NumParams Step 2 ;all parameters $scriptstring &= ',"' & Eval("Type" & $n) & '", $Param' & $n $n += 1 Next $scriptstring &= ')' Local $a = Execute($scriptstring) ;do the MemoryFuncCall, execute the opcodes If @error Then MsgBox(0, "_AssembleIt Error", "Error executing the MemoryFuncCall!") Return SetError(-5, 0, "ERROR -5") EndIf ;_arraydisplay($a) Return SetError(0, 0, $a[0]) EndIf EndFunc ;==>_AssembleIt Func _($str) ;short version of Fasmadd Fasmadd($Fasm, $str) EndFunc ;==>_ ;debug-Fenster Dim $_DBG_LABEL[170] Global $hwnd_weiterbutton, $_DBG_closebutton Global $_DBG_firstcall = True, $_DBG_buttonID Global $_DBG_GUI = GUICreate("AssembleIt Debug-Info 1.0", 670, 550, 10, 10, 0, $WS_EX_DLGMODALFRAME) Global $_DBG_winpos = WinGetPos($_DBG_GUI) Global $_DBG_Window_posold_x = $_DBG_winpos[0] ;fensterposition merken Global $_DBG_Window_posold_y = $_DBG_winpos[1] + $_DBG_winpos[3] ;$WM_MOVING = 0x0216 Global $_DBG_BUTTONSGUI = -1 GUIRegisterMsg(0x0216, "_DBG_WM_MOVING") ; $WM_MOVING GUIRegisterMsg(0x0232, "_DBG_WM_MOVING") ; $WM_EXITSIZEMOVE GUIRegisterMsg($WM_MOVE, "_DBG_WM_MOVING") ;~ GUIRegisterMsg($WM_MOVING, "_DBG_WM_MOVING") ;~ GUIRegisterMsg($WM_SIZE, "_DBG_WM_SIZE") ;GUIRegisterMsg($WM_COMMAND, "_DBG_WM_COMMAND") $_DBG_LABEL[18] = GUICtrlCreateLabel("FPU-Register showed as DOUBLE!", 10, 175, 290, 16) GUICtrlSetFont(-1, -1, -1, 4) ;GUICtrlSetResizing ( -1, 32+ 2 ) $_DBG_LABEL[17] = GUICtrlCreateLabel("EFlags", 580, 16, 102, 16) GUICtrlSetFont(-1, -1, -1, 4) $_DBG_LABEL[38] = GUICtrlCreateLabel("CF =", 580, 32 + 16 * 0, 30, 16);CF $_DBG_LABEL[59] = GUICtrlCreateLabel("DF =", 580, 32 + 16 * 1, 30, 16) $_DBG_LABEL[39] = GUICtrlCreateLabel("PF =", 580, 32 + 16 * 2, 30, 16) $_DBG_LABEL[68] = GUICtrlCreateLabel("OF =", 580, 32 + 16 * 3, 30, 16) $_DBG_LABEL[48] = GUICtrlCreateLabel("AF =", 580, 32 + 16 * 4, 30, 16) $_DBG_LABEL[49] = GUICtrlCreateLabel("ZF =", 580, 32 + 16 * 6, 30, 16) $_DBG_LABEL[58] = GUICtrlCreateLabel("SF =", 580, 32 + 16 * 7, 30, 16) For $i = 0 To 7 $_DBG_LABEL[10 + $i] = GUICtrlCreateLabel("ST" & $i & " = ", 10 + Mod($i, 2) * 180, 195 + 16 * Int($i / 2), 30, 16) $_DBG_LABEL[80 + $i] = GUICtrlCreateLabel("", 50 + Mod($i, 2) * 180, 195 + 16 * Int($i / 2), 100, 16) $_DBG_LABEL[30 + $i] = GUICtrlCreateLabel("XMM" & $i & " = ", 10, 400 + 15 * $i, 40, 16);XMM0-XMM7 $_DBG_LABEL[90 + $i] = GUICtrlCreateLabel("", 60, 400 + 15 * $i, 300, 16);XMM $_DBG_LABEL[40 + $i] = GUICtrlCreateLabel("", 60, 32 + 16 * $i, 400, 16);hex $_DBG_LABEL[50 + $i] = GUICtrlCreateLabel("", 150, 32 + 16 * $i, 400, 16);int $_DBG_LABEL[60 + $i] = GUICtrlCreateLabel("", 230, 32 + 16 * $i, 300, 16);float $_DBG_LABEL[70 + $i] = GUICtrlCreateLabel("", 320, 32 + 16 * $i, 240, 16);bin $_DBG_LABEL[100 + $i] = GUICtrlCreateLabel("", 610, 32 + 16 * $i, 40, 16) ;eflags $_DBG_LABEL[110 + $i] = GUICtrlCreateLabel("", 280, 400 + 15 * $i, 250, 16);XMM-2xdouble $_DBG_LABEL[120 + $i] = GUICtrlCreateLabel("", 440, 400 + 15 * $i, 250, 16);XMM-4xfloat Next GUICtrlSetPos($_DBG_LABEL[105], 590, 32 + 16 * 5, 1, 1) ;platz machen für ungenutztes label $_DBG_LABEL[20] = GUICtrlCreateLabel("FPU-Flags", 10, 270, 55, 16) GUICtrlSetFont(-1, -1, -1, 4) $_DBG_LABEL[21] = GUICtrlCreateLabel("CO= C1= C2=", 520, 200, 135, 20) $_DBG_LABEL[25] = GUICtrlCreateLabel("Stack", 370, 175, 130, 20) GUICtrlSetFont(-1, -1, -1, 4) $_DBG_LABEL[26] = GUICtrlCreateLabel("HEX", 450, 175, 130, 20) GUICtrlSetFont(-1, -1, -1, 4) $_DBG_LABEL[27] = GUICtrlCreateLabel("INT", 550, 175, 130, 20) GUICtrlSetFont(-1, -1, -1, 4) For $i = 40 To 0 Step -4 $_DBG_LABEL[129 + $i / 4] = GUICtrlCreateLabel(StringFormat("[esp %+02.2d]", 40 - $i), 370, 195 + 16 * $i / 4, 50, 16);129-140 $_DBG_LABEL[141 + $i / 4] = GUICtrlCreateLabel("", 450, 195 + 16 * $i / 4, 100, 16);141-152 $_DBG_LABEL[155 + $i / 4] = GUICtrlCreateLabel("", 550, 195 + 16 * $i / 4, 100, 16);155-161 Next $_DBG_LABEL[108] = GUICtrlCreateLabel("SSE-Register HEX", 10, 375, 150, 20) GUICtrlSetFont(-1, -1, -1, 4) $_DBG_LABEL[109] = GUICtrlCreateLabel("2x Double", 280, 375, 100, 20) GUICtrlSetFont(-1, -1, -1, 4) $_DBG_LABEL[118] = GUICtrlCreateLabel("4x Float", 450, 375, 100, 20) GUICtrlSetFont(-1, -1, -1, 4) ;GUIRegisterMsg($WM_COMMAND, "MyWM_COMMAND") Global $listviewitem_reg32[8] Global $reg_32[8] = ["EAX", "EBX", "ECX", "EDX", "ESI", "EDI", "ESP", "EBP"] Global $Listview_reg32 = GUICtrlCreateListView("REG32|HEX|INT|FLOAT|BIN [BIT31....Bit0]", 10, 2, 560, 172, BitOR($GUI_SS_DEFAULT_LISTVIEW, $LVS_NOSORTHEADER));,$GUI_BKCOLOR_LV_ALTERNATE ) GUICtrlSetFont(-1, 8.5, -1, -1) GUICtrlSetBkColor($Listview_reg32, 0xF0f0f0) ; Grau GUICtrlSetBkColor($Listview_reg32, $GUI_BKCOLOR_LV_ALTERNATE) _GUICtrlListView_BeginUpdate($Listview_reg32) For $i = 0 To 7 $listviewitem_reg32[$i] = GUICtrlCreateListViewItem($reg_32[$i] & "|0xDDDDDDDD|88888888888|9.99999999E999|00000000 00000000 00000000 00000000 ", $Listview_reg32) GUICtrlSetBkColor($listviewitem_reg32[$i], 0xFFFFFF) ; weiss Next For $i = 0 To 4 _GUICtrlListView_SetColumnWidth($Listview_reg32, $i, $LVSCW_AUTOSIZE_USEHEADER);$LVSCW_AUTOSIZE) Next _GUICtrlListView_EndUpdate($Listview_reg32) ;thx progandy für den "button" ! Global Const $tagDLGTEMPLATE = "align 2 ;DWORD style; DWORD dwExtendedStyle; WORD cdit; short x; short y; short cx; short cy;" Global Const $tagDLGITEMTEMPLATE = "align 2 ;DWORD style; DWORD dwExtendedStyle; short x; short y; short cx; short cy; WORD id;" Global $_DBG_noshowflag = 0 Global $dlgproc = DllCallbackRegister("_DlgProc", "bool", "hwnd;uint;wparam;lparam") Global $_DBG_ = DllCallbackRegister("_DBG_MSGBOX", "dword", "dword;dword;dword;dword;dword;dword;dword;dword;dword") ;speicher reservieren für datenbereich Global $ptr_dbgmem = Number(_MemGlobalAlloc(600, 0)) ;512 byte + 8 byte weil nur 8byte-align Local $mod = Mod($ptr_dbgmem, 16) ;benötigt wird für SSE-Register abe 16-byte-align If $mod <> 0 Then $ptr_dbgmem += (16 - $mod) ;16 byte align EndIf Global $_dbg_string[100], $_DBG_nr = 0, $_DBG_command[2] Global $struct_FXSAVE = DllStructCreate("byte[512]", $ptr_dbgmem);platz für Daten aus FXSAVE Global $struct_STACK = DllStructCreate("dword[11]", $ptr_dbgmem + 520);platz für Daten aus STACK [esp-20] bis [esp+20] Global $ptr_STACK = DllStructGetPtr($struct_STACK) ;http://siyobik.info/index.php?module=x86&id=128 ;ob ich diese flags noch einbaue, weiss ich nicht Local $struct = DllStructCreate("" & _ "word FCW;" & _ ;FPU control word 0+1 "word FSW;" & _ ;FPU statusword 2+3 "byte FTW;" & _ ;FPU ag word 4 "byte;" & _ ;reserved 5 "word FOP;" & _ ;FPU opcode 6+7 "dword FIP;" & _ ;FPU instruction pointer 8-11 "word CS;" & _ ; 12-13 "word ;" & _ ;reserved 14-15 "dword FDP;" & _ ; 16-19 "word DS;" & _ ; 20+21 "word ;" & _ ;reserved 22-23 "dword MXCSR;" & _ ;MXCSR 24-27 "dword MXCSR_MASK;" & _ ;MXCSR_MASK 28-31 "byte[10] ST0;") ;ST0 32-41 Global $struct_double = DllStructCreate("double[8]") ;platz für 8 doubles der FPU register st0-st7 Global $struct_128SSE = DllStructCreate("byte[128]", Ptr($ptr_dbgmem + 160));platz für 16 byte SSE Global $struct_EFLAGS = DllStructCreate("dword EFLAGS", Ptr($ptr_dbgmem + 512));platz 32 bit eflags Global $ptr_SSE = DllStructGetPtr($struct_128SSE) ;pointer Global $ptr_EFLAGS = DllStructGetPtr($struct_EFLAGS) Global $struct_SSE64x2int = DllStructCreate("uint64[16]", $ptr_SSE) ;platz für 2x 64byte SSE Global $struct_SSE32x4int = DllStructCreate("uint[32]", $ptr_SSE) ;platz für 4x 32byte SSE Global $struct_SSE16x8int = DllStructCreate("word[64]", $ptr_SSE) ;platz für 8x 16byte SSE Global $struct_SSE64x2dbl = DllStructCreate("double[16]", $ptr_SSE) ;platz für 2x 64byte DOUBLE SSE Global $struct_SSE32x4flt = DllStructCreate("float[32]", $ptr_SSE) ;platz für 4x 32byte FLOAT SSE ;debug-funktion, aus dem asmcode per call an die callback-adresse aufgerufen Func _DBG_MSGBOX($anz, $edi, $esi, $ebp, $esp, $ebx, $edx, $ecx, $eax);aus asm übergebene register If $_DBG_noshowflag = 1 Then Return 0 GUISetState(@SW_SHOW, $_DBG_GUI) _WinAPI_UpdateWindow($_DBG_GUI) ;_DBG_WM_SIZE($_DBG_GUI,0,0,0) Dim $reg[8] = [$eax, $ebx, $ecx, $edx, $esi, $edi, $esp, $ebp] _GUICtrlListView_BeginUpdate($Listview_reg32) For $i = 0 To 7 ;fenster mit Werten füllen GUICtrlSetData($listviewitem_reg32[$i], "|" & Ptr($reg[$i]) & "|" & _ String($reg[$i]) & "|" & _ StringFormat(" %2.6G", int2float($reg[$i])) & "|" & int2bin($reg[$i])) ;hex GUICtrlSetData($_DBG_LABEL[$i + 80], DllStructGetData($struct_double, 1, $i + 1));FPU st0-st7 ;SSE $struct_temp = DllStructCreate("byte[16]", $ptr_SSE + 16 * $i) $struct = DllStructCreate("byte[16]") For $z = 1 To 16 DllStructSetData($struct, 1, DllStructGetData($struct_temp, 1, 17 - $z), $z) Next GUICtrlSetData($_DBG_LABEL[$i + 90], DllStructGetData($struct, 1)) GUICtrlSetData($_DBG_LABEL[$i + 100], BitAND(2 ^ $i, DllStructGetData($struct_EFLAGS, 1)) / (2 ^ $i));eflags $struct = DllStructCreate("double[2]", $ptr_SSE + 16 * $i); 2x 64byte DOUBLE SSE GUICtrlSetData($_DBG_LABEL[$i + 110], StringFormat("%6s %6s", DllStructGetData($struct, 1, 2), DllStructGetData($struct, 1, 1))) $struct = DllStructCreate("float[4]", $ptr_SSE + 16 * $i); 4x 32byte FLOAT SSE GUICtrlSetData($_DBG_LABEL[$i + 120], StringFormat("%10.5f %10.5f %10.5f %10.5f", DllStructGetData($struct, 1, 4), DllStructGetData($struct, 1, 3), DllStructGetData($struct, 1, 2), DllStructGetData($struct, 1, 1))) Next GUICtrlSetData($_DBG_LABEL[101], BitAND(2 ^ 10, DllStructGetData($struct_EFLAGS, 1)) / (2 ^ 10));eflags DF GUICtrlSetData($_DBG_LABEL[103], BitAND(2 ^ 11, DllStructGetData($struct_EFLAGS, 1)) / (2 ^ 11));eflags OF For $i = 0 To 10 ;stack GUICtrlSetData($_DBG_LABEL[141 + $i], Ptr(DllStructGetData($struct_STACK, 1, $i + 1)));stack hex GUICtrlSetData($_DBG_LABEL[155 + $i], Int(DllStructGetData($struct_STACK, 1, $i + 1)));stack int Next _GUICtrlListView_EndUpdate($Listview_reg32) If $anz = 0 Or Execute($_dbg_string[$anz]) Then Switch __GET_MSGBOX_BUTTON() Case 0, 1 Case 2 $_DBG_noshowflag = True Case 3 DllCall("kernel32.dll", "none", "ExitProcess", "int", 0xDEADBEEF) EndSwitch EndIf Return 0 EndFunc ;==>_DBG_MSGBOX Func __GET_MSGBOX_BUTTON() Local Static $tDLG, $aOldPos[4] = [0, 0, -1, -1] Local $pos_DBB_Window = WinGetPos($_DBG_GUI) ;Positionsdaten der GUI holen If $aOldPos[0] <> $pos_DBB_Window[0] Or $aOldPos[1] <> $pos_DBB_Window[1] Or $aOldPos[2] <> $pos_DBB_Window[2] Or $aOldPos[2] <> $pos_DBB_Window[2] Then $aOldPos = $pos_DBB_Window Local $x = Int($pos_DBB_Window[0] / 2) Local $y = Int(($pos_DBB_Window[1] + $pos_DBB_Window[3]) / 2) ;es folgen die Daten für den "...NEXT"-Button, der muss ein modales Fenster sein, wer da eine andere Idee hat, bitte melden Local $w = Int($pos_DBB_Window[2] / 2) ;breite Button Local $h = 30 ;höhe Button Local $bTitle = StringToBinary("Next....", 2) ;text Button Local $bXY = BinaryMid(Binary($x), 1, 2) & BinaryMid(Binary($y), 1, 2);Buttondaten Local $bWH = BinaryMid(Binary($w), 1, 2) & BinaryMid(Binary($h), 1, 2) Local $bWhalfH = BinaryMid(Binary(Int($w / 2 - 15)), 1, 2) & BinaryMid(Binary($h), 1, 2) Local $bDIALOG = Binary("0x00000090400000040300") & $bXY & $bWH & Binary("0x000000000000") & Binary("0x000000500000000000000000") & $bWhalfH & Binary("0x0100FFFF8000") & $bTitle & Binary("0x0000") & Binary("0x0000") ; |Style ||ExStyl||cdit| |Empty "Arrays"| |Style ||ExStyl||x ||y | |id||BUTTON| |Chr0| |irgend welche anderen Arrays $x = Mod(BinaryLen($bDIALOG), 4) If $x Then $bDIALOG &= BinaryMid(Binary("0x000000"), 1, $x) $bTitle = StringToBinary("End Debugging", 2) ;text Button $bDIALOG &= Binary("0x0000005000000000") & BinaryMid(Int($w / 2 - 15), 1, 2) & Binary("0x0000") & $bWhalfH & Binary("0x0200FFFF8000") & $bTitle & Binary("0x0000") & Binary("0x0000") $x = Mod(BinaryLen($bDIALOG), 4) If $x Then $bDIALOG &= BinaryMid(Binary("0x000000"), 1, $x) $bTitle = StringToBinary("Kill", 2) ;text Button $bDIALOG &= Binary("0x0000005000000000") & BinaryMid(Int($w - 30), 1, 2) & Binary("0x0000") & BinaryMid(30, 1, 2) & BinaryMid($h, 1, 2) & Binary("0x0300FFFF8000") & $bTitle & Binary("0x0000") & Binary("0x0000") $tDLG = DllStructCreate("byte[" & BinaryLen($bDIALOG) & "]") DllStructSetData($tDLG, 1, $bDIALOG) ;Button-Daten in struct schreiben EndIf Local $aRet = DllCall("user32.dll", "int", "DialogBoxIndirectParamW", "ptr", 0, "ptr", DllStructGetPtr($tDLG), "hwnd", 0, "ptr", DllCallbackGetPtr($dlgproc), "lparam", 0) If @error Then Return 0 Return $aRet[0] EndFunc ;==>__GET_MSGBOX_BUTTON ;Alle Register, Flags, Stack usw werden in einen Speicherbereich geschrieben und von dort mit ;der Funktion _DBG_MSGBOX() ausgelesen Func _asmdbg_($_DBG_command = "") ;Register _("push dword[esp+40]") ;stack in memory _("pop dword[" & $ptr_STACK & "]") _("push dword[esp+36]") ;stack in memory _("pop dword[" & $ptr_STACK + 4 & "]") _("push dword[esp+32]") ;stack in memory _("pop dword[" & $ptr_STACK + 8 & "]") _("push dword[esp+28]") ;stack in memory _("pop dword[" & $ptr_STACK + 12 & "]") _("push dword[esp+24]") ;stack in memory _("pop dword[" & $ptr_STACK + 16 & "]") _("push dword[esp+20]") ;stack in memory _("pop dword[" & $ptr_STACK + 20 & "]") _("push dword[esp+16]") ;stack in memory _("pop dword[" & $ptr_STACK + 24 & "]") _("push dword[esp+12]") ;stack in memory _("pop dword[" & $ptr_STACK + 28 & "]") _("push dword[esp+08]") ;stack in memory _("pop dword[" & $ptr_STACK + 32 & "]") _("push dword[esp+04]") ;stack in memory _("pop dword[" & $ptr_STACK + 36 & "]") _("push dword[esp+00]") ;stack in memory _("pop dword[" & $ptr_STACK + 40 & "]") _("pushfd") ;eflags sichern _("pop dword[" & Ptr($ptr_EFLAGS) & "]") ;eflags speichern in struct _("pushfd") ;eflags sichern _("push eax") _("mov eax," & $ptr_dbgmem) ;alle FPU+SSE Registerinhalte und flags sichern _("FXSAVE [eax]") _("fstp qword[" & DllStructGetPtr($struct_double) & "]") ;alle FPU-Register sichern _("fstp qword[" & DllStructGetPtr($struct_double) + 8 & "]") _("fstp qword[" & DllStructGetPtr($struct_double) + 16 & "]") _("fstp qword[" & DllStructGetPtr($struct_double) + 24 & "]") _("fstp qword[" & DllStructGetPtr($struct_double) + 32 & "]") _("fstp qword[" & DllStructGetPtr($struct_double) + 40 & "]") _("fstp qword[" & DllStructGetPtr($struct_double) + 48 & "]") _("fstp qword[" & DllStructGetPtr($struct_double) + 56 & "]") ; _("fwait") _("pop eax") _("pushad") ;alle Register sichern _("pushad") ;auf den stack für für die msgbox If $_DBG_command <> "" Then ;falls kein Befehl übergeben wurde $_DBG_nr += 1 $_dbg_string[$_DBG_nr] = $_DBG_command _("push " & Ptr($_DBG_nr)) ;anzahl der Else _("push " & Ptr(0)) EndIf _("call " & DllCallbackGetPtr($_DBG_)) ;in autoit-callbackroutine springen _("mov eax," & $ptr_dbgmem) ;alle FPU+SSE registerinhalte und flags restore _("FXRSTOR [eax]") ;restore alle FPU-Register ; _("fwait") _("popad") ;alle register wieder zurücksetzen _("popfd") ;eflags setzen EndFunc ;==>_asmdbg_ Func bin2ascii($bin_string) ;string aus nullen und einsen in 8-bit-ascii text string umwandeln Local $step = 8 ;8-Bit ASCII Buchstaben Local $ascii_string = "" ;Rückgabestring For $f = 1 To StringLen($bin_string) Step $step ;string von Vorne nach hinten 8-bitweise durchsuchen Local $t = StringMid($bin_string, $f, $step) ; 8-Bit-Wort, ein ASCII-Buchstabe Local $bin = 0 ;startwert für For $i = 1 To $step ;jedes Bit suchen If StringMid($t, $i, 1) = "1" Then $bin += (2 ^ ($step - $i)) ;wenn Bit=1 dann binärzahl=binärzahl+2^(8-Bitposition) Next $ascii_string &= Chr($bin) Next Return $ascii_string EndFunc ;==>bin2ascii Func int2bin($integer) ;32Bit in binärstring darstellen Local $bin_string = "" For $i = 31 To 0 Step -1 ;asciicode in bits If Mod($i + 1, 8) = 0 Then $bin_string &= " " If BitAND($integer, 2 ^ $i) Then $bin_string &= "1" Else $bin_string &= "0" EndIf Next Return $bin_string EndFunc ;==>int2bin Func int2float($integer) Local $struct = DllStructCreate("int") Local $struct2 = DllStructCreate("float", DllStructGetPtr($struct)) DllStructSetData($struct, 1, $integer) Local $ret = DllStructGetData($struct2, 1) $struct = 0 $struct2 = 0 Return $ret EndFunc ;==>int2float Func _DlgProc($hwnd, $uMsg, $wParam, $lParam) ;thx to progandy! If $uMsg = $WM_INITDIALOG Then $_DBG_BUTTONSGUI = $hwnd ElseIf $uMsg = $WM_CLOSE Then DllCall("user32.dll", "bool", "EndDialog", "hwnd", $hwnd, "int_ptr", 0) Return True ElseIf $uMsg = $WM_COMMAND Then DllCall("user32.dll", "bool", "EndDialog", "hwnd", $hwnd, "int_ptr", BitAND($wParam, 0xFFFF)) Return True ElseIf $uMsg = $WM_DESTROY Then $_DBG_BUTTONSGUI = -1 EndIf Return False EndFunc ;==>_DlgProc Func _DBG_WM_MOVING($hwnd, $uMsg, $wParam, $lParam) If $hwnd = $_DBG_GUI And IsHWnd($_DBG_BUTTONSGUI) Then Local $pos = WinGetPos($hwnd) WinMove($_DBG_BUTTONSGUI, "", $pos[0], $pos[1] + $pos[3]) EndIf Return $GUI_RUNDEFMSG EndFunc ;==>_DBG_WM_MOVING Func _DBG_WM_SIZE($hwnd, $message, $wParam, $lParam);fenstergrösse wird verändert Local $posgui = WinGetPos($_DBG_GUI) $_DBG_Window_posold_x = $posgui[0] ;fensterposition merken $_DBG_Window_posold_y = $posgui[1] ;WinMove($hwnd_weiterbutton, "", $pos[0], $pos[1] + $pos[3], 200, 60);buttonposition anpassen WinMove($hwnd_weiterbutton, "", $posgui[0], $posgui[1] + $posgui[3], $posgui[2], 60);fensterposition anpassen WinMove($_DBG_GUI, "", $posgui[0], $posgui[1], $posgui[2], $posgui[3]);fensterposition anpassen _WinAPI_SetWindowPos($_DBG_buttonID, 0, 0, 0, $posgui[2], 60, 0x0020);buttonpos im fenster resze EndFunc ;==>_DBG_WM_SIZE You can use also different inline assembler UDFs, e.g. Extended Flat Assembler (by Beege) or the originaly by Ward The Embedded Flat Assembler (FASM) UDF Without the help of AndyG and Eukalyptus I wouldn't be able to create ASM code - many thanks!!! Many thanks dudes - you rock! I'm a novice in assembler coding - please don't blame me. Feel free to post your snippets here! Categories String _ASM_StringLFCharCount (counts the line feeds within a string) _ASM_StringReplaceWChar (replaces a unicode char within a string) _StringReverse / _StringReverse2 (reverse a string coded by AndyG) Graphic _ASM_DrawRectFilled (draws a filled rectangle) _ASM_ImageInvert (inverts (negative) an image) _ASM_BitmapCreateBitmapWithAlpha (merges an image with an alpha blend image) _ASM_ImageCreateNegativeMMX (inverts (negative) an image using MMX) _ASM_DrawLineUsingGDIPlus (draws a line using the GDIPlus lib) _ASM_BitCompareBitmapsMMX (bitwise bitmap compare) _ASM_BitmapGetAverageColorValue / _ASM64_BitmapGetAverageColorValue.au3 (gets the average color of a bitmap)2 points
-
2 points
-
Help whit ProcessExists
JuanFelipe and one other reacted to JLogan3o13 for a topic
As J1 states (and I stated in my first response) look at _Singleton in the help file.2 points -
2 points
-
TTS UDF
coffeeturtle reacted to Kanashius for a topic
This is a simple TTS-UDF. If you like it, please leave me a comment, also if you have any suggestions to make it better or if you found bugs. TTS UDF.au31 point -
libZPlay UDF
pixelsearch reacted to Danyfirex for a topic
Hi all. some time without share something. today I made this UDF because I really like this library so I wanted to share with all you. libZPlay (Win32) Version 2.02 06. May, 2010. This is multimedia library for playing mp3, mp2, mp1, ogg, flac, ac3, aac, oga, wav and pcm files and streams. New: version 2.02 can also record sound from soundcard and encode into disk file with mp3, ogg, flac, aac or wav encoder. For more information look into the LibzPlay Page.txt file into the zip file. About the libZPlay UDF supports playing mp3, ogg, AAC, AC-3, flac, wav, pcmUNICODE support for functions using strings ( filename, error messages, ID3 info, ... ) REVERSE PLAYING (you can play song backward in real time, "real" backward playing without predecoding in PCM) built in echo and reverb sound processor internal volume control (without affecting wave out device volume) pulling VU meter data (you can simply create VU meter) built in FFT spectrum graph, library will draw complete spectrum graph on your window ibzPlayExample.au3 Capture: LibzPlayAU3.zip File contents libZPlay.au3libzPlayExample.au3libZPlayform.kxf LibzPlay Page.txt License.txt- From the libZPlay SDKReadme.txt - From the libZPlay SDKChangeLog.txt - From the libZPlay SDKlibzplay.dll - From the libZPlay SDKlibzplay.chm - From the libZPlay SDKlibzplay.chw - From the libZPlay SDK Download: LibzPlayAU3.zip Saludos1 point -
This UDF can be used to create a slider with an imagebackground and an image to move. If you like it, please leave me a comment, also if you have any suggestions to make it better or if you found bugs. Edit: Its now possible to set the value of the Slider (__GDIPlusSlider_set($Slider,$value)) GDIPlusSliderUDF.zip1 point
-
Look in help file for _GDIPlus_ImageLoadFromFile _GDIPlus_ImageGetGraphicsContext _GDIPlus_GraphicsDrawLine _GDIPlus_GraphicsDrawEllipse _GDIPlus_GraphicsDrawRect _GDIPlus_ImageSaveToFile1 point
-
; Something like this... $summary = StringReplace($summary, "| |", "||") $summary = StringReplace($summary, "|||", "||") $summary = StringReplace($summary, "|||", "||") ; can be improved with a regex Do $summary = StringRegExpReplace($summary, "(?:\|\s\||\|{3})", "||") Until @extended = 0 ; Match | | OR \\\1 point
-
1 point
-
Help whit ProcessExists
JuanFelipe reacted to JLogan3o13 for a topic
That is where the question gets muddied; I am sure it is a language barrier issue. You say when you start the .exe it checks the process in TaskManager, then it is verified it and not start.Am I correct in reading it like this? When I launch my compiled script, I would like it to ensure that there is only a single copy of the script running. If there is already a copy of the script running, the second one will exit.1 point -
Help whit ProcessExists
JuanFelipe reacted to JLogan3o13 for a topic
Your question is a bit vague; are you looking to ensure your script isn't run twice, or just making sure the program you're manipulating is already running? If you don't want someone running your script twice, look at _Singleton in the help file. If you're just looking to see if the external program is running, it should be a simple as something like this: If ProcessExists(<external app process>) Then ;Do this Else ;Do that EndIf1 point -
This is a very little program, just to see all fileformats, count,... in a folder and its subdirectorys. If there are Audio/Videofiles, the length of all files will be shown. Maybe you find it helpful. FolderFileInfo_source.zip1 point
-
AutoIt v3.3.15.0 Beta
jaberwacky reacted to Melba23 for a topic
jaberwacky, Just tested - and the answer is "Yes". M231 point -
There are many ways for doing what you want. However they all have two things in common - you have to parse HTTP header to find Content-Disposition for files served as attachments or parse the final url in all others cases. For example, WinHttp.au3 (find the thread in examples) can do both easily (of course that you can use any other available UDF): #include "WinHttp.au3" $sUrl = "http://ligman.me/1IW1oab" $sFile = FileNameFromWeb($sUrl) ConsoleWrite($sFile & @CRLF) MsgBox(4096, "File Name", $sFile) Func FileNameFromWeb($sUrl) If StringLeft($sUrl, 7) <> "http://" And StringLeft($sUrl, 8) <> "https://" Then $sUrl = "http://" & $sUrl ; additional effort to make valid url ; Break the url into peaces Local $aURL = _WinHttpCrackUrl($sUrl) If @error Then Return SetError(1, 0, "") ; invalid url Local $hOpen = _WinHttpOpen() Local $hConnect = _WinHttpConnect($hOpen, $aURL[0] & "://" & $aURL[2]) Local $hRequest If $aURL[1] = $INTERNET_SCHEME_HTTP Then $hRequest = _WinHttpSimpleSendRequest($hConnect, "HEAD", $aURL[6] & $aURL[7]) ElseIf $aURL[1] = $INTERNET_SCHEME_HTTPS Then $hRequest = _WinHttpSimpleSendSSLRequest($hConnect, "HEAD", $aURL[6] & $aURL[7]) EndIf ; Extract filename attribute Local $sFileName = __WinHttpAttribVal(_WinHttpQueryHeaders($hRequest, $WINHTTP_QUERY_CONTENT_DISPOSITION), "filename") ; ...and in case of any failure use the final url If Not $sFileName Then $sFileName = StringRegExpReplace(_WinHttpQueryOption($hRequest, $WINHTTP_OPTION_URL), ".*/", "") ; Close handles _WinHttpCloseHandle($hRequest) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) Return $sFileName EndFunc1 point
-
RaiNote, Your questions are extremely vague, but here are my best guesses: - 1. A simple " * " string should be sufficient. - 2. Add a combo/menu item "All files" and then use the wildcard when coding the action. Be aware that not all AutoIt commands honour wildcard parameters. - 3. Not at all clear what you mean, but how about this: #include <GUIConstantsEx.au3> Global $hGUI_Child, $cClose = 9999 $hGUI = GUICreate("Test", 500, 500, 100, 100) $mFileMenu = GUICtrlCreateMenu("File") $mOpenItem = GUICtrlCreateMenuItem("Open", $mFileMenu) $mExitItem = GUICtrlCreateMenuItem("Exit", $mFileMenu) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $mExitItem Exit Case $mOpenItem $sfile = FileOpenDialog("Open file", @ScriptDir, "AutoIt files (*.au3)") ; Here is the wildcard parameter If $sFile Then $hGUI_Child = GUICreate(StringRegExpReplace($sFile, "^.*\\", ""), 500, 500, 200, 200, Default, Default, $hGUI) $cEdit = GUICtrlCreateEdit(FileRead($sFile), 10, 10, 480, 480) GUISetState() GUISwitch($hGUI) $cClose = GUICtrlCreateButton("Close File", 10, 10, 120, 30) EndIf Case $cClose GUIDelete($hGUI_Child) GUICtrlDelete($cClose) $cClose = 9999 EndSwitch WEnd- 4. No point in answering until we clarify what you mean in 3. - 5. There are many loading progress examples on the forum - search a bit. M231 point
-
I would suggest to add Assembler to the list because there are plenty of inline Assembler routines which are useful. Thanks.1 point
-
Proposal: New subforum in Language Specific Discussion for BAT and CMD
jvanegmond reacted to Jon for a topic
If you run it like "powershell.exe -ExecutionPolicy Bypass -File myscript.ps1" then it works fine. The idea was to just have the new common sexy(!) IT admin focused languages explicitly listed. Everything else can go in the general dev forum unless it warrants its own forum.1 point -
Is this possible to make in autoIt
232showtime reacted to JLogan3o13 for a topic
Yes Edit: Notice, you got an answer keeping in line with the amount of information you provided...1 point -
i saved the example page you gave me as test.htm next to my script then played with it, i got it to click the button, That is what you want to achieve right? #include <IE.au3> Local $oIE = _IECreate(@ScriptDir&'/test.htm',1,1,1,1) Local $oForm = _IEFormGetCollection($oIE, 0) Local $oQuery = _IEFormElementGetCollection($oForm) for $item in $oQuery if $item.classname = 'image-upload' Then $item.click() Consolewrite ("$item.id="&$item.id&@lf) Consolewrite ("$item.tagname="&$item.tagname&@lf) Consolewrite ("$item.classname="&$item.classname&@lf) Consolewrite ("$item.innerText="&$item.innerText&@lf) EndIf ;~ Consolewrite ("$item.id="&$item.id&@lf) ;~ Consolewrite ("$item.tagname="&$item.tagname&@lf) ;~ Consolewrite ("$item.classname="&$item.classname&@lf) ;~ Consolewrite ("$item.innerText="&$item.innerText&@lf) Nexti think it is possible to add the path of file without clicking the button, but im not that advanced in IE, i had a hard time working arround _IEFormGetCollection then _IEFormElementGetCollection btw, becasue i dont understand them well, hope it helped1 point
-
AutoIt v3.3.13.21 Beta View File 3.3.13.21 (July 8th, 2015) (Beta) AutoIt: Added: @OSVersion supports Windows 10 and Windows Server 2016.Added: GUICtrlCreatePic() with PNG example.Added: Constants for native Functions in AutoItConstants.au3.Added #3012: GUISetFont() default value doc.Fixed #3028: GUICtrlCreateCombo() doc formatting.Fixed #3040: Int() doc typos.Fixed #3042: Number() doc clarifications.Fixed #3041: AutoItWinGetTitle() doc example typos.Fixed #3039: AutoItWinSetTitle() doc example typos.Fixed #3057: StringSplit() Return Value if $STR_NOCOUNT doc.Fixed #2901: Memory error when specifying a UTF file mode that includes a BOM when no BOM is present.UDFs: Changed: _ArrayTranspose() algorithm.Changed: _SQLite 3.8.8.1 -> 3.8.10.0.Added: _GDIPlus_ImageGetDimension().Added: _GDIPlus_BitmapCreateDIBFromBitmap() can be used to allow .PNG in GUICtrlCreatePic().Added: _GDIPlus_ImageGetThumbnail().Added #3034: _Timer_SetTimer() doc example.Fixed #3011: _FileListToArrayRec() not closing the open handle.Fixed: _Word_DocFind(), _Word_DocFindReplace() and _Word_DocPrint() did not set @extended to the COM error code.Fixed #3018: _GDIPlus_EffectCreateHueSaturationLightness () doc and _GDIPlus_BitmapApplyEffect() crash.Fixed #3038: _Timer_SetTimer() callback function parameters.Fixed #3037: _RunDOS() waits for command completion.Fixed #3055: Bad link in _WinAPI_IOCTL() doc.Fixed #3052: _ArraySort() doc clarification for 2D .Fixed #3059: Miscelaneous => Miscellaneous in Help : Typos.Others: Added: lang-autoit.js code highlighting file for Google Prettify. See the Extras\Prettify folder.Added: lang-autoit.js supports multiline comments. Submitter Jon Submitted 07/08/2015 Category Beta1 point
-
_CopyRobo() Folder And File Copy With Robocopy
obiwanceleri reacted to Chimaera for a topic
Ive used Robocopy for a number of years and its a bit of a devil to get working, especially if your not familiar with it. I came across a debate on here about copying folders and adapted the example to work with Robocopy #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 ; Needs Robocopy Version XP_026 or XP_027 for $sCopyParams Compatibility (C:\windows\system32\) ;XP_027 installed in Vista or greater ( Not for XP ) Local Const $sSource = @UserProfileDir & '\Desktop' Local Const $sDestination = 'D:\Backup\Desktop' Local Const $sSearchParams = '*.*' ; _Change_String('*.jpg|*.png') for multiple selections Local Const $sCopyParams = '/COPY:D /S /ZB /XJD /XJF /R:0 /W:0 /XA:SHT /NJS' ; /COPY:D = Copy Data /S = Copy Subfolders /ZB = Use Restartable Mode /XJD = Exclude junction Points For Directorys /XJF = Exclude junction Points For Files ; /R:0 = Retry Time - 0 /W:0 = Wait Time - 0 /XA:SHT = No System / Hidden or Temp Files Backed Up /NJS = No Job Summary in the CMD window Local Const $sExcludeFiles = '/XF ' & _Change_String('add.ini|your.ini|files.ini|to.ini|exclude.ini|here.ini') ; e.g. '*.iss|*.lnk|*.properties|*.session|aaw7boot.log|Amanda.wma' Local Const $sExcludeFolders = '/XD ' & '"' & $sDestination & '"' & ' ' & _Change_String('Add|your|folders|to|exclude|here') ; e.g. 'ATI|AMD|Intel|Program Files|Program Files (x86)|Windows' _CopyRobo($sSource, $sDestination, $sSearchParams, $sCopyParams, $sExcludeFiles, $sExcludeFolders) Func _CopyRobo($sSourceFolder, $sDestFolder, $sSearchParams, $sCopyParams, $sExcludeFiles, $sExcludeFolders) DirRemove($sDestFolder, 1) Local Const $iSourceSize = DirGetSize($sSourceFolder) Local Const $iRoboPID = Run('robocopy.exe' & ' ' & '"' & $sSourceFolder & '"' & ' ' & '"' & $sDestFolder & '"' & ' ' & $sSearchParams & ' ' & $sCopyParams & ' ' & $sExcludeFiles & ' ' & $sExcludeFolders, '', @SW_SHOW); @SW_HIDE Once its working Local $iPercent = 0 ProgressOn('Copy Progress', 'Please Wait...') Do $iPercent = Int((DirGetSize($sDestFolder) / $iSourceSize) * 100) ProgressSet($iPercent, $iPercent & ' percent complete') Sleep(20) Until Not ProcessExists($iRoboPID) ProgressOff() EndFunc ;==>_CopyRobo Func _Change_String($sString) Return '"' & StringReplace($sString, "|", '" "') & '"' EndFunc ;==>_Change_String ;~ ConsoleWrite("Search Files Params = " & $sSearchParams & @CRLF) ; For double cheking ;~ ConsoleWrite("Exclude FileList Params = " & $sExcludeFiles & @CRLF) ; For double cheking ;~ ConsoleWrite("Exclude FolderList Params = " & $sExcludeFolders & @CRLF) ; For double cheking Based loosely on this Hope it helps Thx to guinness and Melba for the assist1 point -
.NET
kcvinu reacted to JSThePatriot for a topic
.NET is a good language to learn as M$ is pushing it hard, and its paying off as there are many jobs out there right now that require .NET experience. I personally dont like .NET due to its very large footprint. I would hate to have to tell a client (that didnt already have a .NET runtime) hey sorry you have to download and install this monster before being able to use my App. JS1 point