Leaderboard
Popular Content
Showing content with the highest reputation on 06/28/2019 in all areas
-
The GUI looks like shown in the picture: It contains a main menu, a treeview in left pane that lists UI Automation elements, a listview in right pane that displays detail information for the selected element, and a splitterbar to adjust the width of the two panes. Detect element The "Detect element" main menu is used to detect elements under the mouse with function keys F1 - F4. See How to topics number 2. Left pane The left pane is a treeview that initially lists open programs and windows. Generally, the left pane shows UI Automation elements represented as treeview items. Right pane The right pane is a listview that displays detail information for the selected treeview element. The information is grouped into different types of information. Only the relevant information for each type is displayed. Invalid elements When a window is closed the elements in UIASpy becomes invalid. But the elements are not deleted in UIASpy and can still be handled and selected in the treeview. Detail information for an element that was calculated before the window was closed can still be seen in the listview. In this way it's possible for UIASpy to show information for eg. a context menu that is closed as soon as it loses focus. Listview features Listview features Help system With completion of the Help system, a lot of information has been moved from this post and other posts into the Help system. Sample code creation Sample code creation is implemented through the UI element Detail info listview page and through the Sample code main menu. Sample code creates code snippets based on data in one or more selected rows in the Detail info listview page or based on the clicked Sample code menu item. UI Automation code is largely based on COM interface objects and thus on the function ObjCreateInterface(), which is one of the advanced functions in AutoIt. The main purpose of Sample code functionality is to eliminate the complexity of ObjCreateInterface(). Sample code creation either through the Detail info listview page or through the Sample code main menu can create all the interface objects required in UI Automation code. Another purpose is of course to make it easier and faster to implement code for simple automation tasks. Through Sample code creation, you can more or less create all code in a simple automation task: Create UI Automation initial code Create condition and find application window Create condition and find control in window Get information about windows and controls Create pattern objects to perform actions Get information related to pattern objects Perform actions with pattern object methods Add a Sleep() statement if necessary Note that the UI element used in sample code is named after the selected element in the treeview. Also note that both the Sample code menu items and the sections in the Detail info listview page are placed in approximately the order they are used in a simple automation task. Sample code creation through Detail info listview page Sample code creation through Sample code main menu Supported applications Most browsers including Google Chrome To be able to spy on web content in Google Chrome it's necessary to enable accessibility by entering chrome://accessibility/ in the address bar of a new tab item, and then check the five check boxes that are located in a column in upper left corner down along the left edge. Then the accessibility tab can be closed again. It's a global setting that applies to all open and new tabs until Chrome is closed. Without accessibility enabled you are only able to investigate the outer elements of Chrome but not web content. Internet Explorer Microsoft Edge Mozilla Firefox Most Microsoft applications and applications developed with Microsoft software including Classic Windows applications based on the standard control library Modern Universal Windows Platform apps like the Windows 10 Calculator Programs implemented through .NET Framework eg. Windows Forms applications Most applications provided by major development companies Automation issues Automation issues How to topics If UI Automation or the UIASpy tool is new to you, then you should read the How to topics. Examples Examples that demonstrates the features of UIASpy: Automating Notepad. Very detailed example. Automating Notepad - Windows XP Examples about Sample code creation: Automating Notepad with Sample code - step by step Automating Notepad with Sample code - all at once Chrome - Clicking an extension. Compact summary example. Click Save As... issue in Notepad examples: Using Expand() instead of Invoke() Updates Windows 8, Windows 8.1 and Windows 10 updates Threads UI Automation UDFs contains all include files. In Using UI Automation Code in AutoIt you can find and download examples and read information about using UIA code. UI Automation Events is about implementing event handlers and includes GUIs to detect events. IUIAutomation MS framework automate chrome, FF, IE, .... created by junkew August 2013 is the first AutoIt thread on UIA code. Zip-file The zip contains source files for UIASpy GUI. Note that UI Automation UDFs must be installed in the Includes folder. You need AutoIt 3.3.12 or later. Tested on Windows XP, Windows 7 and Windows 10. Comments are welcome. Let me know if there are any issues. UIASpy.7z1 point
-
Monocypher simple encryption library
Earthshine reacted to matwachich for a topic
Hi! While developping a project that involved heavy local network communications of sensible data (patients medical informations) between an AutoIt3 GUI client and a GoLang server, I cam across the problem of data security on the wire. It was (for me) nearly impossible to combine AutoIt's encryption functions and GoLang ones. So I searched for a C library that would be strong and simple to wrap for the 2 languages. So, I discovered Monocypher. Here is an AutoIt wrapper for It. I think it is complete (encryption, hashing, pasword key derivation, key exchange and public key signature), at last for my use case. https://github.com/matwachich/monocypher-au31 point -
I had given two options in my script to indicate the different possibilities. If you wish to save to a directory other than the default, then the first options has to be commented out. Apologies if In wasn't clear. your code should be #include <IE.au3> While ProcessExists("iexplore.exe") ProcessClose("iexplore.exe") WEnd Global $sFileSavePath = "F:\Documents" ;~ Folder Path to Save Excel Documents Global $oIE = _IECreate("https://financials.morningstar.com/ratios/r.html?t=0P0001648D&culture=en&platform=sal") _IENavigate($oIE, "javascript:exportKeyStat2CSV()") Local $hIE = WinGetHandle("[Class:IEFrame]") Local $hCtrl = ControlGetHandle($hIE, "", "[ClassNN:DirectUIHWND1]") WinActivate($hIE) ControlSend($hIE ,"",$hCtrl,"{F6}") ControlSend($hIE ,"",$hCtrl,"{TAB}") ; To open save as dialog box Sleep(500) Send("{DOWN 2}") Send("{ENTER}") WinWaitActive("Save As") Send($sFileSavePath & "\abc.csv") Send("{ENTER}")1 point
-
Hi. I faced a simmilar issue for my compiled scripts, that are stored on a Windows Server Share and are used by quite a lot of users continuously and simultaneously. So the users are throughout the Network (LAN), the Server the files are stored on is a remote machine (view of my PC), that's why I remotely Close "Network file handles" Net-GetOpenFileHandles-CloseAndReplace.au3 #include <GUIConstantsEx.au3> #include <NetShare.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <EditConstants.au3> ; Enumerate open files on the server $DragDropOpenFile = "<drag drop the opened file on a server share here>" $DragDropNewFile = "<drag drop the file supposed to replace the above one here>" $NewFile = "" $Gui_h = 250 $Gui_w = 800 $vDist = 7 ; GUICreate($GuiTitle, $w, $h, @DesktopWidth - $w - 100, @DesktopHeight - $h - 60, -1, $WS_EX_ACCEPTFILES) ; generally enable drag-drop for files into other GUI controls $myGui = GUICreate("Tool to forcibly close & replace open files on server shares", $Gui_w, $Gui_h, 100, 100, -1, $WS_EX_ACCEPTFILES) $InputFileToClose = GUICtrlCreateInput($DragDropOpenFile, 20, $vDist, $Gui_w - 40, 20) GUICtrlSetState(-1, $GUI_DROPACCEPTED) ; allow drag-droping files for this control, $InputFile Opt("Guicoordmode", 2) $InputFileNew = GUICtrlCreateInput($DragDropNewFile, -1, $vDist) GUICtrlSetState(-1, $GUI_DROPACCEPTED) ; allow drag-droping files for this control, $InputFile GUICtrlSetState(-1, $GUI_DISABLE) $lServer = GUICtrlCreateLabel("<server>", -1, $vDist) $lShare = GUICtrlCreateLabel("<share-mapping>", -1, $vDist) $lPath = GUICtrlCreateLabel("<sub-path>", -1, $vDist) $lFile = GUICtrlCreateLabel("<file>", -1, $vDist) $doit = GUICtrlCreateButton("Search and close for open file handles", -1, $vDist) GUICtrlSetState(-1, $GUI_DISABLE) $exit = GUICtrlCreateButton("Cancel", -1, $vDist) GUISetState() $FN = False $FNnew = "" $FNmatch = False $ToolTitle = "" $ToolTxt = "" $RegExA2E = "(?i)^(?:.*?Problem copying file from: )(.*?)(?: To :)(.*$)" ; $1 = compiled local TEMP file, $2 = not replacable destination file ; Examle Replacement failed output: !>11:19:15 Problem copying file from: C:\Users\USERNAME\AppData\Local\AutoIt v3\Aut2exe\~AU98E6.tmp.exe To :z:\MyAutoitExeForTheUsers.exe While 1 $Clip = ClipGet() If StringRegExp($Clip, $RegExA2E) Then $Src = StringRegExpReplace($Clip, $RegExA2E, "$2") GUICtrlSetData($InputFileToClose, $Src) $Dst = StringRegExpReplace($Clip, $RegExA2E, "$1") GUICtrlSetData($InputFileNew, $Dst) EndIf $input = GUICtrlRead($InputFileToClose) If $input <> $DragDropOpenFile Then ; da wurde was reingezogen $DragDropOpenFile = $input If StringLeft($input, 2) = "\\" Then $Type = "UNC" $ServerShareUNC = StringLeft($input, StringInStr($input, "\", 0, 4) - 1) $fRelPathFN = StringReplace($input, $ServerShareUNC, "") $fPath = StringLeft($fRelPathFN, StringInStr($fRelPathFN, "\", 0, -1)) $FN = StringTrimLeft($fRelPathFN, StringInStr($fRelPathFN, "\", 0, -1)) ElseIf StringMid($input, 2, 1) = ":" Then ; Pfad mit Laufwerksbuchstabe, evtl. Netzwerk Mapping (erforderlich) $drive = StringLeft($input, 2) $Type = DriveGetType($drive) If $Type = "Network" Then $ServerShareUNC = DriveMapGet($drive) $foo = StringReplace($input, $drive, $ServerShareUNC) ; Laufwerkspfad in UNC Pfad umwandeln $fRelPathFN = StringReplace($foo, $ServerShareUNC, "") $fPath = StringLeft($fRelPathFN, StringInStr($fRelPathFN, "\", 0, -1)) $FN = StringTrimLeft($fRelPathFN, StringInStr($fRelPathFN, "\", 0, -1)) Else MsgBox(48, @ScriptLineNumber, "This script can *ONLY* close remotely handles for files open on server shares!" & @CRLF & _ $input & @CRLF & _ $drive & " = " & $Type) ContinueLoop 2 EndIf EndIf $Server = StringLeft($ServerShareUNC, StringInStr($ServerShareUNC, "\", 0, 3) - 1) $Share = StringTrimLeft($ServerShareUNC, StringInStr($ServerShareUNC, "\", 0, 3) - 1) GUICtrlSetData($lServer,"Server = '" & $Server& "'") GUICtrlSetData($lShare, "Mapping = '" & $Share & "'") GUICtrlSetData($lPath, "SubPath = '" &$fPath & "'") GUICtrlSetData($lFile, "FileName= '" & $FN &"'") GUICtrlSetState($doit, $GUI_ENABLE) GUICtrlSetState($InputFileNew, $GUI_ENABLE) EndIf If $NewFile <> GUICtrlRead($InputFileNew) Then $NewFile = GUICtrlRead($InputFileNew) If $NewFile <> $DragDropNewFile Then If StringInStr($NewFile, $DragDropNewFile) Then $NewFile = StringReplace($NewFile, $DragDropNewFile, "") GUICtrlSetData($InputFileNew, $NewFile) EndIf $FNnew = StringTrimLeft($NewFile, StringInStr($NewFile, "\", 0, -1)) If $FN = $FNnew Then If $FNmatch = False Then $FNmatch = True GUICtrlSetData($doit, "Search for & Close open file handles, then replace file") EndIf Else If $FNmatch Then $FNmatch = False GUICtrlSetData($doit, "Search for & Close open file handles, then replace file") GUICtrlSetData($InputFileNew, $DragDropNewFile) EndIf EndIf EndIf EndIf Switch GUIGetMsg() Case $exit, $GUI_EVENT_CLOSE GUIDelete($myGui) Exit Case $doit AbArbeiten($Server, $Share, $fPath, $FN) EndSwitch WEnd Func AbArbeiten($_Srv, $_Shr, $_fPth, $_fNme) Local $iID = 0 Local $iRights = 1 Local $iLckCount = 2 Local $iFPFN = 3 Local $iUser = 4 ConsoleWrite($_fPth & $_fNme & @CRLF) Local $aFile = _Net_Share_FileEnum($_Srv) If IsArray($aFile) Then ; _ArrayDisplay($aFile) Local $x $ToolTxt = "Open File Handles:" $ToolTitle = "Handles to be checked total: " & $aFile[0][0] UpdateToolTip() AdlibRegister(UpdateToolTip, 1000) For $x = $aFile[0][0] To 1 Step -1 $ToolTitle = $x & " handles remaining for checking..." If Not StringInStr($aFile[$x][$iFPFN], $_fPth & $_fNme) Then ; ConsoleWrite("Nix Enthalten in: " & $aFile[$x][$iFPFN] & @CRLF) _ArrayDelete($aFile, $x) Else $ToolTxt &= @CRLF & $aFile[$x][$iFPFN] & ", User = " & $aFile[$x][$iUser] ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $ToolTxt = ' & $ToolTxt & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console EndIf Next $aFile[0][0] = UBound($aFile) - 1 _ArraySort($aFile, 0, 1, 0, $iUser) ; _ArrayDisplay($aFile, $aFile[0][0] & " FileLocks found.") If $aFile[0][0] = 0 Then $ToolTitle = "Done, no open file handles were found" $ToolTxt &= @CRLF & ", no handles to be closed for this file!" Sleep(2000) $ToolTxt = "" ReplaceFile() Else $ToolTitle = $aFile[0][0] & " open file handles were found..." $CloseErr = 0 For $x = 1 To $aFile[0][0] If _Net_Share_FileClose($Server, $aFile[$x][$iID]) Then $ToolTxt &= @CRLF & @TAB & "Handle closed: " & $aFile[$x][$iID] Else $ToolTxt &= @CRLF & "ERROR: Handle Close Failed! --> " & $aFile[$x][$iFPFN] & ", User = " & $aFile[$x][$iUser] $CloseErr += 1 EndIf Next ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $CloseErr = ' & $CloseErr & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console If $CloseErr = 0 Then $ToolTitle = "All found open file handles could be closed." ReplaceFile() Else $ToolTitle = $CloseErr & " Handles could *NOT* be closed!" Sleep(2000) EndIf Sleep(1000) $ToolTxt = "" $ToolTitle = "" EndIf Else MsgBox(0, "not an array", $aFile & @CRLF & @error & @CRLF & @extended & @CRLF & _ "Unable to retrieve the array of open file handles for " & $Share) EndIf EndFunc ;==>AbArbeiten Func UpdateToolTip() ToolTip($ToolTxt, MouseGetPos(0) + 20, MouseGetPos(1) + 20, $ToolTitle) ; ConsoleWrite( $ToolTxt & @CRLF & $ToolTitle & @CRLF & "-------------------" & @CRLF) EndFunc ;==>UpdateToolTip Func ReplaceFile() If FileExists($NewFile) Then If FileCopy($NewFile, $input, 1 + 8) Then $ToolTitle = "File successfully replaced." $ToolTxt = "Done" Else $ToolTitle = "File could *NOT* be replaced." $ToolTxt = "Possibly another open file handle spawned while this script was running." & @CRLF & _ "Simply start over again, please." MsgBox(48, $ToolTitle, $ToolTxt) EndIf EndIf EndFunc ;==>ReplaceFile1 point
-
$exist = 0 $oWMI = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2") $oProcesses = $oWMI.ExecQuery("SELECT * FROM Win32_Process", "WQL", 0x30) For $oProcess In $oProcesses If ($oProcess.Name = "Notepad.exe" And StringInStr($oProcess.CommandLine, "C:\test.txt")) Then $exist = 1 Next MsgBox(64+262144, Default, "Process " & ($exist?"already":"not") & " running.",0)1 point
-
Windows Image Acquisition Object
ptrex reacted to argumentum for a topic
Some more examples for the collection Scan paper to file ( via ShowTransfer ) ;~ wia_ScanFile() Func wia_ScanFile($FileExt = "bmp", $iDevice = 1) ; Scan to file from scanner Local $hTimer = TimerInit() Local $oCommonDialog = ObjCreate("WIA.CommonDialog") Local $oDeviceManager = ObjCreate("WIA.DeviceManager") Local $oDevInfo = $oDeviceManager.DeviceInfos($iDevice) Local $oDevice = $oDevInfo.Connect Local $iIndex = 1 ; https://docs.microsoft.com/en-us/windows/desktop/wia/-wia-wia-property-constant-definitions $oDevice.Items($iIndex).Properties("6146").Value = 2 ;colors $oDevice.Items($iIndex).Properties("6147").Value = 300 ;dots per inch/horizontal $oDevice.Items($iIndex).Properties("6148").Value = 300 ;dots per inch/vertical $oDevice.Items($iIndex).Properties("6149").Value = 0 ;x point where to start scan $oDevice.Items($iIndex).Properties("6150").Value = 0 ;y point where to start scan $oDevice.Items($iIndex).Properties("6151").Value = 5100 ;horizontal exent DPI x inches wide $oDevice.Items($iIndex).Properties("6152").Value = 7002 ;vertical extent DPI x inches tall $oDevice.Items($iIndex).Properties("4104").Value = 8 ;bits per pixel $oDevice.Items($iIndex).Properties("3098").Value = 1700 ;page width $oDevice.Items($iIndex).Properties("3099").Value = 2196 ;page height Local $sFormatID Switch $FileExt Case "bmp" $sFormatID = "{B96B3CAB-0728-11D3-9D7B-0000F81EF32E}" Case "GIF" $sFormatID = "{B96B3CB0-0728-11D3-9D7B-0000F81EF32E}" Case "JPEG", "JPG" $sFormatID = "{B96B3CAE-0728-11D3-9D7B-0000F81EF32E}" Case "PNG" $sFormatID = "{B96B3CAF-0728-11D3-9D7B-0000F81EF32E}" Case "TIFF", "TIF" $sFormatID = "{B96B3CB1-0728-11D3-9D7B-0000F81EF32E}" Case Else $sFormatID = "{00000000-0000-0000-0000-000000000000}" EndSwitch Local $sImg = "image_" & @YEAR & '-' & @MON & '-' & @MDAY & '_' & @HOUR & '-' & @MIN & '-' & @SEC Local $oImg = $oCommonDialog.ShowTransfer($oDevice.Items($iIndex), $sFormatID, True) $oImg.SaveFile($sImg & "." & $FileExt) Return $sImg & "." & $FileExt EndFunc ;==>wia_ScanFile List scanners ;~ wia_ListDeviceices() Func wia_ListDeviceices() ; list of scanners Local $oDeviceManager = ObjCreate("WIA.DeviceManager") Local $n = $oDeviceManager.DeviceInfos.Count ConsoleWrite("Number of Deviceice found = " & $n & @CRLF) Local $a[$n + 1][2] $a[0][0] = $n For $i = 1 To $oDeviceManager.DeviceInfos.Count $a[$i][0] = $oDeviceManager.DeviceInfos($i).Properties("Name").Value $a[$i][1] = $oDeviceManager.DeviceInfos($i).DeviceID ConsoleWrite(" Device " & $i & ":" & @TAB & $a[$i][0] & @TAB & "(" & $a[$i][1] & ")" & @CRLF) Next Return $a EndFunc ;==>wia_ListDeviceices1 point -
The Missing Mouse
Fr33b0w reacted to seadoggie01 for a topic
So I came to work today with a bit of an issue... I forgot to bring my mouse. I have a laptop as my secondary computer, but the desktop has some legacy applications I need to use everyday. The legacy apps don't have keyboard shortcuts, and navigation without a mouse could be impossible (trust me, I've tried). So I got busy and put together this script. The script includes basic mouse movement, clicking, and a text editing mode (mouse movement is disabled). I threw it together quickly, and haven't done too much testing, but it is SUPER helpful already. Let me know if anyone is interested, and I'll keep this updated and/or add features as requested I hope to implement a Tray menu with a GUI and some directions later (Like what keyboard shortcuts do), but what I have works for now. Shortcut List: Arrow Key - move the mouse in the indicated direction 30 pixels Ctrl + Arrow Key - move the mouse in the indicated direction 100 pixels Ctrl + Shift + Arrow Key - move the mouse in the indicated direction 3 pixels Ctrl + Space - Left click Ctrl + Shift + Space - Right click (because sometimes that special right-click-button doesn't work) Alt + F8 - Toggle mouse movement for text editing / other Alt + F9 - Quit (Version 1.0.0.0 source and executable attached) Edit: A coworker told me we have spare mice... now don't I feel stupid KeyboardMouse.au3 KeyboardMouse.exe1 point -
Input Validation Function
boomingranny reacted to ViciousXUSMC for a topic
So a few times I have wanted/needed some sort of input validation (aka input mask) we had an old udf somebody made that sort of worked but was hard to use and a bit limited. As I started to learn regex of late sort of by chance I realized it could be used as a pretty great input validation. But it was a lot of code if you wanted to do it for multiple fields. So wrapped it up into a little function and sharing. Far from a UDF so putting in the example section, and I am not sure if what I am doing is even "good code" but it works for me and hope it is usefull for somebody. Basic RegEx knowledge will help you make the most of this, but a few examples are included below in the code snippet. #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Test GUI", 618, 276, 192, 124) $Label1 = GUICtrlCreateLabel("Test GUI", 168, 24, 47, 17) $Button1 = GUICtrlCreateButton("Toggle Validation", 290, 24, 110, 40) $Input1 = GUICtrlCreateInput("Max 10 Characters", 40, 72, 553, 21) $Input2 = GUICtrlCreateInput("Numb3rs 0nly", 40, 97, 553, 21) $Edit1 = GUICtrlCreateEdit("Max 10 Chars Numbers Only + Auto Line Break", 40, 120, 553, 105) GUISetState(@SW_SHOW) $iToggle = 1 While 1 Sleep(10) If Mod($iToggle, 2) = 0 Then ;Example 1 Limit to 10 Characters _GUIRegExValidate($Input1, "(.{10})(.)", "$1") ;Example 2 Can only type numbers _GUIRegExValidate($Input2, "[^\d]", "") ;Example 3 Combind More Than One On Same Input limit to 10 characters, limit to numbers only, line break @ 10 characters to new line _GUIRegExValidate($Edit1, "(.{10})(.)", "$1" & @CRLF) _GUIRegExValidate($Edit1, "[^\d\r\n]", "") EndIf $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $iToggle = $iToggle + 1 EndSwitch WEnd Func _GUIRegExValidate($sInputLabel, $sRegExCapture, $sRegExReplace) $Step1Read = GUICtrlRead($sInputLabel) $Step2Validate = StringRegExpReplace($Step1Read, $sRegExCapture, $sRegExReplace) If @Extended = 0 Then Return GUICtrlSetData($sInputLabel, $Step2Validate) EndFunc Or per recommendation you can use it with the GuiRegisterMsg so that you can only process the RegEx when you make a chance instead of in a constant loop. #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Test GUI", 618, 276, 192, 124) $Label1 = GUICtrlCreateLabel("Test GUI", 168, 24, 47, 17) $Button1 = GUICtrlCreateButton("Toggle Validation", 290, 24, 110, 40) $Input1 = GUICtrlCreateInput("Max 10 Characters", 40, 72, 553, 21) $Input2 = GUICtrlCreateInput("Numb3rs 0nly", 40, 97, 553, 21) $Edit1 = GUICtrlCreateEdit("Max 10 Chars Numbers Only + Auto Line Break", 40, 120, 553, 105) GUISetState(@SW_SHOW) $iToggle = 1 GUIRegisterMsg($WM_COMMAND, '_WM_COMMAND') While 1 Sleep(10) $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $iToggle = $iToggle + 1 EndSwitch WEnd Func _GUIRegExValidate($sInputLabel, $sRegExCapture, $sRegExReplace) $Step1Read = GUICtrlRead($sInputLabel) $Step2Validate = StringRegExpReplace($Step1Read, $sRegExCapture, $sRegExReplace) If @Extended = 0 Then Return GUICtrlSetData($sInputLabel, $Step2Validate) EndFunc Func _WM_COMMAND($hWnd, $Msg, $wParam, $lParam) If Mod($iToggle, 2) = 0 Then ;Example 1 Limit to 10 Characters _GUIRegExValidate($Input1, "(.{10})(.)", "$1") ;Example 2 Can only type numbers _GUIRegExValidate($Input2, "[^\d]", "") ;Example 3 Combind More Than One On Same Input limit to 10 characters, limit to numbers only, line break @ 10 characters to new line _GUIRegExValidate($Edit1, "(.{10})(.)", "$1" & @CRLF) _GUIRegExValidate($Edit1, "[^\d\r\n]", "") EndIf EndFunc1 point -
Or #include <Excel.au3> Global $oExcel = _Excel_Open() Global $oWorkbook = _Excel_BookOpen($oExcel, "C:\Users\TEaston\Desktop\Abacus List.xls")1 point
-
Great job jdelaney ! I made a similar script (without any filter), posted in the french forum : http://www.autoitscript.fr/forum/viewtopic.php?p=74100#p74100 Have a look to it : I used the RegExp method to avoid the use of Array.au31 point
-
Depends No, but seriously, you can use the source as long as you credit it for me1 point
-
Read/Write to memory
boomingranny reacted to litlmike for a topic
Soooo, is anyone going to answer Kj's question?1 point -
MetroGUI UDF v5.1 - Windows 10 style buttons, toggles, radios, menu etc.
Earthshine reacted to Miliardsto for a topic
you answer your piece of reality0 points