Leaderboard
Popular Content
Showing content with the highest reputation on 11/05/2013 in all areas
-
AutoIt v3.3.9.22 Beta
jaberwacky and 2 others reacted to Jon for a topic
File Name: AutoIt v3.3.9.22 Beta File Submitter: Jon File Submitted: 05 Nov 2013 File Category: Beta 3.3.9.22 (5th November, 2013) (Beta) AutoIt: - Added: @OSVersion WIN_2012R2 support. - Changed: upx.exe from 3.09 -> 3.91. - Fixed: Regression with ^ in previous beta. - Fixed #2461: GUICtrlSetImage() doesn't handle certain types of .gif file. - Fixed #2167: $WS_EX_LAYOUTRTL and GUICtrlCreateMenu causes bug. - Fixed #2468: #OnAutoItStartRegister function doc precision. - Fixed #2315: @OSVersion WIN_2012 support. - Fixed #2171: TCPTimeout inconsistent. UDFs: - Added: _GDIPlus_ParamSize() to handle X64 compatibility. - Added #2426: TrayConstants.au3 for use with Tray functions. See related function documentation for more details. - Added: more GDIPlus functions and their respective documentation and example. - Added #2506: _GUICtrlListView...() doc formating + links. - Added #2508: doc formating + links - Changed: _SQLite 3.8.0.0 -> 3.8.1.0. - Changed: Swapped PixelFormat with Stride parameter for the _GDIPlus_BitmapCreateFromScan0() function. - Changed: $tagGDIPENCODERPARAMS using $tagGDIPENCODERPARAM. - Changed: _GDIPlus...() using integer or float for positioning. - Changed: Modified _ArrayUnique() with a faster version and improved error checking. - Removed: $tagGDIPPENCODERPARAMS (duplicate of $tagGDIPENCODERPARAMS). - Removed: _GDIPlus...F() beta functions as they can be handle by corresponding without F. - Fixed #2460: _StringBetween() $sStart = $sSend. - Fixed #2459: _StringBetween() doc Description info. - Fixed #2465: _IEPropertyGet() - out of date links in "ClientInfo Properties". - Fixed: _GDIPlus_...() functions compatible with X64. - Fixed #2486: _GUICtrlRichEdit_GetFont() bad multi Font return. Solved also #2485. - Fixed #2492: _GUIToolbar_... doc example. - Fixed #2493: _GUIToolbar_Get/SetMetrics() examples. - Fixed #2494: _GUIToolbar_Get/SetHotItems() examples. Click here to download this file3 points -
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
-
This is a question which gets asked quite a bit >> How to add my program to the Startup Folder? Or How can I make my program run when the PC starts? So for those who want to call a simple Function e.g. _StartupFolder_Install() this UDF is for you. UDF: #include-once ; #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7 ; #INDEX# ======================================================================================================================= ; Title .........: _Startup ; AutoIt Version : v3.3.10.0 or higher ; Language ......: English ; Description ...: Create startup entries in the startup folder or registry. The registry entries can be Run all the time (Run registry entry) or only once (RunOnce registry entry.) ; Note ..........: ; Author(s) .....: guinness ; Remarks .......: Special thanks to KaFu for EnumRegKeys2Array() which I used as inspiration for enumerating the Registry Keys. ; =============================================================================================================================== ; #INCLUDES# ==================================================================================================================== #include <StringConstants.au3> ; #GLOBAL VARIABLES# ============================================================================================================ Global Enum $STARTUP_RUN = 0, $STARTUP_RUNONCE, $STARTUP_RUNONCEEX ; #CURRENT# ===================================================================================================================== ; _StartupFolder_Exists: Checks if an entry exits in the 'All Users/Current Users' startup folder. ; _StartupFolder_Install: Creates an entry in the 'All Users/Current Users' startup folder. ; _StartupFolder_Uninstall: Deletes an entry in the 'All Users/Current Users' startup folder. ; _StartupRegistry_Exists: Checks if an entry exits in the 'All Users/Current Users' registry. ; _StartupRegistry_Install: Creates an entry in the 'All Users/Current Users' registry. ; _StartupRegistry_Uninstall: Deletes the entry in the 'All Users/Current Users' registry. ; =============================================================================================================================== ; #INTERNAL_USE_ONLY#============================================================================================================ ; See below. ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name ..........: _StartupFolder_Exists ; Description ...: Checks if an entry exits in the 'All Users/Current Users' startup folder. ; Syntax ........: _StartupFolder_Exists([$sName = @ScriptName[, $bAllUsers = False]]) ; Parameters ....: $sName - [optional] Name of the program. Default is @ScriptName. ; $bAllUsers - [optional] Add to Current Users (False) or All Users (True) Default is False. ; Return values .: Success - True ; Failure - False ; Author ........: guinness ; Example .......: Yes ; =============================================================================================================================== Func _StartupFolder_Exists($sName = @ScriptName, $bAllUsers = False) Local $sFilePath = Default __Startup_Format($sName, $sFilePath) Return FileExists(__StartupFolder_Location($bAllUsers) & '\' & $sName & '.lnk') EndFunc ;==>_StartupFolder_Exists ; #FUNCTION# ==================================================================================================================== ; Name ..........: _StartupFolder_Install ; Description ...: Creates an entry in the 'All Users/Current Users' startup folder. ; Syntax ........: _StartupFolder_Install([$sName = @ScriptName[, $sFilePath = @ScriptFullPath[, $sCommandline = ''[, ; $bAllUsers = False]]]]) ; Parameters ....: $sName - [optional] Name of the program. Default is @ScriptName. ; $sFilePath - [optional] Location of the program executable. Default is @ScriptFullPath. ; $sCommandline - [optional] Commandline arguments to be passed to the application. Default is ''. ; $bAllUsers - [optional] Add to Current Users (False) or All Users (True) Default is False. ; Return values .: Success - True ; Failure - False & sets @error to non-zero ; Author ........: guinness ; Example .......: Yes ; =============================================================================================================================== Func _StartupFolder_Install($sName = @ScriptName, $sFilePath = @ScriptFullPath, $sCommandline = '', $bAllUsers = False) Return __StartupFolder_Uninstall(True, $sName, $sFilePath, $sCommandline, $bAllUsers) EndFunc ;==>_StartupFolder_Install ; #FUNCTION# ==================================================================================================================== ; Name ..........: _StartupFolder_Uninstall ; Description ...: Deletes an entry in the 'All Users/Current Users' startup folder. ; Syntax ........: _StartupFolder_Uninstall([$sName = @ScriptName[, $sFilePath = @ScriptFullPath[, $bAllUsers = False]]]) ; Parameters ....: $sName - [optional] Name of the program. Default is @ScriptName. ; $sFilePath - [optional] Location of the program executable. Default is @ScriptFullPath. ; $bAllUsers - [optional] Was it added to Current Users (False) or All Users (True) Default is False. ; Return values .: Success - True ; Failure - False & sets @error to non-zero ; Author ........: guinness ; Example .......: Yes ; =============================================================================================================================== Func _StartupFolder_Uninstall($sName = @ScriptName, $sFilePath = @ScriptFullPath, $bAllUsers = False) Return __StartupFolder_Uninstall(False, $sName, $sFilePath, Default, $bAllUsers) EndFunc ;==>_StartupFolder_Uninstall ; #FUNCTION# ==================================================================================================================== ; Name ..........: _StartupRegistry_Exists ; Description ...:Checks if an entry exits in the 'All Users/Current Users' registry. ; Syntax ........: _StartupRegistry_Exists([$sName = @ScriptName[, $bAllUsers = False[, $iRunOnce = $STARTUP_RUN]]]) ; Parameters ....: $sName - [optional] Name of the program. Default is @ScriptName. ; $bAllUsers - [optional] Add to Current Users (False) or All Users (True) Default is False. ; $iRunOnce - [optional] Always run at system startup $STARTUP_RUN (0), run only once before explorer is started $STARTUP_RUNONCE (1) ; or run only once after explorer is started $STARTUP_RUNONCEEX (2). Default is $STARTUP_RUN (0). ; Return values .: Success - True ; Failure - False ; Author ........: guinness ; Example .......: Yes ; =============================================================================================================================== Func _StartupRegistry_Exists($sName = @ScriptName, $bAllUsers = False, $iRunOnce = $STARTUP_RUN) Local $sFilePath = Default __Startup_Format($sName, $sFilePath) RegRead(__StartupRegistry_Location($bAllUsers, $iRunOnce) & '\', $sName) Return @error = 0 EndFunc ;==>_StartupRegistry_Exists ; #FUNCTION# ==================================================================================================================== ; Name ..........: _StartupRegistry_Install ; Description ...: Creates an entry in the 'All Users/Current Users' registry. ; Syntax ........: _StartupRegistry_Install([$sName = @ScriptName[, $sFilePath = @ScriptFullPath[, $sCommandline = ''[, ; $bAllUsers = False[, $iRunOnce = $STARTUP_RUN]]]]]) ; Parameters ....: $sName - [optional] Name of the program. Default is @ScriptName. ; $sFilePath - [optional] Location of the program executable. Default is @ScriptFullPath. ; $sCommandline - [optional] Commandline arguments to be passed to the application. Default is ''. ; $bAllUsers - [optional] Add to Current Users (False) or All Users (True) Default is False. ; $iRunOnce - [optional] Always run at system startup $STARTUP_RUN (0), run only once before explorer is started $STARTUP_RUNONCE (1) ; or run only once after explorer is started $STARTUP_RUNONCEEX (2). Default is $STARTUP_RUN (0). ; Return values .: Success - True ; Failure - False & sets @error to non-zero ; Author ........: guinness ; Example .......: Yes ; =============================================================================================================================== Func _StartupRegistry_Install($sName = @ScriptName, $sFilePath = @ScriptFullPath, $sCommandline = '', $bAllUsers = False, $iRunOnce = $STARTUP_RUN) Return __StartupRegistry_Uninstall(True, $sName, $sFilePath, $sCommandline, $bAllUsers, $iRunOnce) EndFunc ;==>_StartupRegistry_Install ; #FUNCTION# ==================================================================================================================== ; Name ..........: _StartupRegistry_Uninstall ; Description ...: Deletes the entry in the 'All Users/Current Users' registry. ; Syntax ........: _StartupRegistry_Uninstall([$sName = @ScriptName[, $sFilePath = @ScriptFullPath[, $bAllUsers = False[, ; $iRunOnce = Default]]]]) ; Parameters ....: $sName - [optional] Name of the program. Default is @ScriptName. ; $sFilePath - [optional] Location of the program executable. Default is @ScriptFullPath. ; $bAllUsers - [optional] Was it added to the current users (0) or all users (1). Default is 0. ; $iRunOnce - [optional] Was it run at system startup $STARTUP_RUN (0), run only once before explorer is started $STARTUP_RUNONCE (1) ; or run only once after explorer is started $STARTUP_RUNONCEEX (2). Default is $STARTUP_RUN (0). ; Return values .: Success - True ; Failure - False & sets @error to non-zero ; Author ........: guinness ; Example .......: Yes ; =============================================================================================================================== Func _StartupRegistry_Uninstall($sName = @ScriptName, $sFilePath = @ScriptFullPath, $bAllUsers = False, $iRunOnce = $STARTUP_RUN) Return __StartupRegistry_Uninstall(False, $sName, $sFilePath, Default, $bAllUsers, $iRunOnce) EndFunc ;==>_StartupRegistry_Uninstall ; #INTERNAL_USE_ONLY#============================================================================================================ Func __Startup_Format(ByRef $sName, ByRef $sFilePath) If $sFilePath = Default Then $sFilePath = @ScriptFullPath EndIf If $sName = Default Then $sName = @ScriptName EndIf $sName = StringRegExpReplace($sName, '\.[^.\\/]*$', '') ; Remove extension. Return Not (StringStripWS($sName, $STR_STRIPALL) == '') And FileExists($sFilePath) EndFunc ;==>__Startup_Format Func __StartupFolder_Location($bAllUsers) Return $bAllUsers ? @StartupCommonDir : @StartupDir EndFunc ;==>__StartupFolder_Location Func __StartupFolder_Uninstall($bIsInstall, $sName, $sFilePath, $sCommandline, $bAllUsers) If Not __Startup_Format($sName, $sFilePath) Then Return SetError(1, 0, False) ; $STARTUP_ERROR_EXISTS EndIf If $bAllUsers = Default Then $bAllUsers = False EndIf If $sCommandline = Default Then $sCommandline = '' EndIf Local Const $sStartup = __StartupFolder_Location($bAllUsers) Local Const $hSearch = FileFindFirstFile($sStartup & '\' & '*.lnk') Local $vReturn = 0 If $hSearch > -1 Then Local Const $iStringLen = StringLen($sName) Local $aFileGetShortcut = 0, _ $sFileName = '' While 1 $sFileName = FileFindNextFile($hSearch) If @error Then ExitLoop EndIf If StringLeft($sFileName, $iStringLen) = $sName Then $aFileGetShortcut = FileGetShortcut($sStartup & '\' & $sFileName) If @error Then ContinueLoop EndIf If $aFileGetShortcut[0] = $sFilePath Then $vReturn += FileDelete($sStartup & '\' & $sFileName) EndIf EndIf WEnd FileClose($hSearch) ElseIf Not $bIsInstall Then Return SetError(2, 0, False) ; $STARTUP_ERROR_EMPTY EndIf If $bIsInstall Then $vReturn = FileCreateShortcut($sFilePath, $sStartup & '\' & $sName & '.lnk', $sStartup, $sCommandline) > 0 Else $vReturn = $vReturn > 0 EndIf Return $vReturn EndFunc ;==>__StartupFolder_Uninstall Func __StartupRegistry_Location($bAllUsers, $iRunOnce) If $iRunOnce = Default Then $iRunOnce = $STARTUP_RUN EndIf Local $sRunOnce = '' Switch $iRunOnce Case $STARTUP_RUNONCE $sRunOnce = 'Once' Case $STARTUP_RUNONCEEX $sRunOnce = 'OnceEx' Case Else $sRunOnce = '' EndSwitch Return ($bAllUsers ? 'HKEY_LOCAL_MACHINE' : 'HKEY_CURRENT_USER') & _ ((@OSArch = 'X64') ? '64' : '') & '\SOFTWARE\Microsoft\Windows\CurrentVersion\Run' & $sRunOnce EndFunc ;==>__StartupRegistry_Location Func __StartupRegistry_Uninstall($bIsInstall, $sName, $sFilePath, $sCommandline, $bAllUsers, $iRunOnce) If Not __Startup_Format($sName, $sFilePath) Then Return SetError(1, 0, False) ; $STARTUP_ERROR_EXISTS EndIf If $bAllUsers = Default Then $bAllUsers = False EndIf If $sCommandline = Default Then $sCommandline = '' EndIf Local Const $sRegistryKey = __StartupRegistry_Location($bAllUsers, $iRunOnce) Local $iInstance = 1, _ $sRegistryName = '', _ $vReturn = 0 While 1 $sRegistryName = RegEnumVal($sRegistryKey & '\', $iInstance) If @error Then ExitLoop EndIf If ($sRegistryName = $sName) And StringInStr(RegRead($sRegistryKey & '\', $sRegistryName), $sFilePath, $STR_NOCASESENSEBASIC) Then $vReturn += RegDelete($sRegistryKey & '\', $sName) EndIf $iInstance += 1 WEnd If $bIsInstall Then $vReturn = RegWrite($sRegistryKey & '\', $sName, 'REG_SZ', $sFilePath & ' ' & $sCommandline) > 0 Else $vReturn = $vReturn > 0 EndIf Return $vReturn EndFunc ;==>__StartupRegistry_UninstallExample 1: #include '_Startup.au3' Example() Func Example() _StartupFolder_Install() ; Add the running EXE to the Current Users startup folder. ShellExecute(@StartupDir & '\') Sleep(5000) _StartupFolder_Uninstall() ; Remove the running EXE from the Current Users startup folder. EndFunc ;==>ExampleExample 2: #include '_Startup.au3' Example() Func Example() _StartupRegistry_Install() ; Add the running EXE to the Current Users Run registry key. Sleep(5000) _StartupRegistry_Uninstall() ; Remove the running EXE from the Current Users Run registry key. EndFunc ;==>ExampleAll of the above has been included in a ZIP file. Startup.zipPrevious: 1447+ downloads.1 point
-
Well I do this in SciTE Jump by parsing the script (+ includes) of what Global variables are used and then working from there. It's the part when I create a text file of functions used etc... Also about your idea, it's good, but by coding standards variables should be declared in their lowest scope. So declaring all variables at the start of the function is considered bad. ; Bad. Func Example() Local $iVar = 0, $sSomeVar = '', $vVar = -1 ... Do $iVar += 1 Until $iVar = 10 ; This will return False as $iVar will be positive and thus declaring $sSomeVar or $vVar was a bad choice. If $iVar Then Return False ... $vVar = 99 $sSomeVar= Chr(Random(65, 127, 1)) EndFunc ; Good. Func Example() Local $iVar = 0 ... Do $iVar += 1 Until $iVar = 10 ; This will return False as $iVar will be positive and thus no need to declare $sSomeVar or $vVar. If $iVar Then Return False Local $sSomeVar = '', $vVar = -1 ... $vVar = 99 $sSomeVar= Chr(Random(65, 127, 1)) EndFunc1 point
-
Help with UpDown Ctrl
JohnnyVolcom5 reacted to Melba23 for a topic
JohnnyVolcom, Easier than I remembered: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <StaticConstants.au3> #include <EditConstants.au3> $hGUI = GUICreate("Test", 500, 500) GUISetBkColor(0xC4C4C4) $cDummy_Input = GUICtrlCreateLabel("410.0 ", 40, 10, 50, 20, BitOr($SS_RIGHT, $SS_CENTERIMAGE)) GUICtrlSetBkColor($cDummy_Input, 0xFFFFFF) $MaxLS = GUICtrlCreateInput("410", 90, 10, 20, 20) $Level = GUICtrlCreateUpdown($MaxLS) GUICtrlSetLimit($Level, 510, 200) GUISetState() GUIRegisterMsg($WM_COMMAND, "_WM_COMMAND") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $lParam ; If it was an update message from the input If BitShift($wParam, 16) = $EN_CHANGE Then Switch BitAND($wParam, 0xFFFF) Case $MaxLS ; Set the label to the new total GUICtrlSetData($cDummy_Input, GUICtrlRead($MaxLS) & ".0 ") EndSwitch EndIf EndFunc ;==>_WM_COMMAND I hope everything is clear, but please ask if not. M23 Edit: mikell, Never a problem to offer a solution - and yours is much simpler.1 point -
Help with UpDown Ctrl
JohnnyVolcom5 reacted to mikell for a topic
Sorry Melba for interfering $Gui = GUICreate ("",150,150) $MaxLS = GUICtrlCreateInput("",110,10,1,20) $Level = GUICtrlCreateUpdown ($MaxLS) GUICtrlSetLimit($Level,100,-210) $display = GUICtrlCreateInput ("410.0",40,10,55,20) GuiSetState() while 1 $msg = GuiGetMsg() If $msg = -3 Then Exit If $msg = $Level Then GuiCtrlSetData($display, StringFormat("%.01f", GuiCtrlRead($MaxLS)+410)) wend1 point -
Help with UpDown Ctrl
JohnnyVolcom5 reacted to Melba23 for a topic
JohnnyVolcom, Then we need to do the trickery! Give me a while to knock up an example for you - it is not an easy thing to do. M231 point -
remin, I do not use that environment variable in my SciTE setup so I cannot comment further. And see Jos' comment here - I am afraid you cannot expect full support from us if you start changing the installation parameters. M231 point
-
How to read files txt on the server
minhlaobao reacted to mrflibblehat for a topic
Look at inetread $vRead = BinaryToString(InetRead("http://abcd.com/notice.txt")) ConsoleWrite($vRead)1 point -
First of all within Windows UI Automation documentation is stated that those patterns are available for windows explorer Grid Used for controls that support grid functionality such as sizing and moving to a specified cell, without header information. The “large icon view” in Windows® Explorer is an example of a control that follows the Grid control pattern. GridItem Used for controls within grids. For example, each cell in Explorer’s “details view” could follow the GridItem pattern. So steps are 1. Get a UI Element object 2. Check the Is.....Pattern property Seems to be false for your objects so no detailed pattern available that abstracts rows/cells (weird anyway as it seems just to be a WPF control) UIA_IsGridItemPatternAvailablePropertyId :=False UIA_IsGridPatternAvailablePropertyId :=False So to determine the way to handle your grid I suggest do do the following 1. Get your main UI element that contains the grid 2. _UIA_DumpThemAll(<UI Reference>, $treescope_subtree) Then you can see the logic of the whole tree and build your own logic to iterate over the row's see example 1 on the treewalkers on how to iterate thru the three to work with /get the gridpattern replace the _UIA_getPattern with this function (will be put later in a new version of UIAWrapper UDF) func _UIA_getPattern($obj,$patternID) local $patternArray[21][3]=[ _ [$UIA_ValuePatternId , $sIID_IUIAutomationValuePattern , $dtagIUIAutomationValuePattern], _ [$UIA_InvokePatternId , $sIID_IUIAutomationInvokePattern , $dtagIUIAutomationInvokePattern], _ [$UIA_SelectionPatternId, $sIID_IUIAutomationSelectionPattern, $dtagIUIAutomationSelectionPattern], _ [$UIA_LegacyIAccessiblePatternId, $sIID_IUIAutomationLegacyIAccessiblePattern,$dtagIUIAutomationLegacyIAccessiblePattern], _ [$UIA_SelectionItemPatternId, $sIID_IUIAutomationSelectionItemPattern, $dtagIUIAutomationSelectionItemPattern], _ [$UIA_RangeValuePatternId, $sIID_IUIAutomationRangeValuePattern, $dtagIUIAutomationRangeValuePattern], _ [$UIA_ScrollPatternId, $sIID_IUIAutomationScrollPattern, $dtagIUIAutomationScrollPattern], _ [$UIA_GridPatternId, $sIID_IUIAutomationGridPattern, $dtagIUIAutomationGridPattern], _ [$UIA_GridItemPatternId, $sIID_IUIAutomationGridItemPattern, $dtagIUIAutomationGridItemPattern], _ [$UIA_MultipleViewPatternId, $sIID_IUIAutomationMultipleViewPattern, $dtagIUIAutomationMultipleViewPattern], _ [$UIA_WindowPatternId, $sIID_IUIAutomationWindowPattern, $dtagIUIAutomationWindowPattern], _ [$UIA_DockPatternId, $sIID_IUIAutomationDockPattern, $dtagIUIAutomationDockPattern], _ [$UIA_TablePatternId, $sIID_IUIAutomationTablePattern, $dtagIUIAutomationTablePattern], _ [$UIA_TextPatternId, $sIID_IUIAutomationTextPattern, $dtagIUIAutomationTextPattern], _ [$UIA_TogglePatternId, $sIID_IUIAutomationTogglePattern, $dtagIUIAutomationTogglePattern], _ [$UIA_TransformPatternId, $sIID_IUIAutomationTransformPattern, $dtagIUIAutomationTransformPattern], _ [$UIA_ScrollItemPatternId, $sIID_IUIAutomationScrollItemPattern, $dtagIUIAutomationScrollItemPattern], _ [$UIA_ItemContainerPatternId, $sIID_IUIAutomationItemContainerPattern, $dtagIUIAutomationItemContainerPattern], _ [$UIA_VirtualizedItemPatternId, $sIID_IUIAutomationVirtualizedItemPattern, $dtagIUIAutomationVirtualizedItemPattern], _ [$UIA_SynchronizedInputPatternId, $sIID_IUIAutomationSynchronizedInputPattern,$dtagIUIAutomationSynchronizedInputPattern], _ [$UIA_ExpandCollapsePatternId, $sIID_IUIAutomationExpandCollapsePattern, $dtagIUIAutomationExpandCollapsePattern] _ ] local $pPattern local $sIID_Pattern local $sdTagPattern local $i for $i=0 to ubound($patternArray)-1 if $patternArray[$i][0]=$patternId Then ;~ consolewrite("Pattern identified " & @crlf) $sIID_Pattern=$patternArray[$i][1] $sdTagPattern=$patternArray[$i][2] EndIf next ;~ consolewrite($patternid & $sIID_Pattern & $sdTagPattern & @CRLF) $obj.getCurrentPattern($PatternId, $pPattern) $oPattern=objCreateInterface($pPattern, $sIID_Pattern, $sdtagPattern) if isobj($oPattern) Then ;~ consolewrite("UIA found the pattern" & @CRLF) return $oPattern Else _UIA_Debug("UIA WARNING ** NOT ** found the pattern" & @CRLF) endif EndFunc1 point
-
Where is password option to encrypt my script?
minhlaobao reacted to Shiblee for a topic
Hi, I can remember that there was an option to set password (while compiling to exe from au3) to encrypt my script. I've upgraded autoit and this time I don't see anything like that. Am I missing anything? Please let me know how I can set password so that I can encrypt my script. There goes my screen: Thanks. Shiblee1 point