Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/01/2013 in all areas

  1. [this post are in deletion pending] User: See my signature for more info! AutoIT3 Virtualization UDF Virtual File, Virtual Registry, Dll Virtualization, ActiveX Virtualization Enable you to store file virtually in memory.Virtualizing program module like Dll, ActiveX Component and Etc. You can try virtualize Flash ActiveX and Flash Movie too. Ha.. Ha.. 3x At least you does not need MemoryDllCall again just use. DllOpen, DllCall, DllClose and Etc. There for example I create ActiveX component TColorBox in Delphi and virtualize it in AutoIt3. Attach Virtual File to another process Execute dot net application from virtual file and or embedded file Function ; Exports ; Virtual_ActiveXA ; Virtual_ActiveXW ; Virtual_DebugLog ; Virtual_AttachToProcess ; Virtual_DetachFromProcess ; Virtual_DirCreateA ; Virtual_DirCreateW ; Virtual_ExecuteDotNetA ; Virtual_ExecuteDotNetW ; Virtual_FileA ; Virtual_FileW ; Virtual_FileDeleteA ; Virtual_FileDeleteW ; Virtual_IsVirtualFileA ; Virtual_IsVirtualFileW ; Virtual_IsVirtualProcess ; Virtual_LibraryA ; Virtual_LibraryW ; Virtual_LogFileA ; Virtual_LogFileW ; Virtual_Option ; Virtual_ProcessOption ; Virtual_RegDelete ; Virtual_RegWrite ; Virtual_RegKeysEnumVirtualA ; Virtual_RegKeysEnumVirtualW ; Virtual_RegisterServer ; Virtual_UnregisterServer ; Virtual_VirtualGate ; Virtual_VirtualChild ; Virtual_VirtualDeamon Note Don't need call Virtual_RegisterServer if you using Virtual_ActiveXA and or Virtual_ActiveXW function Screenshot Archive Choose which one server you will download the archive. autoit3vt.zip (www.autoitscript.com) Sample.LaunchEmbeddedExe^.zip Last Archive History #03 Attached File autoit3vt.zip 881.71K 95 downloads #02 Attached File autoit3vt.zip 830.67K 11 downloads #01 Attached File autoit3vt.zip 538.92K 27 downloads Yeah, you right Melba!I modified the AutoIT3 executable. Oh so it break the EULA. Now I have been updated the UDF. No executable again, just pure AutoIT3 script. Simple and Complex Implementation - Execute Executable or Dot Net App from embedded script. - Call Embedded Dynamic Link Library with native function DllOpen, DllCall, DllClose and etc (without MemoryDLLCall). - Using two or more different ActiveX version in one machine. - ActiveX sure have incompatible for some upward or backward you can by fix with virtualization. - Also automatically using ActiveX without installing it on machine and or without touching the real Windows Registry. - Good starting point to create application like PortableApps which can run on ROM like CD, DVD or Blueray Disk and or locked memory/USB Disk. - Analyze program by starting it in virtualization. What file and registry activity of program. Possibly for malware ana- lysis. - There wide range implementation of this. Search by ur'self. - Et catera. Take a look for my other post >Graphical AutoIt3 Control >GTK+ Framework | Widgets
    1 point
  2. Hey, I had some troubles finding this so i'm sharing it here hoping it will help some other people! Export Windows network settings for all network adapters: ShellExecuteWait("regedit.exe","/e network.reg HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\Tcpip\Parameters\Interfaces","C:\NetworkSettings\") This will create a file "network.reg" in the folder "C:NetworkSettings" Import Windows network settings for all network adapters using previously exported file: Run("Regedit /S C:\NetworkSettings\network.reg") If the computer is running under a 64bit OS, you need to use this line before importing or it will fail: DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1) This is really useful when you have a computer with a fixed IP that needs to go to DHCP then go back to fixed IP. Just export before DHCP, then import when going back to fixed IP Tested sucessfully on Windows XP and Windows 7.
    1 point
  3. Jos

    GUIGetMsg for button control

    You need to do the inputs first and the buttons next in separate loops because else the input handles are within the button handle range. Jos
    1 point
  4. Hi, Take a look at the _FileReadToArray and StringInStr functions. Br, FireFox.
    1 point
  5. Do you go and see the doctor having made the diagnosis yourself and don't answer the doctors questions? We want to help you, but we need more information. If you can't provide this information ... your problem.
    1 point
  6. jdelaney

    ControlClick Help

    I use [REGEXPCLASS:] to grab those types of control. Works well...such as [REGEXPCLASS:.*BUTTON.*] I think the appended string is dynamic, so shouldn't be hard coded (could be wrong)
    1 point
  7. KaFu

    _WinAPI_GetDC related

    About Device Contexts, something I still have to read too ...
    1 point
  8. i liked your googling FireFox.
    1 point
  9. KaFu

    _WinAPI_GetDC related

    Afaik the DC stays the same as long as the hWnd stays the same, so as long as the desktop hwnd does not change, _WinAPI_GetDC(0) should stay the same and can be obtained one time globally. To free resources _WinAPI_ReleaseDC(0, $hDC) should also be called after usage, and btw., just saw in the MSDN doc comments that this will only get you the DC of the default monitor screen in a multi-monitor set-up, see said docs for a trick to get DC for whole screen in a multi-monitor set-up.
    1 point
  10. jchd

    Snippet Dump

    I also remember this discussion about speed. But speed is nothing when correctness is compromized. Reversing a Unicode string is much harder than reversing codepoints, even doing that correctly with surrogates. One must reverse grapheme clusters and that is way harder. A very common example of grapheme cluster is @CRLF (albeit not a exactly a grapheme in the linguistic sense): reversing it shouldn't give LF followed by CR. EDIT: I've already exposed the issue
    1 point
  11. FireFox

    Edit Control Bug

    Hm... interesting, this does not happend if you use a raw string but the _GUICtrlEdit_SetSel function is needed to create the bug. On the contrary there is no problem on Win8 64bits. (Windows issue I guess) Br, FireFox.
    1 point
  12. UEZ

    Clear Pic control

    Try this: #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 #Include <GDIPlus.au3> #include <MemoryConstants.au3> #include <Memory.au3> #include <GUIConstants.au3> #include <StaticConstants.au3> #Region ### START Koda GUI section ### Form= Global $UI_MAIN = GUICreate("some kind of...", 235, 183, 192, 124) Global $Image = GUICtrlCreatePic("", 8, 8, 220, 140, $SS_SUNKEN+$SS_CENTERIMAGE) Global $SetImg = GUICtrlCreateButton("Set Image", 8, 152, 75, 25) Global $ClearScrn = GUICtrlCreateButton("Clear Image", 152, 152, 75, 25) GUICtrlCreateLabel("/)(O ) _( O)(\", 88, 160, 63, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $TempImg _GDIPlus_Startup() Global $hBmp_Empty = _GDIPlus_BitmapCreateFromScan0(220, 140) Global $hCtx_Empty = _GDIPlus_ImageGetGraphicsContext($hBmp_Empty) _GDIPlus_GraphicsClear($hCtx_Empty, 0xFFF0F0F0) Global $hHBmp_Empty = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBmp_Empty) _GDIPlus_GraphicsDispose($hCtx_Empty) _GDIPlus_BitmapDispose($hBmp_Empty) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE _WinAPI_DeleteObject($hHBmp_Empty) _GDIPlus_Shutdown() Exit Case $SetImg $TempImg = Draw("IDS HABBENING!!") _WinAPI_DeleteObject(GUICtrlSendMsg($Image, 0x0172, 0, $TempImg)) _WinAPI_DeleteObject($TempImg) Case $ClearScrn ; do something here to clear the image control _WinAPI_DeleteObject(GUICtrlSendMsg($Image, 0x0172, 0, $hHBmp_Empty)) EndSwitch WEnd Func Draw($sString = "") Local $hGraphic, $hBrush, $hFormat, _ $hFamily, $hFont, $tLayout, _ $aInfo, $hBitmap, $FontSize, _ $iWidth, $iHeight, $fontStyle, _ $hImage $sString = StringProc($sString, 18) $iWidth = 220 $iHeight = 140 $FontSize = 15 $fontStyle = 1 $hImage = _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight) $hGraphic = _GDIPlus_ImageGetGraphicsContext($hImage) $hBrush = _GDIPlus_BrushCreateSolid('0xFF' & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2)) _GDIPlus_GraphicsFillRect($hGraphic, 0, 0, $iWidth, $iHeight, $hBrush) _GDIPlus_BrushDispose($hBrush) $hFormat = _GDIPlus_StringFormatCreate() $hFamily = _GDIPlus_FontFamilyCreate("consolas") $hFont = _GDIPlus_FontCreate($hFamily, $FontSize, $fontStyle) $tLayout = _GDIPlus_RectFCreate($iWidth/2/5, $iHeight/3, 0, 0) $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $sString, $hFont, $tLayout, $hFormat) $hBrush = _GDIPlus_BrushCreateSolid('0xFF' & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2)) _GDIPlus_GraphicsDrawStringEx($hGraphic, $sString, $hFont, $aInfo[0], $hFormat, $hBrush) $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) _GDIPlus_FontDispose($hFont) _GDIPlus_BrushDispose($hBrush) _GDIPlus_BitmapDispose($hImage) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) Return $hBitmap EndFunc ;==>Draw Func StringProc($StrIn, $SplitMark); i think melba made this Local $StrOut = '', $count, $StrSplit, $StrLen $StrSplit = StringSplit($StrIn, @CRLF, 2) For $X = 0 To UBound($StrSplit) - 1 $StrLen = StringLen($StrSplit[$X]) If $StrLen > 17 Then $count = Ceiling(StringLen($StrSplit[$X]) / $SplitMark) Local $array[$count + 1], $start = 1 For $I = 0 To $count $array[$I] = StringMid($StrSplit[$X], $start, $SplitMark) $start += $SplitMark Next For $I = 0 To $count If $array[$I] = "" Or $array[$I] = " " Then ContinueLoop If StringInStr($array[$I], " ", 0, 1, 1, 1) Then $StrOut &= StringReplace(StringReplace(StringReplace($array[$I], @LF, ""), @CR, ""), " ", "", 1, 1) & @LF Else $StrOut &= StringReplace(StringReplace($array[$I], @LF, ""), @CR, "") & @LF EndIf Next Else If $StrSplit[$X] = "" Then ContinueLoop $StrOut &= StringReplace(StringReplace($StrSplit[$X], @LF, ""), @CR, "") & @LF EndIf Next Return $StrOut EndFunc ;==>StringProc Func _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight, $iStride = 0, $iPixelFormat = 0x0026200A, $pScan0 = 0) Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iHeight, "int", $iStride, "int", $iPixelFormat, "ptr", $pScan0, "int*", 0) If @error Then Return SetError(@error, @extended, 0) Return $aResult[6] EndFunc ;==>_GDIPlus_BitmapCreateFromScan0 I cleaned up your code a little bit by removing unneeded functions. Br, UEZ
    1 point
  13. czardas

    Snippet Dump

    guinness I'm glad to hear that. I used to follow the changes by reading about them in the latest beta thread (which seems to have died a death). I haven't got enough machines to run all these different versions, and every time I follow advice about configuration, things end up in a different and confused state. The most important thing to me is to get some of my projects off the ground. It's a long enough haul as it is. I envisage several more releases of AutoIt before I finish one particular long standing project (actually it's my first autoit project that is taking longer than 10 years). If I had a team working for me I could finish it faster than you could say Jack Robinson. Here's a small sample of the code from that first project. Everything needs to be rewritten, and I intend to write some of it in trinary instead of binary. Trinary will run along side binary to get the best of both worlds. This is just a tiny sample taken from my first attempts on this project - a snapshot taken from several thousand lines of unreadable code. It won't be any easier to read in trinary: just easier to cope with (or so I believe). These strings actually represent guitar chord shapes, but I'm not entirely happy with the Forsyth-Edwards like notation I created, although it's not too bad as far as notation goes. The problem is handling the bulk of variants. A better system is needed. 2•3,3•2,6,6$|••3,3•2,6,4•|,6$2••2,6,4•|,5•,6$4••,6,|•4,3•2,6$3•2,4•|,5•,•5,6$4•|,6,|••3,3•2,6$•4•,6,3•2,6,4•|$•5,6,2••2,6,4•|$5•,6,2••2,6,4•|$•5,2•3,3•2,6,4•|$4•|,5•,•5,6,3•2$4••,6,|••3,3•2, ,•4•,6,6,6$|•2•|,2•3,3•2,6,6$2•2•,3•2,6,4•|,6$3••|,•5,6,5•,6$3••|,•5,6,2•3,6$3••|,5•,6,2•3,6$3••|,6,6,2•2•,6$3•2,•5,|•4,2•3,6$5•,|•2•|,6,3•2,6$3•2,2•3,4•|,6,|•4$3••|,•5,|•4,2•3,6$3••|,•4•,6, ,6$3••|,2•3,|•4,6,6$•5,3••|,2•3,6,6$|•4,5•,3••|,6,6$5•,3••|,2•3,6,6$3••|,2•3,6,5•,6$3••|,2•3,6,•5,6$•5,3•2,2•3,|•4,6$2•3,|•4,•5,3•2,6$3•2,2•3,|•4,•5,6$5•,3••|,6,|•4,6$|•4,6,3••|,2•3,6$2•3,6, •3•|,3•|•,6,6,6$4•|,3•|•,2•3,6,6$•3•|,3•2,6,2•3,6$2•|•|,3•2,6,•5,6$|•3•,6,4•|,3•2,6$3•|•,6,4•|,|•4,6$•5,3•2,|•4,2•3,6$2•3,3•2,|•4,•5,6$|•4,6,2•|•|,3•2,6$3•2,6,2•|•|,|•4,6$2•3,6,3•|•,6,4•|$•3 •3•|,2••2,6,6,6$|•3•,3•2,4•|,6,6$•5,2••2,|•4,6,6$|•4,3•2,2•|•|,6,6$2•3,6,3•••,6,6$5•,•3•|,3•2,6,6$3•••,6,6,|•4,6$3••|,6,2•3,|•4,6$5•,4•|,3•2,2•3,6$•3••,2••2,6,6,6$•3•|,2••2,|•4,6,6$|•3•,3•2, 4•|,|•••2,6,6,6$3•••,6,•5,6,6$3••|,6,•|•3,6,6$5•,2••2,4•|,6,6$5•,4•|,|•|•2,6,6$3•2,6,•••3,6,6$•5,5•,3•2,4•|,6$•5,6,3•2,2•|•|,6$|•4,6,6,3•••,6$3•••,6,6,6,2•3$3•••,6,•|•3,6,6$3••|,6,•••3,6,6$3 •3••,6,6,6$|•2••,6,3•2,6,6$|•2•|,6,2••2,6,6$|•••2,6,6,•5,6$2••2,4•|,6,|•4,6$2•2•,6,3•2,4•|,6$|••3,6,3•2,•5,6$2••2,6,6,|•2•|,6$3•2,•3•|,6,5•,6$3•2,•3•|,6,2•3,6$3•2,4••,6,2•3,6$2•3,6,3•2,•3•|, •2•|•,6,6,6$•2•2,|•4,2•3,6,6$|•4,2•|•|,3•2,6,6$5•,|•4,4•|,3•2,6$2•3,3•|•,6,4•|,6$4•|,•2•2,6,2•3,6$4•|,3•|•,6,2•3,6$3•|•,6,4•|,6,|•4$3•2,6,2•|•|,6,|•4$2•3,3•2,|•4,6,•5$3•|•,6,2•|•|,6,|•4$2•|• •5,|•••2,6,6,6$4••,•5,3•2,6,6$|•4,2••2,4•|,6,6$2•3,3•2,4••,6,6$4•|,•5,2••2,6,6$4••,6,3•2,2•3,6$5•,|•4,3•2,4•|,6$|•4,•5,2•3,6,3•2$|•2•|,•5,2••2,6,6$4••,•5,2••2,6,6$2•2•,|•4,3•2,4•|,6$4••,•5,3 3••|,|••3,6,6,6$5•,2•••|,6,6,6$3••|,2•3,•5,6,6$•5,5•,3••|,6,6$5•,3••|,|•4,6,6$3•2,2•3,••4,6,6$5•,3••|,6,•5,6$•5,6,3••|,2•3,6$|•4,6,5•,3••|,6$3••|,2•3,••4,6,6$3••|,2•3,•4•,6,6$3••|,2•3,•5,5•, 4••,|•|•2,6,6,6$3•|•,4•|,•5,6,6$4•|,|•|•2,2•3,6,6$5•,2•3,3••|,6,6$3•2,4•|,•|•3,6,6$•5,6,6,2•••|,6$3•2,6,•|•3,|•4,6$2•••|,6,6,6,|•4$4••,|•|•2,2•3,6,6$3•|•,4•|,•|•3,6,6$•4•,6,6,2•••|,6$3•|•,4• |•2•|,3•|•,6,6,6$3•|•,•5,4•|,6,6$3•2,•5,2•|•|,6,6$|•2•|,3•2,6,2•3,6$2•|•|,3•2,6,|•4,6$2•2•,6,4•|,3•2,6$3•|•,6,4•|,2•3,6$3•2,•5,2•3,6,|•4$3•2,|•4,2•3,6,•5$3•|•,•5,2•|•|,6,6$3•|•,•5,4•|,2•3,6$ •••3,3•2,6,6,6$|•••2,6,4•|,6,6$2••2,4•|,5•,6,6$4••,6,•5,3•2,6$|•4,•|•3,6,3•2,6$4•|,6,•|•3,3•2,6$5•,6,|•|•2,6,4•|$3•2,2•3,4•|,6,5•$•••3,3•2,6,4•|,6$|•••2,6,4•|,5•,6$••4,3•2,2•3,4•|,6$4••,6,•| 2•••|,5•,6,6,6$2•3,••|•2,6,6,6$3•2,|••3,4•|,6,6$5•,3•2,|•4,4•|,6$•5,6,3••|,5•,6$|•4,2•3,•5,6,3•2$2•|••,3•2,|•4,6,6$••|•2,6,2•|•|,6,6$|•2•|,2•3,•2•2,6,6$|••3,4•|,3•|•,6,6$2•2•,3•2,|•4,4•|,6$| |•|••|,5•,6,6,6$3•2,•|•3,4•|,6,6$|•|••|,6,6,2•3,6$2•2•,4•|,6,3•2,6$5•,3•2,•5,4•|,6$4•|,2•3,3•2,6,|•4$|•|••|,5•,6,2•3,6$|•|••|,6,6,2•2•,6$2•2•,3•2,•5,4•|,6$|•2•|,6,3•2,2•2•,6","201,272,300"], ••|•2,2•3,6,6,6$|••3,3••|,6,6,6$2••2,5•,4•|,6,6$4•|,5•,•2•2,6,6$4•|,6,•2•2,2•3,6$5•,6,|•4,3••|,6$4•|,5•,3•2,6,2•3$2•|••,6,|•4,3•2,6$|•2•|,6,•2•2,2•3,6$2•2•,6,|•4,3••|,6$••|•2,6,2•3,6,4•|$|•• •2••|,5•,6,6,6$3••|,5•,2•3,6,6$•2••|,6,6,2•3,6$|•3•,4•|,6,3•2,6$•2•2,6,|•4,2•3,6$|•4,4•|,2•3,3•2,6$3•2,2•3,4•|,|•4,6$2•3,|•|•2,6,•5,6$2•3,5•,3•2,6,4•|$4•|,2•3,3•2,6,•5$•2••|,5•,2•3,6,6$•2••• |••••|,6,6,6,6$2••|•,4•|,6,6,6$3•2,•••3,6,6,6$4••,3•2,•5,6,6$4•|,3•2,•|•3,6,6$5•,6,|•|••|,6,6$•5,6,3•|•,4•|,6$4••,3•2,•|•3,6,6$|••••|,6,6,5•,6$|••|•|,6,3•2,5•,6$•|•3,6,3•|•,4•|,6$4••,3•2,•5, "2••••,6,6,6,6$2••2,••4,6,6,6$3•2,|••|•|,6,6,6$•5,6,3•••,6,6$4•|,2••2,•5,6,6$5•,4•|,3•2,•5,6$•5,6,3••|,6,2•3$|••|•|,6,3•|•,6,6$|•|•2,4•|,2•3,•5,6$2••2,••4,6,4•|,6$|••|•|,6,5•,6,3•2$•4•,6,3•• ••••2,6,6,6,6$|•••2,4•|,6,6,6$2••2,4••,6,6,6$4••,6,•2•2,6,6$4•|,6,•|••2,6,6$•5,6,3•2,4••,6$5•,6,|•|•2,4•|,6$4••,6,3•2,6,2•3$|•4,6,•|•3,6,3•2$2•|••,6,|•|•2,6,6$|•2•|,6,•|••2,6,6$4••,6,•|••2,6 •,6,6,6,6$•2••|,6,2•3,6,6$3•••,6,2•3,6,6$|•3•,4•|,3•2,6,6$•2•2,6,|••3,6,6$|•4,4•|,2••2,6,6$•2••|,6,6,5•,6$2••2,|•4,6,•5,6$3••|,6,2•3,5•,6$2•3,5•,3•2,4•|,6$3•2,2•|•|,6,|•4,6$2•3,6,6,•2••|,6$5 |•|•••,6,6,6,6$3•2,•|•|•|,6,6,6$|•|••|,6,2•3,6,6$2•2•,4•|,3•2,6,6$3•2,•|•3,6,|•4,6$5•,3•2,4•|,6,2•3$|•|•••,6,2•3,6,6$|•|••|,6,2•3,5•,6$|•2•|,6,2••2,5•,6$|•|•2,6,6,•|•|•|,6$•|•|•|,6,5•,6,3•2$ 3•••,|•4,6,6,6$3••|,|•4,2•3,6,6$5•,2•|•|,3•2,6,6$3•2,2•|•|,•5,6,6$•5,5•,4•|,3•2,6$3•2,2•3,•5,|•4,6$5•,3•2,4•|,•5,6$•5,6,4•|,2••2,6$3•••,|•4,2•3,6,6$3••|,|•4,2•3,5•,6$•4•,6,4•|,2••2,6$2•|•|,• 2•••|,|•4,6,6,6$3•|•,2•|•|,6,6,6$•5,3•|•,4•|,6,6$3•2,|••3,•5,6,6$4••,3•2,6,•5,6$•5,3•2,4•|,2•3,6$4•|,3•2,2•3,•5,6$|•4,6,4••,3•2,6$5•,6,3••|,|•4,6$2•••|,|•4,6,5•,6$•4•,3•2,4•|,2•3,6$4••,3•2,2 ••4,2••2,6,6,6$|••3,3•2,4•|,6,6$2••2,6,4••,6,6$|•4,•5,2•3,3•2,6$4•|,5•,•5,3•2,6$4•|,6,•5,2••2,6$2•3,|•4,3•2,6,4•|$4••,2•3,|•4,3•2,6$|••3,6,3••|,6,5•$|••3,3•2,4•|,6,5•$••4,3•2,2•3,6,4•|$••3•, •2,6,6,6$|•|•2,2•3,4•|,6,6$2•3,3••|,5•,6,6$4•|,•|•3,3•2,6,6$5•,4•|,•5,3•2,6$5•,|•|•2,6,4•|,6$|•2•|,•|•3,3•2,6,6$|•|•2,2•3,4•|,5•,6$2•2•,|•|•2,6,4•|,6$•|•3,|•|•2,6,4•|,6$•|•2•,|•|•2,6,4•|,6", ,6,6$2•|•|,•2•2,6,6,6$3•|•,|•4,4•|,6,6$2•3,•2•2,|•4,6,6$3•2,|•4,2•|•|,6,6$•5,6,4•|,3•|•,6$5•,6,4•|,•2•2,6$2•|•|,•2•|•,6,6,6$2•|•|,•2•2,|•4,6,6$3•|•,|•4,2•|•|,6,6$•2•2,|•4,2•|•|,6,6$2•|•|,3•| |•|••|,2•3,6,6,6$2•2•,3••|,6,6,6$3••|,•|•3,6,6,6$5•,|•|••|,6,6,6$3•2,•|•3,|•4,6,6$5•,3••|,•5,6,6$•5,6,5•,3••|,6$3••|,•|•2•,6,6,6$3••|,•|•3,|•4,6,6$|•|••|,2•3,6,5•,6$|•2•|,2•3,3•2,5•,6$3••|,• •,4•|,6,6,6$2•••|,6,|•4,6,6$•2•2,4•|,2•3,6,6$|••3,6,•2•2,6,6$3•|•,4•|,2•3,6,6$|•4,4••,3•2,6,6$•2•2,4•|,6,5•,6$•2•2,6,2•3,|•4,6$2••2,6,|•4,4•|,6$|•4,4•|,3•2,2•3,6$3•2,4•|,2•3,5•,6$3•2,|••3,6, •|••2,|•4,6,6,6$|•|•2,2•|•|,6,6,6$2•3,3•••,6,6,6$4•|,•|••2,6,6,6$5•,|•|•2,4•|,6,6$5•,4•|,•2•2,6,6$•5,6,6,3•••,6$3•••,6,6,6,|•4$3••|,6,2•3,6,|•4$5•,4•|,3•2,6,2•3$2•|•|,5•,|•|•2,6,6$•|••2,|•4, •2••|,2•3,6,6,6$|•3•,3••|,6,6,6$5•,•2••|,6,6,6$•2•2,2•3,|•4,6,6$|•4,3••|,2•3,6,6$2•3,5•,3••|,6,6$3••|,2•3,6,|•4,6$5•,3••|,6,2•3,6$3•2,2•3,|•4,6,•5$•2•••,2•3,6,6,6$•2••|,2•3,|•4,6,6$|•3•,3••| |•2••,3•2,6,6,6$3•|•,•3•|,6,6,6$|•2•|,3•2,2•3,6,6$2•2•,6,3••|,6,6$3•2,•3•|,2•3,6,6$2•••|,6,6,|•4,6$3•|•,4•|,6,2•3,6$3•2,•5,2•3,|•4,6$|•2••,3•2,2•3,6,6$3•|•,•3•|,2•3,6,6$2•••|,6,6,|•3•,6$3•|• Before I attempt to rewrite this, I must first write another language after AutoMathEdit script has been rewritten (that's two new languages - both will need documenting). Then there's an interpreter to create for the second language. Only then am I likely to find time to make decisions about storing complicated harmonic data. The AutoMathEdit (editor) program is now my main app for handling these complicated monsters, and even that is unfinished. I do not have as much free time as you might think. If all goes well, I will be able to resume work on this project in 2014. The second language I am writing will look something like the following example. It will be case sensitive, space sensitive, and hard to learn, but possible - and that is the point - it will be possible to learn. The complication stems from being limited to ASCII. The details are not yet fully defined. This pseudo code relies heavily on inheritance - always looking back to previous commands to interpret consecutive new commands. It's the only way forward, unless someone radically turns the computing world on its head big time. That's not likely to happen to such an extent as would be required to simplify this any further. |+Ab !G F|: !C D 1.. o >~"C oD | -'G' G ~'Gbb' *3:| Actually the above string reads as garbage. It's readable garbage though (which is about as good as it gets under the heavy constraints). Something like this is certainly needed. Compair it to what is available: lilypond and you'll understand. Lilypond is cool but totally unreadable. No way would you ever envisage the output judging by that input. Perhaps you could say that the code suffers from being in typical script format - reading (vertically) like Chinese. Computers can read it, and that's that. Lilypond is basically too difficult for a musician to read, never mind a programmer. Think about the order of words in that last sentence. If a programmer can't read it, that's a big problem. You will never find one who can, I'm pretty sure. Reading music is hard enough without spreading it around the page in various functions. <rant> Sometimes I think I've bitten off far more than I can chew, although I certainly don't intend to abandon my goals. Ten years is nothing in reality. Learning a programming language is just a single rung on a much larger ladder. Sometimes you just have to take the bull by the horns, regardless of its size. After I first posted this I thought I'd wait a while and then delete it. Instead I just keep thinking of new things to say. AutoIt has given me the opportunity to pursue my goals, I know many here focus on automating office apps and that kind of thing. I suppose if I had a paid job, I'd break the back of that MSO, but it just doesn't interest me. I think computers should be used to benefit mankind, not to automatically print triplicate copies of the world's financial misdemeanors, or turn the world's youth into couch potato gamesters. All I can say is that I'm trying to use my computer as a computer. I desire to calculate everything to the last digit. I might not achieve what I set out to do, but it won't stop me trying.
    1 point
  14. FireFox

    List view error

    I said that it works (at least for me), you should debug your code and see where it stucks. I also suggest you to use the HotKeySet function. Br, FireFox.
    1 point
  15. FireFox

    List view error

    Hi, What do you mean ? It works for me, even your code is a little bit bugged. Br, FireFox.
    1 point
  16. Rather than looking at the shortcut, use the program itself ShellExecute('firefox.exe')
    1 point
  17. How to create a script that,s installation look like a software for example i have create a script of Auto Run PPPoE Dailer For XP when i run it.Every one can see what happened and i want to create a script in witch all commands and windows are hide and a wait page run until script is over.......................Please Guide me friends i have no idea about this......... ...............MY Script Code Is That............. Code is in upgradation
    1 point
  18. @hiho Comment that line, if there is already an error com handler then it's fine. Br, FireFox.
    1 point
  19. phonk, If you are still interested, I have developed a new version of my full recursive search UDF with the added possibility to limit the search level as you required. If you need to limit the search level, you merely set the $iRecur parameter to the negative of the level you want (i.e. -2 for 2 levels down). Why negative? That way I avoid script-breaking changes to the UDF - positive 1 already meant unlimited recursion. #include-once ;#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 ; #INDEX# ======================================================================================================================= ; Title .........: _RecFileListToArray ; AutoIt Version : v3.3.1.1 or higher ; Language ......: English ; Description ...: Lists files and\or folders in specified path with optional recursion to defined level and result sorting ; Note ..........: ; Author(s) .....: Melba23 ; Remarks .......: Modified Array.au3 functions - credit: Jos van der Zande, LazyCoder, Tylo, Ultima, SolidSnake and gcriaco ; SRE patterns - credit: various forum members and Spiff59 in particular ; =============================================================================================================================== ; #CURRENT# ===================================================================================================================== ; _RecFileListToArray: Lists files and\or folders in a specified path with optional recursion to defined level and result sorting ; =============================================================================================================================== ; #INTERNAL_USE_ONLY#============================================================================================================ ; _RFLTA_ListToMask ......; Convert include/exclude lists to SRE format ; _RFLTA_AddToList .......; Add element to list which is resized if necessary ; _RFLTA_AddFileLists ....; Add internal lists after resizing and optional sorting ; _RFLTA_ArraySearch .....; Search array for partial match ; _RFLTA_ArraySort .......; Wrapper for QuickSort function ; _RFLTA_QuickSort .......: Recursive array sort ; _RFLTA_ArrayConcatenate : Join 2 arrays ; _RFLTA_ArrayInsert .....: Insert element into array ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name...........: _RecFileListToArray ; Description ...: Lists files and\or folders in a specified path with optional recursion to defined level and result sorting ; Syntax.........: _RecFileListToArray($sPath[, $sInclude_List = "*"[, $iReturn = 0[, $iRecur = 0[, $iSort = 0[, $iReturnPath = 1[, $sExclude_List = ""]]]]]]) ; Parameters ....: $sPath - Initial path used to generate filelist. If path ends in \ then folders will be returned with an ending \ ; $sInclude_List - Optional: filter for included results (default "*"). Multiple filters must be separated by ";" ; $iReturn - Optional: specifies whether to return files, folders or both ; |$iReturn = 0 (Default) Return both files and folders ; |$iReturn = 1 Return files only ; |$iReturn = 2 Return folders only ; $iRecur - Optional: specifies whether to search recursively in subfolders and to what level ; |$iRecur = 1 Search in all subfolders (unlimited recursion) ; |$iRecur = 0 (Default) Do not search in subfolders ; |$iRecur = Negative integer - Search in subfolders to specified depth ; $iSort - Optional: sort ordered in alphabetical and depth order ; |$iSort = 0 (Default) Not sorted ; |$iSort = 1 Sorted ; $iReturnPath - Optional: specifies displayed path of results ; |$iReturnPath = 0 File/folder name only ; |$iReturnPath = 1 (Default) Relative to initial path ; |$iReturnPath = 2 Full path included ; $sExclude_List - Optional: filter for excluded results (default ""). Multiple filters must be separated by ";" ; Requirement(s).: v3.3.1.1 or higher ; Return values .: Success: One-dimensional array made up as follows: ; |$array[0] = Number of Files\Folders returned ; |$array[1] = 1st File\Folder ; |$array[2] = 2nd File\Folder ; |... ; |$array[n] = nth File\Folder ; Failure: Null string and @error = 1 with @extended set as follows: ; |1 = Path not found or invalid ; |2 = Invalid $sInclude_List ; |3 = Invalid $iReturn ; |4 = Invalid $iRecur ; |5 = Invalid $iSort ; |6 = Invalid $iReturnPath ; |7 = Invalid $sExclude_List ; |8 = No files/folders found ; Author ........: Melba23 ; Remarks .......: Compatible with existing _FileListToArray syntax ; Related .......: ; Link ..........; ; Example .......; Yes ; =============================================================================================================================== Func _RecFileListToArray($sInitialPath, $sInclude_List = "*", $iReturn = 0, $iRecur = 0, $iSort = 0, $iReturnPath = 1, $sExclude_List = "") Local $asReturnList[100] = [0], $asFileMatchList[100] = [0], $asRootFileMatchList[100] = [0], $asFolderMatchList[100] = [0], $asFolderSearchList[100] = [1] Local $sFolderSlash = "", $iMaxLevel, $sInclude_List_Mask, $sExclude_List_Mask, $hSearch, $fFolder, $sRetPath = "", $sCurrentPath, $sName ; Check for valid path If Not FileExists($sInitialPath) Then Return SetError(1, 1, "") ; Check if folders should have trailing \ and ensure that initial path does have one If StringRight($sInitialPath, 1) = "\" Then $sFolderSlash = "\" Else $sInitialPath = $sInitialPath & "\" EndIf ; Add path to folder search list $asFolderSearchList[1] = $sInitialPath ; Check for valid recur value If $iRecur > 1 Or Not IsInt($iRecur) Then Return SetError(1, 4, "") ; If required, determine \ count for max recursive level setting If $iRecur < 0 Then StringRegExpReplace($sInitialPath, "\\", "") $iMaxLevel = @extended - $iRecur EndIf ; Create Include List mask If $sInclude_List = "*" Then $sInclude_List_Mask = ".+" ; Set mask to exclude base folder with NULL name Else If Not _RFLTA_ListToMask($sInclude_List_Mask, $sInclude_List) Then Return SetError(1, 2, "") EndIf ; Create Exclude List mask If $sExclude_List = "" Then $sExclude_List_Mask = ":" ; Set unmatchable mask Else If Not _RFLTA_ListToMask($sExclude_List_Mask, $sExclude_List) Then Return SetError(1, 7, "") EndIf ; Verify other parameters If Not ($iReturn = 0 Or $iReturn = 1 Or $iReturn = 2) Then Return SetError(1, 3, "") If Not ($iSort = 0 Or $iSort = 1) Then Return SetError(1, 5, "") If Not ($iReturnPath = 0 Or $iReturnPath = 1 Or $iReturnPath = 2) Then Return SetError(1, 6, "") ; Search within listed folders While $asFolderSearchList[0] > 0 ; Set path to search $sCurrentPath = $asFolderSearchList[$asFolderSearchList[0]] ; Reduce folder search list count $asFolderSearchList[0] -= 1 ; Determine return path to add to file/folder name Switch $iReturnPath ; Case 0 ; Name only ; Leave as "" Case 1 ;Relative to initial path $sRetPath = StringReplace($sCurrentPath, $sInitialPath, "") Case 2 ; Full path $sRetPath = $sCurrentPath EndSwitch ; Get search handle $hSearch = FileFindFirstFile($sCurrentPath & "*") ; If folder empty move to next in list If $hSearch = -1 Then ContinueLoop ; Search folder While 1 $sName = FileFindNextFile($hSearch) ; Check for end of folder If @error Then ExitLoop ; Set subfolder flag - @extended set in 3.3.1.1 + $fFolder = @extended ; If folder then check whether to add to search list If $fFolder Then Switch $iRecur Case 1 ; Always add _RFLTA_AddToList($asFolderSearchList, $sCurrentPath & $sName & "\") Case 0 ; Never add ; Do nothing Case Else ; Add if max level not exceeded StringRegExpReplace($sCurrentPath, "\\", "") If @extended < $iMaxLevel Then _RFLTA_AddToList($asFolderSearchList, $sCurrentPath & $sName & "\") EndSwitch EndIf ; Match name against Include/Exclude masks If StringRegExp($sName, $sInclude_List_Mask) And Not StringRegExp($sName, $sExclude_List_Mask) Then If $iSort Then ; Save in relevant folders for later sorting If $fFolder Then _RFLTA_AddToList($asFolderMatchList, $sRetPath & $sName & $sFolderSlash) Else ; Select required list for files If $sCurrentPath = $sInitialPath Then _RFLTA_AddToList($asRootFileMatchList, $sRetPath & $sName) Else _RFLTA_AddToList($asFileMatchList, $sRetPath & $sName) EndIf EndIf Else ; Save directly in return list ; Check file/folder type against required return value If $fFolder + $iReturn <> 2 Then ; Add final "\" to folders if required If $fFolder Then $sName &= $sFolderSlash _RFLTA_AddToList($asReturnList, $sRetPath & $sName) EndIf EndIf EndIf WEnd ; Close current search FileClose($hSearch) WEnd If $iSort Then ; Check if any file/folders have been added If $asRootFileMatchList[0] = 0 And $asFileMatchList[0] = 0 And $asFolderMatchList[0] = 0 Then Return SetError(1, 8, "") Switch $iReturn Case 2 ; Folders only ; Correctly size folder match list ReDim $asFolderMatchList[$asFolderMatchList[0] + 1] ; Copy size folder match array $asReturnList = $asFolderMatchList ; Simple sort list _RFLTA_ArraySort($asReturnList) Case 1 ; Files only If $iReturnPath = 0 Then ; names only so simple sort suffices ; Combine file match lists _RFLTA_AddFileLists($asReturnList, $asRootFileMatchList, $asFileMatchList) ; Simple sort combined file list _RFLTA_ArraySort($asReturnList) Else ; Combine sorted file match lists _RFLTA_AddFileLists($asReturnList, $asRootFileMatchList, $asFileMatchList, 1) EndIf Case 0 ; Both files and folders If $iReturnPath = 0 Then ; names only so simple sort suffices ; Combine file match lists _RFLTA_AddFileLists($asReturnList, $asRootFileMatchList, $asFileMatchList) ; Set correct count for folder add $asReturnList[0] += $asFolderMatchList[0] ; Resize and add file match array ReDim $asFolderMatchList[$asFolderMatchList[0] + 1] _RFLTA_ArrayConcatenate($asReturnList, $asFolderMatchList) ; Simple sort final list _RFLTA_ArraySort($asReturnList) Else ; Combine sorted file match lists _RFLTA_AddFileLists($asReturnList, $asRootFileMatchList, $asFileMatchList, 1) ; Add folder count $asReturnList[0] += $asFolderMatchList[0] ; Sort folder match list ReDim $asFolderMatchList[$asFolderMatchList[0] + 1] _RFLTA_ArraySort($asFolderMatchList) ; Now add folders in correct place Local $iLastIndex = $asReturnList[0] For $i = $asFolderMatchList[0] To 1 Step -1 ; Find first filename containing folder name Local $iIndex = _RFLTA_ArraySearch($asReturnList, $asFolderMatchList[$i]) If $iIndex = -1 Then ; Empty folder so insert immediately above previous _RFLTA_ArrayInsert($asReturnList, $iLastIndex, $asFolderMatchList[$i]) Else ; Insert folder at correct point above files _RFLTA_ArrayInsert($asReturnList, $iIndex, $asFolderMatchList[$i]) $iLastIndex = $iIndex EndIf Next EndIf EndSwitch Else ; No sort ; Check if any file/folders have been added If $asReturnList[0] = 0 Then Return SetError(1, 8, "") ; Remove any unused return list elements from last ReDim ReDim $asReturnList[$asReturnList[0] + 1] EndIf Return $asReturnList EndFunc ;==>_RecFileListToArray ; #INTERNAL_USE_ONLY#============================================================================================================ ; Name...........: _RFLTA_ListToMask ; Description ...: Convert include/exclude lists to SRE format ; Syntax ........: _RFLTA_ListToMask(ByRef $sMask, $sList) ; Parameters ....: $asMask - Include/Exclude mask to create ; $asList - Include/Exclude list to convert ; Return values .: Success: 1 ; Failure: 0 ; Author ........: SRE patterns developed from those posted by various forum members and Spiff59 in particular ; Remarks .......: This function is used internally by _RecFileListToArray ; =============================================================================================================================== Func _RFLTA_ListToMask(ByRef $sMask, $sList) ; Check for invalid characters within list If StringRegExp($sList, "\\|/|:|\<|\>|\|") Then Return 0 ; Strip WS and insert | for ; $sList = StringReplace(StringStripWS(StringRegExpReplace($sList, "\s*;\s*", ";"), 3), ";", "|") ; Convert to SRE pattern $sList = StringReplace(StringReplace(StringRegExpReplace($sList, "(\^|\$|\.)", "\\$1"), "?", "."), "*", ".*?") ; Add prefix and suffix $sMask = "(?i)^(" & $sList & ")\z" Return 1 EndFunc ;==>_RFLTA_ListToMask ; #INTERNAL_USE_ONLY#============================================================================================================ ; Name...........: _RFLTA_AddToList ; Description ...: Add element to list which is resized if necessary ; Syntax ........: _RFLTA_AddToList(ByRef $asList, $sValue) ; Parameters ....: $asList - List to be added to ; $sValue - Value to add ; Return values .: None - array modified ByRef ; Author ........: Melba23 ; Remarks .......: This function is used internally by _RecFileListToArray ; =============================================================================================================================== Func _RFLTA_AddToList(ByRef $asList, $sValue) ; Increase list count $asList[0] += 1 ; Double list size if too small (fewer ReDim needed) If UBound($asList) <= $asList[0] Then ReDim $asList[UBound($asList) * 2] ; Add value $asList[$asList[0]] = $sValue EndFunc ;==>_RFLTA_AddToList ; #INTERNAL_USE_ONLY#============================================================================================================ ; Name...........: _RFLTA_AddFileLists ; Description ...: Add internal lists after resizing and optional sorting ; Syntax ........: _RFLTA_AddFileLists(ByRef $asTarget, $asSource_1, $asSource_2[, $iSort = 0]) ; Parameters ....: $asReturnList - Base list ; $asRootFileMatchList - First list to add ; $asFileMatchList - Second list to add ; $iSort - (Optional) Whether to sort lists before adding ; |$iSort = 0 (Default) No sort ; |$iSort = 1 Sort in descending alphabetical order ; Return values .: None - array modified ByRef ; Author ........: Melba23 ; Remarks .......: This function is used internally by _RecFileListToArray ; =============================================================================================================================== Func _RFLTA_AddFileLists(ByRef $asTarget, $asSource_1, $asSource_2, $iSort = 0) ; Correctly size root file match array ReDim $asSource_1[$asSource_1[0] + 1] ; Simple sort root file match array if required If $iSort = 1 Then _RFLTA_ArraySort($asSource_1) ; Copy root file match array $asTarget = $asSource_1 ; Add file match count $asTarget[0] += $asSource_2[0] ; Correctly size file match array ReDim $asSource_2[$asSource_2[0] + 1] ; Simple sort file match array if required If $iSort = 1 Then _RFLTA_ArraySort($asSource_2) ; Add file match array _RFLTA_ArrayConcatenate($asTarget, $asSource_2) EndFunc ;==>_RFLTA_AddFileLists ; #INTERNAL_USE_ONLY#============================================================================================================ ; Name...........: _RFLTA_ArraySearch ; Description ...: Search array downwards for partial match ; Syntax ........: _RFLTA_ArraySearch(Const ByRef $avArray, $vValue) ; Parameters ....: $avArray - Array to search ; $vValue - PValue to search for ; Return values .: Success: Index of array in which element was found ; Failure: returns -1 ; Author ........: SolidSnake, gcriaco, Ultima ; Modified.......: Melba23 ; Remarks .......: This function is used internally by _RecFileListToArray ; =============================================================================================================================== Func _RFLTA_ArraySearch(Const ByRef $avArray, $vValue) For $i = 1 To UBound($avArray) - 1 If StringInStr($avArray[$i], $vValue) > 0 Then Return $i Next Return -1 EndFunc ;==>_RFLTA_ArraySearch ; #INTERNAL_USE_ONLY#============================================================================================================ ; Name...........: _RFLTA_ArraySort ; Description ...: Wrapper for QuickSort function ; Syntax ........: _RFLTA_ArraySort(ByRef $avArray) ; Parameters ....: $avArray - Array to sort ; $pNew_WindowProc - Pointer to new WindowProc ; Return values .: None - array modified ByRef ; Author ........: Jos van der Zande, LazyCoder, Tylo, Ultima ; Modified.......: Melba23 ; Remarks .......: This function is used internally by _RecFileListToArray ; =============================================================================================================================== Func _RFLTA_ArraySort(ByRef $avArray) Local $iStart = 1, $iEnd = UBound($avArray) - 1 _RFLTA_QuickSort($avArray, $iStart, $iEnd) EndFunc ;==>_RFLTA_ArraySort ; #INTERNAL_USE_ONLY#============================================================================================================ ; Name...........: _RFLTA_QuickSort ; Description ...: Recursive array sort ; Syntax ........: _RFLTA_QuickSort(ByRef $avArray, ByRef $iStart, ByRef $iEnd) ; Parameters ....: $avArray - Array to sort in descending alphabetical order ; $iStart - Start index ; $iEnd - End index ; Return values .: None - array modified ByRef ; Author ........: Jos van der Zande, LazyCoder, Tylo, Ultima ; Modified.......: Melba23 ; Remarks .......: This function is used internally by _RFLTA_ArraySort ; =============================================================================================================================== Func _RFLTA_QuickSort(ByRef $avArray, ByRef $iStart, ByRef $iEnd) Local $vTmp If ($iEnd - $iStart) < 15 Then Local $i, $j, $vCur For $i = $iStart + 1 To $iEnd $vTmp = $avArray[$i] If IsNumber($vTmp) Then For $j = $i - 1 To $iStart Step -1 $vCur = $avArray[$j] If ($vTmp >= $vCur And IsNumber($vCur)) Or (Not IsNumber($vCur) And StringCompare($vTmp, $vCur) >= 0) Then ExitLoop $avArray[$j + 1] = $vCur Next Else For $j = $i - 1 To $iStart Step -1 If (StringCompare($vTmp, $avArray[$j]) >= 0) Then ExitLoop $avArray[$j + 1] = $avArray[$j] Next EndIf $avArray[$j + 1] = $vTmp Next Return EndIf Local $L = $iStart, $R = $iEnd, $vPivot = $avArray[Int(($iStart + $iEnd) / 2)], $fNum = IsNumber($vPivot) Do If $fNum Then While ($avArray[$L] < $vPivot And IsNumber($avArray[$L])) Or (Not IsNumber($avArray[$L]) And StringCompare($avArray[$L], $vPivot) < 0) $L += 1 WEnd While ($avArray[$R] > $vPivot And IsNumber($avArray[$R])) Or (Not IsNumber($avArray[$R]) And StringCompare($avArray[$R], $vPivot) > 0) $R -= 1 WEnd Else While (StringCompare($avArray[$L], $vPivot) < 0) $L += 1 WEnd While (StringCompare($avArray[$R], $vPivot) > 0) $R -= 1 WEnd EndIf If $L <= $R Then $vTmp = $avArray[$L] $avArray[$L] = $avArray[$R] $avArray[$R] = $vTmp $L += 1 $R -= 1 EndIf Until $L > $R _RFLTA_QuickSort($avArray, $iStart, $R) _RFLTA_QuickSort($avArray, $L, $iEnd) EndFunc ;==>_RFLTA_QuickSort ; #INTERNAL_USE_ONLY#============================================================================================================ ; Name...........: _RFLTA_ArrayConcatenate ; Description ...: Joins 2 arrays ; Syntax ........: _RFLTA_ArrayConcatenate(ByRef $avArrayTarget, Const ByRef $avArraySource) ; Parameters ....: $avArrayTarget - Base array ; $avArraySource - Array to add from element 1 onwards ; Return values .: None - array modified ByRef ; Author ........: Ultima ; Modified.......: Melba23 ; Remarks .......: This function is used internally by _RecFileListToArray ; =============================================================================================================================== Func _RFLTA_ArrayConcatenate(ByRef $avArrayTarget, Const ByRef $avArraySource) Local $iUBoundTarget = UBound($avArrayTarget) - 1, $iUBoundSource = UBound($avArraySource) ReDim $avArrayTarget[$iUBoundTarget + $iUBoundSource] For $i = 1 To $iUBoundSource - 1 $avArrayTarget[$iUBoundTarget + $i] = $avArraySource[$i] Next EndFunc ;==>_RFLTA_ArrayConcatenate ; #INTERNAL_USE_ONLY#============================================================================================================ ; Name...........: _RFLTA_ArrayInsert ; Description ...: Insert element into array ; Syntax ........: _RFLTA_ArrayInsert(ByRef $avArray, $iElement, $vValue = "") ; Parameters ....: $avArray - Array to modify ; $iElement - Index position for insertion ; $vValue - Value to insert ; Return values .: None - array modified ByRef ; Author ........: Jos van der Zande, Ultima ; Modified.......: Melba23 ; Remarks .......: This function is used internally by _RecFileListToArray ; =============================================================================================================================== Func _RFLTA_ArrayInsert(ByRef $avArray, $iElement, $vValue = "") Local $iUBound = UBound($avArray) + 1 ReDim $avArray[$iUBound] For $i = $iUBound - 1 To $iElement + 1 Step -1 $avArray[$i] = $avArray[$i - 1] Next $avArray[$iElement] = $vValue EndFunc ;==>_RFLTA_ArrayInsertAny comments from others also welcomed, of course! M23 Edit: Small, but important, change to SRE code - they really make my brain hurt at times!
    1 point
×
×
  • Create New...