Leaderboard
Popular Content
Showing content with the highest reputation on 05/06/2018 in all areas
-
As the regex engine reads the pattern left to right it could be done like this $string = "nineteenthousandninehundredninetynine" Local $pattern $pattern &= "(?i)(" $pattern &= "hundred|thousand|twenty|ten|eleven|twelve|" $pattern &= "thirty|fourty|fifty|sixty|seventy|eighty|ninety|" $pattern &= "thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|" $pattern &= "zero|one|two|three|four|five|six|seven|eight|nine" $pattern &= ")" $s = StringRegExpReplace($string, $pattern, "$1 ") Msgbox(0,"", $s)3 points
-
Files Checklist
coffeeturtle and one other reacted to TheSaint for a topic
Files Checklist Just a simple little (complex enough) program I whipped up, for a purpose ... but only too happy to share. It can of course be modified to do more, but at the moment just compares file names with or without path ... Location versus Checklist. There are of course other compare programs out there, most doing a lot more than mine (i.e. WinMerge or FileComparer). But I wanted something quick and simple with drag & drop, that uses up a smallish amount of screen real estate. NOTE - The SAVE button is also a LOAD one, and displays 'Load' when the list is empty. So you can save and load specific lists. While in SAVE mode, the button can also be used with CTRL held down, to ADD another list to existing (displayed one) ... combining as they say ... though not saved until you SAVE. CLEAR button removes a selected entry, or if used with CTRL held down, queries about removing all listed entries. Files Checklist v1.2.zip 374.99 kB (566 downloads) Files Checklist v1.3.zip 376.31 kB (305 downloads) Files Checklist v1.4.zip (Includes a BUGFIX.) (source included) WARNING - While this program does not act on files or folders ADDED or CHECKED, you might act on the results, so I advise caution, and I also recommend using the new 'Relative' option in v1.3 or newer ... but you still need to understand what you are doing and what the results actually mean. Some basic examples in the next post. Enjoy! RELATED Users might also be interested in another somewhat related program of mine. DeleteIf Same Cheers!2 points -
New version 1.7.3.0 is out! Download current release Place to post bugs and suggestions (Bug tracker) Online help (Wiki) What's new: Graphic editorBetter support of limited accounts and UAC under Vista/SevenStyles editor allow multiple selectionIcons in additional controls (Tab, ListView, TreeView)Redone Object tree, with support of editable descriptionsAwareness of GUI_SS_DEFAULT stylesAnd many smaller changes (see full history) New version 1.7.2.0 is out! What's new: Added small abilities that become in latest beta of AutoitImproved language systemImproved update checkingImproved siteNew version 1.7.1.0 is out! What's new: Customizing colorsExternal import frameworkCustom controls (ones that available via standard UDFs)Rewritten support for icon - now it support full color onesBetter support (bugtracker, wiki)Bugfix release 1.7.0.1 is out! After another year, new version 1.7.0.0 is out! Most significant changes in this release: Customizable toolbarsUndo supportAligning paletteImport Autoit GUI scriptsFull help file, with context sensitive help supportAnd as usually, lots of bugfixes and small changes. After long period of development and testing, new release 1.6.0.0 is finally here! Thanks to all who support us and help done this work! Most significant changes from previous release: New, more fast and reliable form read/write routines.Rewritten form list handling codeMenus support (with visual editor)Obj support (with visual browser)Templates-based code generationGenerating event-based codeHelp file (unfinished)Old topic is here, some bugs posted there are not resolved yet, so please check it too.1 point
-
Hi, I'm developing CefAu3 project, it embed Chromium browser to your AutoIt program. I'm busy and can stop it. If you want to contribute, you can fork my project and build it yourself. Some Features: - Easy create CEF window - Multi-message loop - Interaction between AutoIt and JavaScript - Supports AutoIt binding - Supports user events... Github: https://github.com/wy3/cefau3 MiniBrowser: https://github.com/small-autoit/mb CEF project: https://bitbucket.org/chromiumembedded/cef Learn more: http://magpcss.org/ceforum/1 point
-
Here's one way that it could be done: example() Func example() Const $kData = "onethousandninehundredeightyfivefiftysixninetyfour" Local $s = $kData $s = StringRegExpReplace($s, "(?i)(zero|one|two|three|four(?!ty)|five|six(?!ty)|seven(?!y)|eight(?!y)|nine(?!ty))", "\1 ") $s = StringRegExpReplace($s, "(?i)(twenty|thirty|fourty|fifty|sixty|seventy|eighty|ninety)", "\1 ") $s = StringRegExpReplace($s, "(?i)(hundred|thousand)", "\1 ") ConsoleWrite($s & @CRLF) EndFunc1 point
-
Hi, A fun little challenge for a windy afternoon. Here is my suggestion: #include <StringConstants.au3> Local $aMajorDivisions[3] = ["billion", "million", "thousand"] Local $aDecades[10] = ["", "", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"] Local $aTens[10] = ["ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"] Local $aUnits[10] = ["", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"] ; ########################### ; Example Local $aInitialAmounts[] = ["One hundred and three billion five hundred and eleven million two hundred and thirteen thousand seven hundred and fifty five", _ "One hundred and three billion two hundred and thirteen thousand seven hundred and fifty five", _ "One hundred and three billion eleven million nineteen thousand and one", _ "Five hundred and thirteen thousand seven hundred and fifty five", _ "Five hundred and thirteen thousand"] For $n = 0 To UBound($aInitialAmounts) - 1 $sRet = _NumberStringToDigits($aInitialAmounts[$n]) ConsoleWrite($aInitialAmounts[$n] & @CRLF & $sRet & @CRLF) Next ; ########################### Func _NumberStringToDigits($sInitialAmount) ; Remove any English "and"s $sWorkingAmount = StringReplace($sInitialAmount, " and ", " ") ; Initialise return $sFigures = "" For $i = 0 To 2 ; Look for major division (billion, million, thousand) $iPos = StringInStr($sWorkingAmount, $aMajorDivisions[$i]) If $iPos Then ; Get value of major division $sValue = StringMid($sWorkingAmount, 1, $iPos - 1) ; And parse it $sFigures &= _ParseHundred($sValue) & "," ; Strip to next division $sWorkingAmount = StringTrimLeft($sWorkingAmount, $iPos + StringLen($aMajorDivisions[$i])) Else ; No major division If $sFigures Then $sFigures &= "000," EndIf EndIf Next ; Parse any remaining hundred value If $sWorkingAmount Then $sFigures &= _ParseHundred($sWorkingAmount) Else $sFigures &= "000" EndIf ; Strip any leading zeroes While StringLeft($sFigures, 1) = 0 $sFigures = StringTrimLeft($sFigures, 1) WEnd Return $sFigures EndFunc ;==>_NumberStringToDigits Func _ParseHundred($sMajorValue) ; Initialise return $sIntFigures = "" ; Initialise unit value $sUnits = "" ; Look for "hundred" $aSplit = StringSplit($sMajorValue, "hundred", $STR_ENTIRESPLIT) If @error Then ; Add "0" if no hundred $sIntFigures &= "0" ; Set unit value $sUnits = $sMajorValue Else ; Parse hundred value For $j = 1 To 9 If StringInStr($aSplit[1], $aUnits[$j]) Then ; Add hundred value $sIntFigures &= $j ; Set unit value $sUnits = $aSplit[2] ExitLoop EndIf Next EndIf ; Parse unit value ; Look for 10-19 For $j = 0 To 9 If StringInStr($sUnits, $aTens[$j]) Then ; Add value $sIntFigures &= "1" & $j ExitLoop EndIf Next ; If not found then look for decades If $j > 9 Then For $j = 2 To 9 If StringInStr($sUnits, $aDecades[$j]) Then ; Add value $sIntFigures &= $j ExitLoop EndIf Next If $j > 9 Then ; Add "0" if no ten value $sIntFigures &= "0" EndIf ; Finally look for units For $j = 1 To 9 If StringInStr($sUnits, $aUnits[$j]) Then ; Add value $sIntFigures &= $j ExitLoop EndIf Next ; Add "0" if no unit value If $j > 9 Then $sIntFigures &= "0" EndIf EndIf Return $sIntFigures EndFunc ;==>_ParseHundred And the results: One hundred and three billion five hundred and eleven million two hundred and thirteen thousand seven hundred and fifty five 103,511,213,755 One hundred and three billion two hundred and thirteen thousand seven hundred and fifty five 103,000,213,755 One hundred and three billion eleven million nineteen thousand and one 103,011,019,001 Five hundred and thirteen thousand seven hundred and fifty five 513,755 Five hundred and thirteen thousand 513,000 M231 point
-
Fink89, You cannot have more than 1 column in a List control - at least not in the form you require it. You will need to use a ListView instead. M23 Edit: Seems I was wrong - see Zedna's post below.1 point
-
@dphuc I recommend you start by looking at the documentation for the GUICtrlSetReszing function and it's example (available in the help file or the linked page). This should get you started on making resizable GUIs, there are also several topics and pages about this concept in the forum and wiki. DuckDuckGo is your best friend1 point
-
AutoIt ConsoleWrite (using "builtin" Autoit Hidden window)
boomingranny reacted to guinness for a topic
Nice idea. I would however rename the internal window first to something unique (like adding the PID) and then get the title.1 point -
Window Management Context Tools for Windows10 Virtual Desktops
coffeeturtle reacted to Bitpicker for a topic
Permits App Windows to be managed across Virtual Desktops using mouse selections. Virtual Desktops of Windows 10, provides a graphic method of moving windows about the desktops. Other functions of switching to other desktops as well, require the user to go to the Task View environment to accomplish moves graphically. By adding a window context menu, the users focus stays on the application window with the ability to quickly move or execute applications in the virtual desktop environment. Requirements: 1) A Settings Program VDTCTXSettings is used to define 1-5 Virtual DeskTops . VDTCTX uses Solid Color Backgrounds for each Virtual Desktop. VDTCTXSettings directs the user to use Windows 10 Personalization tools to Color Backgrounds and records the user color choice. 2) A Mouse is required that provides the ability to depress both Left and Right mouse buttons simultaneously. Selection on windows Title Bar initiates an Application Window context menu, which provides the window functions. A Program Manager Context Menu is presented if initiated on the Program Manager background and not on an application window. IMPLEMENTING VDTCTX: 1) Create a Folder that will hold VDTCTX components. Unzip VDTCTX.zip in this folder. The folder will contain: The code components, icons and sample use of VDTCTL *2)Execute VDTCTXSettings (There is INITIAL install logic triggered by VDTCTX.ini "1TIME" switch which does initial compile of VDTCTL and VDTCTXMenu and saves initial desktop color. VDTCTXSettings is then prepared to be used as normal to Define Number of Desktops, Color those Desktops, and start or stop Monitoring as follows: 3) Using VDTCTXSettings.exe - A Gui will be presented to define 1-n Virtual Desktops, Set or Change any defined Desktop background color. Then by "RECORD" ,your selections will be inserted into source code and compiled. VDTCTXSettings is also used after install to make any changes and to START or QUIT Monitoring by VDTCTX. ( ideally create a shortcut to VDTCTXSettings) 4) START VDTCTX which is the mouse monitoring program can be started or stopped by the VDTCTXSettings program using "Start" or "Quit" buttons. Thanks to all forum participants for ideas and code and contributions. More details in Readme. Please enjoy for your use. OlBitpicker EDIT-Color change should open to Background Settings, perhaps screen resolution - Changing Line 325 VDTCTXSettings to alter Y displacement MouseClick("RIGHT",80,310) ; Click Personalize on Windows Desktop Context Menu to open "SETTINGS" Background Window VDTCTX.zip1 point -
AS400 tasks automation
Neutro reacted to PhilippeLabarre for a topic
I got what I wanted by using $oPs.GetText(9, 18, 50);1 point -
Dog Darn It! I might reside, but I am not residential ... I am far more suave & sophisticated than that. As for my Bot, it takes umbrage at the idea it has been spammed. And yes, I was being nice, you dufous. Now go and change your underpants before we get any more droppings slipping out.0 points
-
All of this coming from our residential "Spam Bot"? How nice!0 points