Jump to content

Recommended Posts

Posted

See AutoIt Const as unmutable variables (once initialized), at least for some definition of "unmutable".

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

  • 2 weeks later...
Posted (edited)

_GUICtrlListView_HideColumn description in the Help file on page html/libfunctions/_GUICtrlListView_HideColumn, needs some TLC.  It lack the explanations common on similar pages such as "0 based column array of the LV" etc...:)

Perhaps add something like this.

Define the column as usual, then hide.

The first column is often used with extended style options, such as tick boxes, and when hidden, these will be hidden as well.

Edited by Skysnake

Skysnake

Why is the snake in the sky?

Posted

_WinAPI_DrawBitmap

This page in the Help file 

::/html/libfunctions/_WinAPI_DrawBitMap.

 

 

$iX

Specifies the logical x-coordinate of the upper-left corner of the bitmap.
$iY Specifies the logical y-coordinate of the upper-left corner of the bitmap.

 

Can BOTH variables point to the same position?  Perhaps a copy & paste fiend has been on the lose? :) 

Skysnake

Why is the snake in the sky?

  • Moderators
Posted

Skysnake,

Quote

Can BOTH variables point to the same position?

Of course - the point has 2 coordinates (x & y) and so needs the 2 parameters to define it.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • 2 weeks later...
Posted (edited)

in AutoIt Window Information Tool 

I see such a statement:

Quote
  • Color of the pixels underneath the mouse pointer
  • Details of the Control underneath the mouse pointer

What's mean "underneath" ?

 

 

EDIT:
also in Send description 

Quote

N.B. Windows does not allow the simulation of the "CTRL-ALT-DEL" combination!

What's mean "N.B."

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Posted

"underneath" thanks for clarification.

"Nota Bene" is also common in polish language (possible that the origin of the word is from the Latin, which is why in Europe is quite common) , but abbreviation N.B. is not.
I think this would be good if It was not used as an abbreviated form, but in the full verbal form.

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Posted
19 minutes ago, JohnOne said:

Unfortunately, most English speaking English and Americans would not have a clue what it meant.

certainly a Birmingham idiomatic, as Jon is the only designer of this tool ...

Posted (edited)

The GUISetAccelerators help file should include a note that if you set this to a ControlID that is inside a TabItem, then it will only be kicked off when the TabItem containing the Control is the active tab.

This had me stumped for a while today and I had to get around it by creating a dummy control outside the tab structure and point the Tab Item control ID and the Dummy Control to the same function.

example of the problem, if you switch to the No Button Tab, then hit Ctrl+y it will not kick off.  switch to the Yes button tab and hit Ctrl+y again and it works.

#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>

Example()

Func Example()
    GUICreate("Custom MsgBox", 225, 120)

    GUICtrlCreateLabel("Please select a button.", 10, 10, 205, 20)
    GUICtrlCreateTab(5, 30, 215, 85)

    GUICtrlCreateTabItem("Yes Button")
    Local $idYes = GUICtrlCreateButton("Yes", 10, 60, 65, 25)

    GUICtrlCreateTabItem("No Button")
    Local $idNo = GUICtrlCreateButton("No", 80, 60, 65, 25)

    GUICtrlCreateTabItem("Exit Button")
    Local $idExit = GUICtrlCreateButton("Exit", 150, 60, 65, 25)

    GUICtrlCreateTabItem("")

    ; Set GUIAccelerators for the button controlIDs, these being Ctrl + y and Ctrl + n
    Local $aAccelKeys[2][2] = [["^y", $idYes], ["^n", $idNo]]
    GUISetAccelerators($aAccelKeys)

    GUISetState(@SW_SHOW) ; Display the GUI.

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                MsgBox($MB_SYSTEMMODAL, "You selected", "Close")
                ExitLoop

            Case $idYes
                MsgBox($MB_SYSTEMMODAL, "You selected", "Yes") ; Displays if the button was selected or the hotkey combination Ctrl + y was pressed.

            Case $idNo
                MsgBox($MB_SYSTEMMODAL, "You selected", "No") ; Displays if the button was selected or the hotkey combination Ctrl + n was pressed.

            Case $idExit
                MsgBox($MB_SYSTEMMODAL, "You selected", "Exit")
                ExitLoop

        EndSwitch
    WEnd
    GUIDelete() ; Delete the GUI.
EndFunc   ;==>Example

 

Edited by BigDaddyO
  • 2 months later...
Posted

auJasperatically

To my amusement I found this still lurking in the online help...

https://www.autoitscript.com/autoit3/docs/intro/lang_variables.htm

 

Skysnake

Why is the snake in the sky?

Posted
2 hours ago, Skysnake said:

auJasperatically

To my amusement I found this still lurking in the online help...

https://www.autoitscript.com/autoit3/docs/intro/lang_variables.htm

 

Well it was only fixed a couple months ago in October. So wait until the next release.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

  • 4 weeks later...
Posted

InputBox

This page in the Help file: /html/functions/InputBox.htm

Contains this in the discussion:

If your script is going to use an inputbox you must include the pragma directive "#pragma compile(inputboxres, true)"

BUT, the pragma page looks like this:

#pragma compile(Out, myProg.exe)
; Uncomment to use the following icon. Make sure the file path is correct and matches the installation of your AutoIt install path.
; #pragma compile(Icon, C:\Program Files\AutoIt3\Icons\au3.ico)
#pragma compile(ExecLevel, highestavailable)

While my AutoIt header looks like this:

#Region **** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=script.ico

Note that the Help File InputBox example does not contain a #pragma statement!

1. Is the pragma reference in InputBox Help File page still relevant?

2. (a) Should the reference to pragma be dropped from the InputBox Help File page discussion; or

(b) should a pragma line be added to the example?

 

Skysnake

Why is the snake in the sky?

  • 4 weeks later...
Posted

Hi.

In the help file, in the RegEnumVal page, about the type of the value, it say:

Success: the requested registry value. @extended is set to the type of the value

So I was thinking, after much searching, to have an example more along the lines of:

RegEnumKey_Example("\Microsoft\Windows")
Func RegEnumKey_Example($sThis)
    Local $aRegValueType = ["REG_NONE", "REG_SZ", "REG_EXPAND_SZ", "REG_BINARY", "REG_DWORD_LITTLE_ENDIAN", _
            "REG_DWORD_BIG_ENDIAN", "REG_LINK", "REG_MULTI_SZ", "REG_RESOURCE_LIST", _
            "REG_FULL_RESOURCE_DESCRIPTOR", "REG_RESOURCE_REQUIREMENTS_LIST", "REG_QWORD_LITTLE_ENDIAN"]

    ; X64 running support
    Local $n, $i, $sWow64 = ""
    If @AutoItX64 Then $sWow64 = "\Wow6432Node"
    ConsoleWrite("$sWow64 = " & $sWow64 & @CRLF)
    Local $sVar = ""
    Local $sSubKey = ""
    For $n = 1 To 100
        $sSubKey = RegEnumKey("HKCU\Software" & $sWow64 & $sThis, $n)
        If @error Then ExitLoop
        ConsoleWrite("--- SubKey #" & $n & " for >" & "HKCU\Software" & $sWow64 & $sThis & "< is >" & $sSubKey & "<" & @CRLF)
        For $i = 1 To 100
            $sVar = RegEnumVal("HKCU\Software" & $sWow64 & $sThis & "\" & $sSubKey, $i)
            If @error <> 0 Then ExitLoop
            ConsoleWrite("Value Name  #" & $i & " >" & $sVar & "< - Value Type >" & $aRegValueType[@extended] & "<" & @CRLF)
        Next
    Next
EndFunc   ;==>RegEnumKey_Example

 to have a better idea of what is in @extended

Thanks.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted (edited)

That example looks too complicated to me. It should be made simpler. Also we try not to use ConsoleWrite in examples, as not everyone is using the likes of SciTE to run the examples. Thanks for suggesting though.

Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Posted (edited)
11 hours ago, guinness said:

example looks too complicated to me

I meant an example more along the lines. So I guess the following could be added as written to the help file: 

#include <MsgBoxConstants.au3>

example()

Func example()

    Local $i, $sVar, $sWow64 = ""
    Local $aRegValueType[12] = ["REG_NONE", "REG_SZ", "REG_EXPAND_SZ", "REG_BINARY", _
            "REG_DWORD_LITTLE_ENDIAN", "REG_DWORD_BIG_ENDIAN", "REG_LINK", _
            "REG_MULTI_SZ", "REG_RESOURCE_LIST", "REG_FULL_RESOURCE_DESCRIPTOR", _
            "REG_RESOURCE_REQUIREMENTS_LIST", "REG_QWORD_LITTLE_ENDIAN"]

    ; X64 running support
    If @AutoItX64 Then $sWow64 = "\Wow6432Node"

    For $i = 1 To 100
        $sVar = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE" & $sWow64 & "\AutoIt v3\AutoIt", $i)
        If @error <> 0 Then ExitLoop
        MsgBox($MB_SYSTEMMODAL, "RegEnumVal example", _
                "Instance # " & $i & " under AutoIt3 key." & @LF & _
                "Value Name: " & $sVar & @LF & _
                "Value Type: " & $aRegValueType[@extended])
    Next

EndFunc   ;==>example

Thanks

Edited by argumentum
prettify the example code

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted
59 minutes ago, argumentum said:

I meant an example more along the lines. So I guess the following could be added as written to the help file: 

#include <MsgBoxConstants.au3>

example()

Func example()

    Local $i, $sVar, $sWow64 = ""
    Local $aRegValueType[12] = ["REG_NONE", "REG_SZ", "REG_EXPAND_SZ", "REG_BINARY", _
            "REG_DWORD_LITTLE_ENDIAN", "REG_DWORD_BIG_ENDIAN", "REG_LINK", _
            "REG_MULTI_SZ", "REG_RESOURCE_LIST", "REG_FULL_RESOURCE_DESCRIPTOR", _
            "REG_RESOURCE_REQUIREMENTS_LIST", "REG_QWORD_LITTLE_ENDIAN"]

    ; X64 running support
    If @AutoItX64 Then $sWow64 = "\Wow6432Node"

    For $i = 1 To 100
        $sVar = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE" & $sWow64 & "\AutoIt v3\AutoIt", $i)
        If @error <> 0 Then ExitLoop
        MsgBox($MB_SYSTEMMODAL, "RegEnumVal example", _
                "Instance # " & $i & " under AutoIt3 key." & @LF & _
                "Value Name: " & $sVar & @LF & _
                "Value Type: " & $aRegValueType[@extended])
    Next

EndFunc   ;==>example

Thanks

If you want to stay with the previous example

RegEnumVal.au3

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...