Leaderboard
Popular Content
Showing content with the highest reputation on 01/18/2017 in all areas
-
Automate all windows and browser applications with one UDF function library. Based on the microsoft automation API this library high level supports Recognition of conttrols from EDGE, Chrome, FF, Opera, Safari and Windows native apps Small testing framework to split object repository from coding away Introduction Quickstart - Getting started quickly Simple scripts With this module you can automate all applications/programs that support ui automation and/or accesibility api from microsoft you can recognize more controls than AutoIT can recognize "out of the box" you can use concepts from other testing frameworks like http://download.freedesktop.org/ldtp/doc/ldtp-tutorial.pdf http://safsdev.sourceforge.net/Default.htm coded ui testing from microsoft Some of those controls / applications are chrome browser (partly mainwindow has to be done with MSAA for navigating) chrome://accessibility in the adress bar of chrome or start with "--force-renderer-accessibility" silverlight controls Ribbon control controlbars of Excel/Word IE and FF browsers Windows Media Player Windows clock AFX .. controls (partly) .... Based on the initial AIO Object I now have made the interface file to work with objCreateInterface function which is in the latest beta's automate clicking and querying basic information It gives you a lot of basic information to be able to automate clicking, querying basic information where it goes further in certain situations than AutoIt is identifying Starting threads for background on the ui automation api of microsoft (not for starters) http://en.wikipedia.org/wiki/Microsoft_UI_Automation http://msdn.microsoft.com/en-us/library/ms747327.aspx Previous threads in general help/support Interface AutoItObject IUIAutomation ObjCreateInterface and struct tagPoint in method ElementFromPoint Be aware that API is not allways installed under XP/Vista see http://support.microsoft.com/kb/971513 Within Windows 7 and Windows 8 it should be preinstalled by default. Be aware on 32 and 64 bits way of running your script #AutoIt3Wrapper_UseX64=Y or N Basic example of usage / showing and retrieving the default information, will post multiple examples later Hover your mouse to an area of interest and press ctrl+w and information will be shown in the edit box of the form Simple spy demo (see simplespy.au3 or use latest ZIP attachment for latest version) Main features Recognize windows and html controls for the major browsers Logical and physical description for controls (UI mapping, Application map) Simple repository logic to abstract logical and physical descriptions Store Runtime Type Information in RTI. variables Rubberbanding/highlighting of objects Simple spy to help in making / identifying the physical description Support of regular expression(s) in identifying objects recognize objects on multiple properties supported properties: name ,title, automationid, classname, class, iaccessiblevalue, iaccessiblechildId, controltype, processid, acceleratorkey The actions provided so far "leftclick", "left", "click", "leftdoubleclick", "leftdouble", "doubleclick", _ "rightclick", "right", "rightdoubleclick", "rightdouble", _ "middleclick", "middle", "middledoubleclick", "middledouble", "mousemove", "movemouse" "setvalue","settextvalue" "setvalue using keys" "setValue using clipboard" "getvalue" "sendkeys", "enterstring", "type", "typetext" "invoke" "focus", "setfocus", "activate" "close" "move","setposition" "resize" "minimize", "maximize", "normal", "close", "exist", "exists" "searchcontext", "context" "highlight" "getobject","object" "attach" "capture","screenshot", "takescreenshot" "dump", "dumpthemall" "propertyvalue", "property" match on multiple properties like: name:=((Zoeken.*)|(Find.*)); ControlType:=Button; acceleratorkey:=Ctrl+F Support for 117 different properties see $UIA_propertiesSupportedArray in uiawrappers like for example title, regexptitle, class, regexpclass, iaccessiblevalue, iaccessiblechildid, name, accesskey, automationid, classname IAccessible, IAccessible2, ISimpleDom interfaces debuglogging to a file log.txt (no output in scitewindow) Examples Example 1 Iterating thru the different ways of representing the objects in the tree (#comment-1105548) Example 2 Finding the taskbar and clicking on the start menu button (#comment-1105680) Example 3 Clicking a litlle more and in the end displaying all items from the clock (thats not directly possible with AU3Info) (#comment-1108849) Example 4 that demonstrates the calculator Example 5 Automating chrome Example 6 Demonstrates all stuff within chrome to navigate html pages, find hyperlink, click hyperlink, find picture, click picture, enter data in inputbox Example 7 The chrome example modified to a firefox example Example 8 The other major browser Internet Explorer automated (made on Example 6 and 7) Example 9 Windows media player Example 10 Automating mach 3 (AFX windows and other hard to get recognized by AutoIT) Lot of links are broken due to forum upgrade just search for the text like "Example 11 Demonstrate Word, Notepad and Calculator actions" Example 11 Demonstrate Word, Notepad and Calculator actions ... Example 13 Details 1 about the right pane of the windows explorer Example 14 Details 2 about the right pane of the windows explorer Example 15 Details 3 about the right pane of the windows explorer Example 16 Details 4 about the right pane of the windows explorer Example 17 Details 5 about the right pane of the windows explorer WITH CACHING Example 18 Details 6 about the right pane of the windows explorer WITH VIRTUAL ITEMS Example 19 Eventhandling examples Example 20 Eventhandling examples Example 21a Eventhandling examples Internet Explorer Example 21b Eventhandling examples Internet Explorer Example 22 Eventhandling examples Follow focus Example 23 Eventhandling examples structure changed Example 24 Eventhandling examples IUIAutomationEventHandler Example 25 SAFEARRAYS Example 26 IACCESSIBLE / MSAA Example 27 IACCESSIBLE2 / MSAA Example 28 IACCESSIBLE / MSAA events Example 29 IACCESSIBLE2 events Example 30 ISimpleDOM Example 31 Notepad window move, maximize, minimize Example 32 Three browsers doing the same stuff with small differences in scripting only .. TODO Build recorder Enhance the spy with a nicer UI UI for the repository (now in the script with dot notation) Enhance mapping / identifying on multiple properties instead of 1 combined with index If speed becomes an issue use the caching logic of the MS UIA framework Add the other patterns later Generalize the concept of System Under Test of starting the SUT (for testing framework purposes) Remote running of scripts Fix issue on finding within dynamic context ... edit august 18th 2013 initial post Only zip files are needed to download , just unzip in 1 directory edit july 2016 Made V0_63 and examples works with AutoIt v3.3.14 Windows 10 tested Simple spy gives some basic code as a present Chrome latest versions seems to be having issues with IUIAutomation on tabs/buttons of mainwindow use MSAA for accessing tabsheets / buttons more cleanup to be in UDF style More comments in the source see changelog.txt for previous changes edit september 2017 All examples fixed for the IE, Firefox and Chrome browser Some small but essential fixes in UIAWrappers edit april 2018 Enhanced logic on fallback / dynamic search, still not perfect, to slow Retested with latest Chrome, FF, Edge and IE11 and some extensions to show how to get text from the webpage (examples 5,6,7) Some small bugfixes Some comments as given in forum incorporated edit may 2019 Speed enhancements on especially fallback searching UIA.CFG works now in a better way to turn on/off debug, highlighting, debug2file More stable and consistent behavior Internal cleanup and refactoring of bigger functions Checked with W10 (not tested on W7) Added some W10 properties Run with 3.3.14.5 on W10 UIA_V0_51.zip EXAMPLES_V0_5.zip UIA_V0_63.zip EXAMPLES_V0_63.zip UIA_V0_64.zip EXAMPLES_V0_64.zip EXAMPLES_V0_66.zip UIA_V0_66.zip EXAMPLES_V0_70.zip UIA_V0_70.zip1 point
-
ChakraCore UDF - executing JavaScript in AutoIt
dariel reacted to scintilla4evr for a topic
Hello! Microsoft Edge, the new browser released with Windows 10, uses Chakra as its JavaScript engine. In January, Microsoft released ChakraCore - the open source version of the engine that can be used in other apps. So, how about using it in AutoIt? I tried 2 times to create ChakraCore UDF, and I succeeded. So here it is - the ChakraCore UDF. Features: Executing JavaScript from AutoIt (obviously) Passing data from AutoIt to JavaScript Calling AutoIt functions from JavaScript ChakraCore UDF Have fun!1 point -
WinHttp.au3: #include-once Global Const $HTTP_STATUS_OK = 200 Func HttpPost($sURL, $sData = "") Local $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1") $oHTTP.Open("POST", $sURL, False) If (@error) Then Return SetError(1, 0, 0) $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send($sData) If (@error) Then Return SetError(2, 0, 0) If ($oHTTP.Status <> $HTTP_STATUS_OK) Then Return SetError(3, 0, 0) Return SetError(0, 0, $oHTTP.ResponseText) EndFunc Func HttpGet($sURL, $sData = "") Local $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1") $oHTTP.Open("GET", $sURL & "?" & $sData, False) If (@error) Then Return SetError(1, 0, 0) $oHTTP.Send() If (@error) Then Return SetError(2, 0, 0) If ($oHTTP.Status <> $HTTP_STATUS_OK) Then Return SetError(3, 0, 0) Return SetError(0, 0, $oHTTP.ResponseText) EndFunc Example 1: #include "WinHttp.au3" Global $MD5 = HttpPost("http://www.afk-manager.ir/test/post.php", "password=WeWantThisAsMd5") MsgBox(64, "MD5", $MD5) Example 2: #include "WinHttp.au3" Global $sGet = HttpGet("http://www.google.com/") FileWrite("Google.txt", $sGet) Speed compare: [WinHttp.WinHttpRequest.5.1 GET] 1 = 422.961162765649 2 = 455.738280639636 3 = 441.821516504421 4 = 390.538648365335 Total = 1711.059608275041 Average = 427.7649020687603 [WinHttp.WinHttpRequest.5.1 POST] 1 = 826.436200956633 2 = 872.366642546045 3 = 871.266802895081 4 = 875.792832686324 Total = 3445.862479084083 Average = 861.4656197710208 [HTTP UDF GET] 1 = 984.282912132673 2 = 813.896511915435 3 = 781.158836566862 4 = 791.901235916364 Total = 3371.239496531334 Average = 842.8098741328335 [HTTP UDF POST] 1 = 788.734835486743 2 = 975.688234142967 3 = 785.810779035388 4 = 847.537193542955 Total = 3397.771042208053 Average = 849.4427605520133 [InetRead GET] 1 = 672.120733570292 2 = 595.221462195098 3 = 561.122261209642 4 = 738.180516302658 Total = 2566.64497327769 Average = 641.6612433194225 Tests result: Server 2003 32bit OK Server 2003 64bit Not Tested Server 2008 32bit Not Tested Server 2008 64bit OK XP 32bit OK XP 64bit Not Tested Vista 32bit Not Tested Vista 64bit Not Tested 7 32bit OK 7 64bit OK 8 32bit OK 8 64bit OK Are you interested? Check this out: http://msdn.microsoft.com/en-us/library/windows/desktop/aa384106(v=vs.85).aspx1 point
-
A new image search solution
guestscripter reacted to Lasker for a topic
Hello, Im a new AutoIt user, im from Spain and i would like to share here my own image search detection method. What's about it? It's not perfect, but with it you don't need to use any DLL file. You don't need to distribute the image file with your final AU3 Script, or Exe if compiled. The image size does not affect to the detection speed. It's bug free (i believe). You can find here as an attach file, a distro package with all you need, and it includes a simple how-to guide. Im going to paste here the how-to guide: How to use this AutoIt image detector: Point 1: Install JRE (Java Runtime Environment), without this you can't execute Java Applications (.jar files). Open the Java tool named AISD with double click on it, or "java -jar aisd.jar" in the cmd. In AISD, open the image you want to detect in your script. Remember: the upper left pixel of the image, MUST be a not common color in the background if you want a fast detection. Then you will get a script file if you want, or only a clipboard copied version, full ready to paste into your main script because this one comes with extra help codes. Anyway, the generated code is the $sign definition of the image (calm down, point 3 explains what is the $sign and it's easy). Point 2: Paste the mentioned code in your main script, and try to follow the sample_usage script. If you know how to write au3 codes, it should be very easy. In general terms, all you need is to include image_search.au3, and then you can use the func image_search($sign, $width, $height). You need also the get_image_sign() function, that calculates the first parameter for image_search(). The get_image_sign() function is the one you have generated at point 1. Point 3: image_search() returns the center point of the target image. The func needs the $sign from the image, width and height. This $sign is the "footprint" of the image, in the form of an array of 9 integers. In most of the cases the $sign should be enough to identify the image, this is useful because using the $sign instead of the real image let you get a small script and a fast detection. You can also delete the image once you get the $sign. This $sign has always the same size (those 9 integers, it does not matter if the original image is small or big). How can you define the $sign for a certain image?, you don't need to generate the $sign, AISD does (point 1). Follow the sample_usage script and you will get it. Files in this distro package: * AISD.jar: The already explained Java app. * image_search.au3: The library or module with the resources that lets you detect images. * sample_usage.au3: The mentioned sample_usage script. It contains the smallest example, but i think it should be ok for learning purposes. * sample_usage.exe: The sample_usage.au3 script compiled (au3 -> .exe). You can execute this to see the image_search() func working. * sample_target.png: The image to be detected in the sample_usage. You can delete this file and the script will be fine. * OffsetCalc.jar: It's only a Java tool to calculate the offset to transform an XY point into another one. It's useful if you want to use apply_offset function (from image_search.au3). Both things are only necessary when it's hard to find a version of the target image with upper left pixel in the way mentioned. As you can imagine, the idea is to detect another image and then apply the offset to get the real coordinates of the original target image. Happy Detections Lasker image_search.zip1 point -
_IELinkClickByText with IE11 not working
Danp2 reacted to BananaFish for a topic
Hello Kevin, Tried out your code as you've posted it and it also doesn't work for me. I got a hunch that the Text entered into the _IELinkClickByText might have to be complete or perhaps there is a duplicate on the page somewhere and the function isn't resolving to any of them. So I ran this to see what the full text for the link is: $oIE = _IECreate ("http://www.autoitscript.com/forum/index.php?") $sText = _IEBodyReadText ($oIE) ConsoleWrite($sText) And it appeared to be this : "AutoIt General Help and Support" Adding Autoit in front of the text seems to make it work. Here is the working code with the change in it: #include <IE.au3> $delay = 0 $wait = 5000 $sURL = "http://www.autoitscript.com/forum/index.php?" $oIE = _IECreate($sURL, 0, 0, 0) $HWND = _IEPropertyGet($oIE, "hwnd") WinSetState($HWND, "", @SW_MAXIMIZE) _IEAction($oIE, "visible") _IELoadWait($oIE, $delay, $wait) _IELinkClickByText($oIE, "AutoIt General Help and Support") Edit: Fixed spacing1 point -
WinWait for Title with quotes syntax error
kevin42036 reacted to Subz for a topic
Just use single quotes around your string for example: ' <ARWNLSString nlsTable="ariba.html.procureui" nlsKey="ReviewTitle">Checkout</ARWNLSString> - Internet Explorer' JLogan3o13 bet me too it1 point -
WinWait for Title with quotes syntax error
kevin42036 reacted to JLogan3o13 for a topic
@kevin42036 welcome to the forum. Try a single quote around the outside: WinWait('<ARWNLSString nlsTable="ariba.html.procureui" nlsKey="ReviewTitle">Checkout</ARWNLSString> - Internet Explorer') You can also set the WinTitleMatchMode to 2 (match any substring), and do something like this: Opt("WinTitleMatchMode", 2) WinWait("ariba.html.procureui")1 point -
ronaldo97, I have already told you how to do this. But here is an example for you: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("GUIResizeMode", $GUI_DOCKAUTO) $Form1 = GUICreate("Form1", 623, 442, 192, 150, BitOR($WS_SIZEBOX, $WS_SYSMENU)) GUISetBkColor(0xACA899) $Label1 = GUICtrlCreateLabel("Hello", 300, 100, 118, 29) GUICtrlSetFont(-1, 16, 400, 0, "Tahoma") GUICtrlSetColor(-1, 0x800000) GUICtrlSetBkColor(-1, 0xFFCCCC) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd M231 point
-
This works for me: #include <Excel.au3> #include <Array.au3> Local $oExcel = _Excel_Open() Local $oWorkbook = _Excel_BookNew($oExcel) _Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, "GMC", "A1") _Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, "Sierra", "B1") _Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, "GMC", "A5") _Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, "Sierra Madre", "B5") Local $aResult = _Excel_RangeFind($oWorkbook, "GMC", "A:A") For $i = 0 To UBound($aResult, 1) - 1 _Excel_RangeCopyPaste($oWorkbook.Activesheet, $oWorkbook.Activesheet.Range($aResult[$i][2]).Offset(0, 1), $oWorkbook.Activesheet.Range($aResult[$i][2]).Offset(0, 2)) Next1 point
-
TCPConnectTimeout function
argumentum reacted to RTFC for a topic
@argumentum: Hmmm, a few off-the-cuff remarks... This will return whatever it was most recently successfully set to by any other software, and does not necessarily reflect full capacity on your system. I don't think that'll work. If you call getsockopt with a value that's too high, the call will simply fail (in my experience). That's why you should call getsockopt afterwards to check whether setsockopt succeeded. Plus, from a machine-code perspective, setting any capacity to (2^n) -1 is asking for trouble (read: buffer overflow/inadvertent wrap/page fault/etc...). Great idea, but reality tends to be messier. Will you be able to ensure that your Recv capacity will always exceed the Send load on your chosen port? How about if the hardware layer(s) underneath the TCP layer start running out of buffer space (e.g., due to a memory leak) or may themselves collect multiple packets before a flush (which then may exceed the capacity of your own buffer)? I would suggest you at least consider in your message handling that your socket buffer may at some point be filled completely before you get a chance to deal with it, with more data on the way/waiting in the wings. It may also be beneficial to make the buffer an exact multiple of your (fixed) packet size, so you won't have to rebuild packets from split fragments. All I'm saying is, you do not have full control over the hardware layers, so your software layer(s) should have contingency planning built in. That being said, 8K minus overhead sounds like a reasonable size to play with. But I would use a bit more overhead (maybe subtract 10% from maxlen, with a minimum of 128 bytes, or maybe one full packet size). Note also that if you were to use VPN to access your LAN (for example), VPN itself will add another header to your packet. It's stuff like that you discover only once you start chasing "impossible bugs." On top of that, these tend to be Heisenbugs, i.e., highly timing- and capacity-sensitive, and thus very difficult to hunt down and kill. Best not to invite those to your party...1 point -
Added source for original script to first post, along with a screenshot. BLOG Not an auspicious start so far. Not long after starting this topic, and before I started any work on the project, I got a visitor who stayed for 3 hours. I also got some kind of infection or virus out of nowhere which drove me to the Loo for a pee every 5 to 15 minutes (today, that has all but disappeared, after plaguing me all day yesterday) ... could be alcohol related as I don't drink much these days, but did partake a bit more than my usual the night before, with some Moscato ... a piddly (sic) amount by the regular standards of most people ... but I do have a low alcohol tolerance these days ... my body treats it like a poison . Anyway, I eventually made a start yesterday, and worked on things for a couple of hours, which eventuated in a bit of code. I have done some more code etc today. Here's what I did yesterday, which you can try if you like. It doesn't do much other than save code for a blank GUI, which you can determine the size of. Project.au3 background.bmp (required resource to show grid pattern) NOTES - I'd forgotten what a complex mess the GuiBuilder script is, and so I have come to the conclusion that I may just fail in this project. I will try hard not to though. At the moment I am just extracting the basics and working on modifying them, based on how much I understand plus my AutoIt/coding experience & knowledge. However, those last, may not be up to the task. My investigations so far, have led me to believe that the script, by today's standards is full of a lot of unnecessary crap. A lot of things that are declared, are part of the standard Include files now, so I should be able to strip most, if not all, of them out. But already there are a bunch of things I don't understand, and a lot of magic numbers being used. So it looks like I will be building from the ground up, extracting bits as I go, and getting them working, before I move onto the next lot ... which of course, means understanding what is going on. I am guessing, that a lot will end up being trial & error. In the end, if I don't understand enough to do as I hoped, I will hopefully at least, have a working update that works with latest AutoIt. That is the most important thing I guess.1 point
-
TCPConnectTimeout function
argumentum reacted to funkey for a topic
Maybe I never used this function? I don't even know! Here an example: Global Const $SO_SNDBUF = 0x1001 Global Const $SO_RCVBUF = 0x1002 Global Const $SOL_SOCKET = 0xFFFF Global Const $SO_MAX_MSG_SIZE = 0x2003 Global $Domain = "www.google.com" TCPStartup() Global $IP = TCPNameToIP($Domain) Global $iSock = TCPConnect($IP, 80) If $iSock = -1 Then ConsoleWrite("Connection error!" & @CRLF) Exit EndIf Global $tResult = DllStructCreate("int") Global $iRes = _getsockopt($iSock, $SOL_SOCKET, $SO_SNDBUF, $tResult) If $iRes = 0 Then ConsoleWrite("send buffer size = " & DllStructGetData($tResult, 1) & @CRLF) EndIf Global $iRes = _getsockopt($iSock, $SOL_SOCKET, $SO_RCVBUF, $tResult) If $iRes = 0 Then ConsoleWrite("receive buffer size = " & DllStructGetData($tResult, 1) & @CRLF) EndIf TCPCloseSocket($iSock) Func _getsockopt($iSocket, $iLevel, $iOptName, ByRef $tOptVal) Local $iOptLen = DllStructGetSize($tOptVal) Local $aRet = DllCall("WS2_32.DLL", "int", "getsockopt", "int", $iSocket, "int", $iLevel, "int", $iOptName, "struct*", $tOptVal, "int*", $iOptLen) Return $aRet[0] EndFunc ;==>_getsockopt1 point -
@Lasker - thank you for this, I tested and it's clearly working. Two questions please: 1. Does your image search support color variations? (e.g. imagesearch.au3 has smth like this - it can find image even if not perfectly same colors, maybe big image is from lower quality jpg etc). 2. Is it possible to find different sizes of the same image/pattern? This would be indeed great, imagesearch.au3 only solution is to have multiple target images. I assume your 9 signs could be multiplied by the number of sizes to search, but not sure of speed then. Thanks anyway1 point
-
IUIAutomation MS framework automate chrome, FF, IE, ....
AdamSteele reacted to storme for a topic
G'day Junkew There is so much that the Windows API can't access and it's long overdue that UIautomation was brought into AutoIt. I second Ascend4nt's comment about a "next-gen" Window info tool. It'd be a great tool to explore this new way of Automating Windows. Like What I've always liked to see in the existing info tool is code samples to cut and paste. In other words you select an item click a button and get a bit of code to cut and paste into your program. I've got many ideas about it that I won't expand on here unless you're interested. AND I'm not just asking for something as always I'm willing to help out in any way I can if you need any help. As you're the current expert how hard would it be to convert help file examples using standard syntax to UIautomation examples? Thanks for the effort! John Morrison1 point -
Updated to ver 2.0.1 Fixed: formatting of submitted code Fixed: clicking twice on same view made it disappear Fixed: a few layout issues Fixed: naming of variables Updated: all functions Added: function syntax population To-Do: Update examples Requirements: IE.au3 version T2.0-3 or later, and latest beta of course IE-Builder v2.0 previous dowloads 900 +/- Credits to Dale Hohm for the Internet Explorer UDF Library **** This is The Public Release of IE-Builder, a helpful tool in creating IE objects The new look!!! Builder, Internet, Source, Syntax, and Examples ... All at your finger-tips Enjoy!!! Valuater 8) UpDated 6-15-2006 ver 2.0.0 by big_daddy ************* UpDated 2-18-2006 ver 1.0.3 added - Check all locations for Beta ************* UpDated 1-12-2006. ver 1.0.2 added - list All Html Elements added - list Image view added - list Anchor Tags view added - list Form Elements view added - Objects Error handling ( ie... when user presses forward, and there was no previous page ) and more ************* UpDated 1-7-2006 Alpha Release added - minimize button added - ini file and favorites button added - search stop/continue through source added - error checking and more1 point
-
Portable RDP
AdamSteele reacted to BinaryBrother for a topic
Links updated. CNET [Download.com] has many different clients that redist those files, so if I have to slap the usual EULA-TOS on the download, I will. iEvKI3gv9Wrkd41u, you do realize that you replied almost a year after AdamSteele replied... Right?1 point -
RobertH, Welcome to the AutoIt forum. Does this make it clear? Try entering anything other than a number! #include <GUIConstantsEx.au3> #include <EditConstants.au3> $hGUI = GUICreate("Test", 500, 500) $hInput = GUICtrlCreateInput("", 10, 10, 250, 20, $ES_NUMBER) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEndCome back if it does not. M23 P.S. When you psot code, please use Code tags. Put [autoit ] before and [/autoit ] after your posted code (but omit the trailing space - it is only there so the tags display here).1 point
-
GodForsakenSoul, Just create the input with the $ES_NUMBER style. It is all in the Help file..... M231 point