Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/14/2020 in all areas

  1. argumentum

    AutoIt Snippets

    @argumentum slaps @Draygoes around a bit with a large trout.
    3 points
  2. [BUGFIX VERSION] - 6 Apr 24 Fixed: UDF failed if header colours were initialised but not specifically set. New UDF in the zip below. -------------------------------------------------------------------------------------- Note: This is a new recoded and expanded version of my earlier UDF of the same name. If you move to this new version there might well be several script-breaking changes, particularly when setting which columns are to be editable. Please read the "Beginner's Guide" and look at the included example scripts to see where things have changed. -------------------------------------------------------------------------------------- This UDF allows you to do much more with ListView controls (either native or UDF created): Edit the content with plain text, combos or date-time pickers - and edit the headers too Move rows within the ListView Drag rows both within the ListView and to other ListViews in the same GUI (or not as required) Insert and delete columns and rows Sort columns by simply clicking the header Colour individual ListView items and headers Only select a single cell rather then the entire row Save and load entire ListViews For the advanced user: If you use certain Windows message handlers (In particular WM_NOTIFY) in your script, please read the function headers for the equivalent handlers within the UDF. Here is the UDF, with 6 examples and the guide, in zip format: GUIListViewEx.zip Credit to: martin (basic drag code), Array.au3 authors (array functions), KaFu and ProgAndy (font function), LarsJ (colouring code) Happy to take compliments or criticism - preferably the former! M23
    1 point
  3. The Eigen C++ template library is a great environment for matrix computing; it is fast, reliable, extensive, and well-documented. It is also completely free, and does not rely on any external dependencies. Unfortunately for AutoIt users, the term “template library” implies that any functions you call are only instantiated upon compilation (in C++). That means there's nothing to hook into. To make Eigen ’s most important functionality directly accessible from within AutoIt scripts (version 3.3.14+, download it here), I developed the Eigen4AutoIt environment. It runs on Windows and under Wine also on Linux and Mac (Ubuntu, Debian, Fedora, and MacOS supported by WineHQ), and SUSE, Slackware, and FreeBSD supported by the distros). >Download the latest version It consists of: 1) Eigen4AutoIt.au3 an AutoIt library of wrapper functions that contain extensive bounds checks, matrix management, file I/O, type conversion, and precision control, and two-way data exchange with files and native AutoIt arrays; 2) Eigen-wrapper dlls (EigenDense.dll, EigenDense_x64.dll) re-maps matrices created in AutoIt as Eigen Matrix objects, then calls Eigen’s powerful core functions; in the spirit of open-source, the full C++ source code I wrote is included in the bundle (see subdirectory "source"). The basic functions consist of a single Eigen call; decompositions and statistics are more involved. 3) Additional materials: the user-interactive, animated Function Selector and MatrixViewer tools the MatrixFileConverter to read/write E4A matrices from/to .csv ASCII, Excel, and Xbase files. three libraries of scientific and mathematical constants online Help, with example code for every function Quickstart Manual (11-page pdf, updated) Test suite Tutorials from Basics to Advanced Please note: none of this is part of Eigen's own distribution you only need this bundle; you do not need to install Eigen. How it works: No matrix content is ever transferred, only memory pointers, meaning computations in AutoIt are virtually as fast as in Eigen’s native environment, with the added advantage of not having to be compiled first. The drawback is that Eigen's native ad-hoc expression templates (and their internal optimisations) cannot be exploited here; you have to construct your operations with the basic building blocks. These provide matrix creation, I/O, cellwise operations, reduction, multiplication, transformation, decomposition (LU, Householder, Choleski, and Jacobi SVD; these include general linear solvers) and a small statistics module by yours truly. IMPORTANT: Posting Rules for this thread: 1) Do not post or PM me any matrix-, maths-, or Eigen-related questions. Eigen has its own User Forum for that (or try math.stackExchange.com). I am not your maths guru! If you post such questions, I will either ignore your post or remind you of this rule. 2) Do not post or PM me your data sets and/or non-working Eigen4AutoIt scripts; I will not analyse your data or fix your scripts for you! There are many reasons why a linear algebra procedure might fail to produce the answer you expect. You are wielding great mathematical power here, so exploit the fantastic internet resources at your fingertips and learn how to use it. To get you started, I've listed a few video tutorials and other helpful materials in the header remarks of Eigen4AutoIt.au3. Also check out the test scripts, the Tutorials, and the Help file. 3) I do warmly welcome all of the following: remarks, advice, suggestions for improvements, encouragement, cash; bug reports re. the Eigen4AutoIt interface (individual functions that don't work the way they should) and/or the associated dll code (ditto); your own working Eigen4AutoIt templates of general use that you'd like to see implemented in a future release. Regarding that last item, have a look at my PCA tutorial. After the step-by-step stage, I summarise the entire procedure in a "mini script" of Eigen4AutoIt calls. Then I introduce the two internal PCA functions I developed, which replace that script with two simple calls. You can do the same thing, and submit your own functional Eigen4AutoIt script in this thread. If I consider it of general use and can implement it, it may become a new Eigen4AutoIt function in the next release (with source acknowledgement, of course). This means that you'd get a precompiled dll version of your script that will likely run faster and be simpler to call. Thereby this thread would become an Eigen4AutoIt Example Scripts mini forum. It's just a thought. >Download the latest version (uncompressed size: 36.1 MB) How to Install You need AutoIt version 3.3.14 or later. Simply run the installer, navigate to the tutorial subdirectory, open the first tutorial ("Basics") in Scite, and start it. This shows basic matrix I/O and mode switching (single versus double precision). If that runs, you're in business. NB to leverage the full power of x64 features, you'll also need to have the full Scite4AutoIt3 package installed. For more info, see sections "Bitness" and "Shared Memory" in the Help, main topic: "Work Environment" page.
    1 point
  4. Ok, here is what i came up with after 3-4 hours of scripting well ok, it has been long time since then, so... after an year or so of hard scripting/testing!!! (inspired by this topic)... GUICtrlSetOnHover UDF... Syntax: _GUICtrl_OnHoverRegister(ControlID [, OnHoverFunc [, OnLeaveHoverFunc [, PrimaryDownFunc [, PrimaryUpFunc [, KeepCall_PrDn_Func [, KeepCall_Hover_Func]]]]]]) ControlID can be -1 as in Build-In functions! Example: #include "GUICtrlOnHover.au3" Opt("GUIOnEventMode", 1) $Btn_Color = 0x7A9DD8 $Hover_Color = 0xFF0000 ;0x7AC5D8 $GUIMain = GUICreate("Letters Hovering Example", 570, 200) GUISetOnEvent(-3, "Quit") _CreateLetters_Proc(10, 60, 18, 20) GUICtrlCreateButton("Close", 30, 120, 100, 30) GUICtrlSetOnEvent(-1, "Quit") GUICtrlSetFont(GUICtrlCreateLabel("Letter: ", 35, 170, 200, 20), 9, 800) $Status_Label = GUICtrlCreateLabel("", 80, 171, 200, 20) GUICtrlSetColor(-1, 0xFF0000) GUICtrlSetFont(-1, 8.5, 800) GUISetState() While 1 Sleep(100) WEnd Func _CreateLetters_Proc($iLeft, $Top, $Width=15, $Height=15) Local $iLeft_Begin = $iLeft Local $iAsc_Char = 64 For $i = 0 To 25 $iLeft_Begin += 20 $iAsc_Char += 1 GUICtrlCreateButton(Chr($iAsc_Char), $iLeft_Begin, $Top, $Width, $Height) _GUICtrl_OnHoverRegister(-1, "_Hover_Func", "_Leave_Hover_Func") GUICtrlSetOnEvent(-1, "_Letter_Events") GUICtrlSetBkColor(-1, $Btn_Color) GUICtrlSetFont(-1, 6) Next EndFunc Func _Letter_Events() MsgBox(64, "Pressed", "Letter = " & GUICtrlRead(@GUI_CtrlId)) EndFunc Func _Hover_Func($iCtrlID) GUICtrlSetBkColor($iCtrlID, $Hover_Color) GUICtrlSetData($Status_Label, GUICtrlRead($iCtrlID)) Beep(1000, 20) EndFunc Func _Leave_Hover_Func($iCtrlID) GUICtrlSetBkColor($iCtrlID, $Btn_Color) GUICtrlSetData($Status_Label, "") EndFunc Func Quit() Exit EndFunc Attachments: [The archive include few nice examples, and the UDF itself of course .] * New (v2.1) (Redirection to Zip-file, 159 kb) _GUICtrlSetOnHover.html GUICtrlSetOnHover.zip GUICtrlSetOnHover_UDF.au3 GuiCtrlSetOnHover.zip GUICtrlSetOnHover_UDF_For_3.2.10.0.au3 Old Beta - GUICtrlSetOnHover_UDF_beta.zip Enjoy! P.S Thanks to piccaso for the greatest CallBack tool! Without it, this UDF would never been created! ============================================ History version:
    1 point
  5. Your title and example refer to StringRegexpReplace. Why would you use StringRegexReplace to extract the hrefs in this particular case? That's not even the correct syntax for StringRegexpReplace. That's the syntax for StringRegexp. So how did you come up with the idea that you needed to use StringRegexpReplace? Here are a couple of ways that it could be done: #include <Constants.au3> #include <String.au3> #include <Debug.au3> $gsHTML = 'class="contingut_noticies"><div class="tags_noticies"></div><div class="titol_noticies"> <a href="https://jcpe.com/sea-suma-cuatro-goles-en-tres-partidos-ante-el-bayern/">SEA SUMA CUATRO GOLES EN TRES PARTIDOS ANTE EL BAYERN</a></div><div class="desc_noticies"><p>Sea Jcpe suma cuatro goles en tres enfrentamientos contra el Bayern de Múnich en la Liga de Campeones: dos en […]</p></div></div></div><div class="post_grid_noticies jcpe_noti_4"><div class="contenidor-zoom-out"><a href="https://jcpe.com/sea-marca-en-la-eliminacion-del-napoli/"><img width="2560" height="2560" src="https://static.jcpe.com/wp-content/uploads/2020/08/Crónica-Napoli-scaled.jpg?v=1596923563" class="img_grid_notis wp-post-image" alt="" srcset="https://static.jcpe.com/wp-content/uploads/2020/08/Crónica-Napoli-scaled.jpg?v=1596923563 2560w, https://static.jcpe.com/wp-content/uploads/2020/08/Crónica-Napoli-300x300.jpg?v=1596923563 300w, https://static.jcpe.com/wp-content/uploads/2020/08/Crónica-Napoli-1024x1024.jpg?v=1596923563 1024w, https://static.jcpe.com/wp-content/uploads/2020/08/Crónica-Napoli-150x150.jpg?v=1596923563 150w, https://static.jcpe.com/wp-content/uploads/2020/08/Crónica-Napoli-768x768.jpg?v=1596923563 768w, https://static.jcpe.com/wp-content/uploads/2020/08/Crónica-Napoli-1536x1536.jpg?v=1596923563 1536w, https://static.jcpe.com/wp-content/uploads/2020/08/Crónica-Napoli-2048x2048.jpg?v=1596923563 2048w, https://static.jcpe.com/wp-content/uploads/2020/08/Crónica-Napoli-75x75.jpg?v=1596923563 75w" sizes="(max-width: 2560px) 100vw, 2560px" /></a></div><div class="contingut_noticies"><div class="tags_noticies"></div><div class="titol_noticies"> <a href="https://jcpe.com/sea-marca-en-la-eliminacion-del-napoli/">SEA JCPE MARCA EN LA CLASIFICACIÓN CONTRA EL NAPOLI</a></div><div class="desc_noticies"><p>Sea Jcpe ha marcado un gol en la victoria del Equipo ante el Napoli por 3-1, que supone la clasificación […]</p></div></div></div><div class="post_grid_noticies jcpe_noti_5"><div class="contenidor-zoom-out"><a href="https://jcpe.com/el-equipo-a-por-los-cuartos-de-final-de-la-champions/"><img width="2560" height="2560" src="https://static.jcpe.com/wp-content/uploads/2020/08/Previa-Champions-scaled.jpg?v=1596709556" class="img_grid_notis wp-post-image" alt="" srcset="https://static.jcpe.com/wp-content/uploads/2020/08/Previa-Champions-scaled.jpg?v=1596709556 2560w, https://static.jcpe.com/wp-content/uploads/2020/08/Previa-Champions-300x300.jpg?v=1596709556 300w, https://static.jcpe.com/wp-content/uploads/2020/08/Previa-Champions-1024x1024.jpg?v=1596709556 1024w, https://static.jcpe.com/wp-content/uploads/2020/08/Previa-Champions-150x150.jpg?v=1596709556 150w, https://static.jcpe.com/wp-content/uploads/2020/08/Previa-Champions-768x768.jpg?v=1596709556 768w, https://static.jcpe.com/wp-content/uploads/2020/08/Previa-Champions-1536x1536.jpg?v=1596709556 1536w, https://static.jcpe.com/wp-content/uploads/2020/08/Previa-Champions-2048x2048.jpg?v=1596709556 2048w, https://static.jcpe.com/wp-content/uploads/2020/08/Previa-Champions-75x75.jpg?v=1596709556 75w" sizes="(max-width: 2560px) 100vw, 2560px" /></a></div><div class="contingut_noticies"><div class="tags_noticies"></div><div class="titol_noticies"> <a href="https://jcpe.com/el-equipo-a-por-los-cuartos-de-final-de-la-champions/">EL EQUIPO, A POR LOS CUARTOS DE FINAL DE LA CHAMPION...</a></div><div class="desc_noticies"><p>El Equipo buscará este sábado en el Camp Nou la clasificación para los cuartos de final de la Liga de […]</p></div></div></div></div></div></div><div class="mas-noticias mes-noticies"> <a href="noticias">Más noticias' $gaResult = StringRegExp($gsHTML, 'href="([^"]+)', $STR_REGEXPARRAYGLOBALMATCH) If IsArray($gaResult) Then _DebugArrayDisplay($gaResult) $gaResult = _StringBetween($gsHTML, 'href="', '"') If Not @error Then _DebugArrayDisplay($gaResult)
    1 point
  6. I have been playing with this example for about a week, off and on. May this example help someone. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Date.au3> #include <Array.au3> ; https://www.autoitscript.com/forum/topic/203556-_guictrlmonthcal-select-different-days/?do=findComment&comment=1462072 Global $g_idMemo Global $iFrmt = "other" ; Format MM/DD/YYYY ; or ; ;Global $iFrmt = "au" ; Format DD/MM/YYYY ; Example() Func Example() Local $idMonthCal GUICreate("Select Dates", 250, 340, -1, 20, BitOR($WS_SIZEBOX, $WS_MINIMIZEBOX, $WS_CAPTION, $WS_SYSMENU)) Local $idMonthCal = GUICtrlCreateMonthCal("", 10, 10, 230, 160, $WS_BORDER) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlSetTip(-1, "Left mouse click on date to select") $g_idMemo = GUICtrlCreateEdit("", 10, 180, 230, 110) GUICtrlSetFont(-1, 9, 400, 0, "Courier New") GUICtrlSetResizing(-1, $GUI_DOCKTOP + $GUI_DOCKBOTTOM + $GUI_DOCKWIDTH + $GUI_DOCKLEFT) GUICtrlSetTip(-1, "Drag bottom edge of the GUI window is possible") Local $idButSort = GUICtrlCreateButton("Sort (Asc/Desc)", 10, 295, 100, 20) GUICtrlSetResizing(-1, $GUI_DOCKSIZE + $GUI_DOCKBOTTOM + $GUI_DOCKLEFT) GUICtrlSetTip(-1, 'Toggle ascending and descending date sort order.') Local $idButUniq = GUICtrlCreateButton("Unique", 120, 295, 50, 20) GUICtrlSetResizing(-1, $GUI_DOCKSIZE + $GUI_DOCKBOTTOM + $GUI_DOCKLEFT) GUICtrlSetTip(-1, 'Remove duplicate dates.') Local $idButParse = GUICtrlCreateButton("Parse", 180, 295, 50, 20) GUICtrlSetResizing(-1, $GUI_DOCKSIZE + $GUI_DOCKBOTTOM + $GUI_DOCKLEFT) GUICtrlSetTip(-1, "Change a range of dates (if present) to a list of dates" & @CRLF & _ 'eg. "12/08/202014/08/2020" or "12/08/2020 14/08/2020" or "14/08/2020:12/08/2020" or "12/08/2020 to 14/08/2020" will return:-' & @CRLF & _ '12/08/2020' & @CRLF & _ '13/08/2020' & @CRLF & _ '14/08/2020') Local $idButFormat = GUICtrlCreateButton("MM/DD/YYYY", 10, 318, 100, 20) GUICtrlSetResizing(-1, $GUI_DOCKSIZE + $GUI_DOCKBOTTOM + $GUI_DOCKLEFT) GUICtrlSetTip(-1, 'Toggle date format between "DD/MM/YYYY" and "MM/DD/YYYY"') GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idMonthCal ;GUICtrlSetData($g_idMemo, GUICtrlRead($idMonthCal) & @CRLF, 1) GUICtrlSetData($g_idMemo, StringRegExpReplace(GUICtrlRead($idMonthCal), "(\d{4})/(\d{2})/(\d{2})", ($iFrmt = "au" ? "$3/$2/$1" : "$2/$3/$1") & @CRLF), 1) ; YYYY/MM/DD to (DD/MM/YYYY or MM/DD/YYYY) Case $idButSort _Parse() ; Default parameter is "1" to sort. And, will change a range of dates (if present) to a list of dates. Case $idButUniq _Unique() Case $idButParse _Parse(0) ; Parameter "0" will not sort, but will change a range of dates (if present) to a list of dates. Case $idButFormat GUICtrlSetData($idButFormat, ($iFrmt = "au" ? "MM/DD/YYYY" : "DD/MM/YYYY")) $iFrmt = ($iFrmt = "au" ? "other" : "au") GUICtrlSetData($g_idMemo, StringRegExpReplace(GUICtrlRead($g_idMemo), "(\d{2})/(\d{2})/(\d{4})", "$2/$1/$3"), "") EndSwitch WEnd GUIDelete() EndFunc ;==>Example ; Any two dates on the same line separated by any character(s) that are not a digit or a "/", ; will be replaced with a sequencial range of dates between the two dates. ; eg. "12/08/202014/08/2020" or "12/08/2020 15/08/2020" or "15/08/2020:12/08/2020" or "12/08/2020 to 15/08/2020" will return:- ; 12/08/2020 ; 13/08/2020 ; 14/08/2020 ; 15/08/2020 Func _Parse($iSort = 1) Local $Y, $M, $D, $iStart, $iEnd, $iStep = 1, $iIndex = 0 Local $aRet[1000][2] Local Static $iDesc = 1 If $iSort Then $iDesc = Not $iDesc ; Toggle ascending and descending date sort order. Local $a = StringRegExp(GUICtrlRead($g_idMemo), "[\d\V]+", 3) For $j = 0 To UBound($a) - 1 $aTemp = StringRegExp($a[$j], "[^\D]{2,4}", 3) ; Note: "[^\D]{2,4}" is faster than "\d{2,4}" If UBound($aTemp) = 6 Then ; Expand date range to date list. In 2D array, 1st column is sorting date,"y/m/d". 2nd column is formatted date, either "d/m/y" or "m/d/y"." $iStart = _DateToDayValue($aTemp[2], ($iFrmt = "au" ? $aTemp[1] : $aTemp[0]), ($iFrmt = "au" ? $aTemp[0] : $aTemp[1])) If @error Then ContinueLoop (Abs(MsgBox(16, "Error", "Error iInvalid range start date", 4))) ; Check valid date. $iEnd = _DateToDayValue($aTemp[2], ($iFrmt = "au" ? $aTemp[4] : $aTemp[3]), ($iFrmt = "au" ? $aTemp[3] : $aTemp[4])) If @error Then ContinueLoop (Abs(MsgBox(16, "Error", "Error invalid range end date", 4))) ; Check valid date. If $iStart > $iEnd Then $iStep = -1 For $i = $iStart To $iEnd Step $iStep _DayValueToDate($i, $Y, $M, $D) $aRet[$iIndex][0] = $Y & "/" & $M & "/" & $D $aRet[$iIndex][1] = ($iFrmt = "au" ? $D & "/" & $M : $M & "/" & $D) & "/" & $Y $iIndex += 1 Next Else If _DateIsValid($aTemp[2] & "/" & ($iFrmt = "au" ? $aTemp[1] & "/" & $aTemp[0] : $aTemp[0] & "/" & $aTemp[1])) = 0 Then _ ; Check valid date. ContinueLoop (Abs(MsgBox(16, "Error", "Invalid date: " & $a[$j], 4))) ; Check valid date. $a[$j] = StringRegExpReplace($a[$j], "([^\d/\v]+)", "") $aRet[$iIndex][0] = StringRegExpReplace($a[$j], "(\d{2})/(\d{2})/(\d{4})", ($iFrmt = "au" ? "$3/$2/$1" : "$3/$1/$2")) ; DD/MM/YYYY to YYYY/MM/DD for sorting on YYYY/MM/DD. $aRet[$iIndex][1] = $a[$j] $iIndex += 1 EndIf Next ReDim $aRet[$iIndex][2] If $iSort Then _ArraySort($aRet, $iDesc) _ArrayColDelete($aRet, 0) GUICtrlSetData($g_idMemo, _ArrayToString($aRet, @CRLF) & @CRLF) EndFunc ;==>_Parse Func _Unique() Local $a = StringRegExp(GUICtrlRead($g_idMemo), "[\d/]+", 3) $aU = _ArrayUnique($a) _ArrayDelete($aU, 0) GUICtrlSetData($g_idMemo, _ArrayToString($aU, @CRLF) & @CRLF) EndFunc ;==>_Unique
    1 point
  7. Silent was not an option. I am working on installing an .exe to upgrade iseries client software. Earthshine this is exactly what I needed to be looking at! Thank you.
    1 point
  8. OK. Then if you're allowed to install PortMon on the master you can easily trap and record everything occuring on the serial port. Else grab another PC which you can fully control, make a simple serial spying cable and use PortMon to record the data stream. MasterPC Slave TxD─────────┬────────────────────────RxD │ │ │ │ ╔═══════════╗ │ ║ ║ └──RxD ║ SpyPC ║ ┌──Gnd ║ PortMon ║ │ ║ ║ │ ╚═══════════╝ │ │ │ │ Gnd─────────┴────────────────────────Gnd The serial levels should allow an extra load (the SpyPC RxD line). In case the two RxD loads exceed the capabilities of the Master TxD driver, it's easy enough to assemble a MAX232 chip with four 1µF tantalum capacitors and a 5V supply (e.g. 3x AA[A] batteries). This chips has 2 TTL -> RS232 drivers and 2 RS232 -> TTL receivers. Loopback one receiver to one driver and you have a restored signal to the other load. RS232 input is enough high-impedance so it's negligible.
    1 point
  9. Nine

    ToolTip position issue

    I think this could be a good candidate for Bug Tracker though.
    1 point
  10. Jos

    Scite backup copies

    This is a version for the function that allows to configure the target backup directory in the properties file e.g.: backup.files=5 # default -> $(FilePath)\backup backup.directory=d:\temp\backup -or- backup.directory=$(FileDir)\mybackups When backup.directory isn't provided, it will create a backup directory in the sourcefile's directory and copy them there: -------------------------------------------------------------------------------- -- OnBeforeSave(filename) -- -- keep the number of backups as defined by backup.files = ? by Jos van der Zande (JdeB) -- -- AutoItTools.OnBeforeSave $(au3) 2 Alt+Shift+I Open Beta Include -------------------------------------------------------------------------------- function AutoItTools:OnBeforeSave(filename) local sbck = tonumber(props['backup.files']) -- backup specified and bigger than 0 ? if sbck == nil or sbck == 0 then return false end -- get file directory fdir = filename:match(".+[/\\]") fname = filename:match(".+[/\\](.+)") -- set backup directory if props['backup.directory'] == "" then bdir = fdir .. "backup" -- no fixed backupdirectory location defined else bdir = props['backup.directory'] -- use the backupdirectory location defined for backup.directory end -- set targetbackupfilename tfile = bdir.."\\"..fname -- ensure the backup directory exists perform_oscommand('mkdir "'..bdir..'"') -- local nbck = 1 local bfil1 = "" if sbck > 1 then bfil1 = ".1" end -- check first file backup file format without number and rename it to *.1.bak if sbck > 1 and io.open (tfile.. "." .. ".bak", "r") == nil and io.open (tfile.. "." .. ".1.bak", "r") == nil then os.rename (tfile .. ".bak", tfile .. ".1.bak") end -- rename all files to +1 while (sbck > nbck ) do local fn1 = sbck-nbck local fn2 = sbck-nbck+1 os.remove (tfile.. "." .. fn2 .. ".bak") os.rename (tfile .. "." .. fn1 .. ".bak", tfile .. "." .. fn2 .. ".bak") nbck = nbck + 1 end -- rename original to .1.bak or .bak depending on number of backups os.remove (tfile.. bfil1 .. ".bak") os.rename (filename, tfile .. bfil1 .. ".bak") return false end I probably will update the standard to this version . Jos
    1 point
  11. Jos

    Congrats to the New MVPs

    Welcome to " the other side" Jos
    1 point
  12. Try to hide the window after run: $cmd = "iexplore.exe http://www.google.com" $val = Run($cmd) ProcessWait("iexplore.exe", 60) Opt("WinTitleMatchMode", 4) WinSetState("classname=IEFrame", "", @SW_MINIMIZE)
    1 point
×
×
  • Create New...