BrewManNH Posted August 1, 2012 Share Posted August 1, 2012 Example scripts for most of the _Excelxx functions demonstrate bad programming techniques. The example scripts have include lines in the middle of the scripts and duplicating the include(s) used from the first example in that script through all of the rest of the examples. Knowing that the includes used should have the #include-once directive in them, which will prevent them being added more than once, shouldn't be an excuse for writing/delivering such bad programming techniques to a potential new or inexperienced user in the help files. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
guinness Posted August 1, 2012 Author Share Posted August 1, 2012 I'm glad you brought this up BrewManNH as I was about to post how to contribute to the help file. If anyone feels like contributing or believes an example could be improved, then simple use the examples provided in C:Program FilesAutoItExamples and update accordingly. From there upload here and I will take a look at whether it/they should be included. Thanks. 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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
BrewManNH Posted August 2, 2012 Share Posted August 2, 2012 I've updated some of the examples for the _Excel functions from the help files. I've corrected a few errors in the scripts, modified how some were written, made the msgbox displayed for the examples more informative, and removed the extra #include lines that were in them. Help_Excel_Examples_Rewrites.zip If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
BrewManNH Posted August 2, 2012 Share Posted August 2, 2012 Also, in an unrelated issue, in the help file for _GUICtrlRichEditCreate, there's no mention of 2 of the error values returned if there's a problem. The error values are 1 - Invalid Window handle for _GUICtrlRichEdit_Create 1st parameter 2 - 2nd parameter not a string for _GUICtrlRichEdit_Create If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Valik Posted August 2, 2012 Share Posted August 2, 2012 Also, in an unrelated issue, in the help file for _GUICtrlRichEditCreate, there's no mention of 2 of the error values returned if there's a problem.The error values are 1 - Invalid Window handle for _GUICtrlRichEdit_Create 1st parameter 2 - 2nd parameter not a string for _GUICtrlRichEdit_CreateThis is not necessarily a problem. As long as it's documented that @error is set to non-zero, the actual error is probably irrelevant. Link to comment Share on other sites More sharing options...
trancexx Posted August 2, 2012 Share Posted August 2, 2012 (edited) I don't understant fear people with svn acces have, it's like you are incompotent. Use your damn access! Fix things yourself, guinness can't do everything alone. Take responibility. For example, some of the UDFs are in terrible shape and trac is full of bug UDF related reports. You don't expect devs to fix them, right? Edited August 2, 2012 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
BrewManNH Posted August 2, 2012 Share Posted August 2, 2012 I don't have svn access, or if I do, have no idea how to access it. It wasn't in the MVP user's manual. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
trancexx Posted August 2, 2012 Share Posted August 2, 2012 I don't have svn access, or if I do, have no idea how to access it. It wasn't in the MVP user's manual. Do you want it? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
BrewManNH Posted August 2, 2012 Share Posted August 2, 2012 Do you want it?I would not complain if it was given to me. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Valik Posted August 2, 2012 Share Posted August 2, 2012 Will you use it? I've given access to numerous people and only a couple have committed anything. If you want access PM and I will give you further instructions. Link to comment Share on other sites More sharing options...
water Posted August 2, 2012 Share Posted August 2, 2012 I've given access to numerous people and only a couple have committed anything.That's the next thing I'm going to do - activate my svn access - as soon as I get to install a copy of Windows on my Ubuntu machine. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
AZJIO Posted August 2, 2012 Share Posted August 2, 2012 Why Online Help is not updated on the server? I can convert, if needed. My other projects or all Link to comment Share on other sites More sharing options...
Valik Posted August 2, 2012 Share Posted August 2, 2012 It is updated. We do not upload beta documentation. Link to comment Share on other sites More sharing options...
AZJIO Posted August 3, 2012 Share Posted August 3, 2012 GUICtrlCreateListView exStyle | default (-1) : $LVS_EX_FULLROWSELECT, $WS_EX_CLIENTEDGE This will help to restore the default styles if you are using extended styles. My other projects or all Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted August 3, 2012 Share Posted August 3, 2012 Fix things yourself, guinness can't do everything alone.Agreed, but I don't particularly like the way you are saying that. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
guinness Posted August 3, 2012 Author Share Posted August 3, 2012 Take responibility. For example, some of the UDFs are in terrible shape and trac is full of bug UDF related reports. You don't expect devs to fix them, right?That confirms one question I had about changing some of the UDFs I've seen. Thanks trancexx.Cheers BrewManNH, my post wasn't directly aimed at you per say but I will commit your changes today as well as fixing the outstanding issues in this thread. 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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
trancexx Posted August 3, 2012 Share Posted August 3, 2012 Agreed, but I don't particularly like the way you are saying that.Ah yes. I didn't particuraly like what you did also. Those pics were not to be shared. What, you needed me to explicitly say that?So anyway, excuse me if I don't care about your feelings. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
guinness Posted August 3, 2012 Author Share Posted August 3, 2012 FAQ section for the techinical limits of AutoIt3 Done. So yeah, why exactly is -3 hard coded in that example? We created symbolic constants so magic numbers wouldn't be used in scripts... and then our own examples use the magic numbers? Fail. Fixed all occurrences of the -3 magic number. AutoItExamplesGUIAdvancedtreeview.au3 Case $msg = -3 Or $msg = -1 Or $msg = $cancelbutton Re-wrote the example! AutoItExamplesGUIAdvanceddice.au3 $die = GUICtrlCreateLabel("", 185, 25, 70, 20, 0x1000) Re-wrote the example! AutoItExamplesGUIAdvancedencrypt.au3 $InputPass = GUICtrlCreateInput('', 5, 360, 100, 20, 0x21) ; Creates the password box with blured/centered input ;~~ $InputLevel = GUICtrlCreateInput(1, 110, 360, 50, 20, 0x2001) Fixed. CLSID List Network Computers "::{1f4de370-d627-11d1-ba4f-00a0c91eedba}" >>> Computer search results folder List taken from Registry Guide for Windows at WinGuides Network - the link directs to a page that does not contain a list of. Whether the reference is necessary? Information on the Internet a lot. http://www.pctools.com/guides/registry/detail/61/ Example: FileSelectFolder ("Choose a folder.", "::{00000000-1080-F9E5-6311-4162E05A6BEE}", 1) This folder is not in the list Fixed. Example OSLangCodes.htm #include <Array.au3> $sText = FileRead(@ScriptDir&'Culture.xml') ; http://cartotheque.googlecode.com/svn-history/r29/trunk/Schemas/Dic/Culture.xml $aText=StringRegExp($sText, '(?s)<Language Name(.+?<Code Source="NLS" Encoding="Hex">[[:xdigit:]]+?</Code>)', 3) $err = '' $kol = 0 $kolerr = 0 $htm = '' Global $A4D[300][4] For $i = 0 To UBound($aText)-1 $tmp=StringRegExp($aText[$i], '(?s)<Label xml:lang="en">([^rn]+?))</Label>.+?<Code Source="IETF">(.+?)</Code>.+?<Code Source="NLS" Encoding="Hex">([[:xdigit:]]+?)</Code>', 3) If @error And Not UBound($tmp)=3 Then $err &= $aText[$i] &@CRLF &@CRLF&@CRLF &@CRLF&@CRLF &@CRLF $kolerr +=1 Else $kol +=1 $A4D[$kol][0] = StringLower($tmp[2]) $A4D[$kol][1] = Dec($tmp[2]) $A4D[$kol][2] = $tmp[1] $A4D[$kol][3] = $tmp[0] EndIf Next If $kolerr Then MsgBox(0, $kolerr, $err) ReDim $A4D[$kol+1][4] $A4D[0][0] = $kol _ArraySort($A4D, 0, 1) _ArrayDisplay($A4D, 'Array') $htm = '' For $i = 1 To $A4D[0][0] $htm &= '<tr><td>'&$A4D[$i][0]&'</td><td>'&$A4D[$i][1]&'</td><td>'&$A4D[$i][2]&'</td><td>'&$A4D[$i][3]&'</td><td>' &@CRLF Next ClipPut($htm) Example expandcollapse popupMsgBox(0, "Your OS Language:", _Language()) Func _Language() Switch @OSLang Case "0413", "0813" Return "Dutch" Case "0409", "0809", "0c09", "1009", "1409", "1809", "1c09", "2009", "2409", "2809", "2c09", "3009", "3409" Return "English" Case "040c", "080c", "0c0c", "100c", "140c", "180c" Return "French" Case "0407", "0807", "0c07", "1007", "1407" Return "German" Case "0410", "0810" Return "Italian" Case "0414", "0814" Return "Norwegian" Case "0415" Return "Polish" Case "0416", "0816" Return "Portuguese" Case "040a", "080a", "0c0a", "100a", "140a", "180a", "1c0a", "200a", "240a", "280a", "2c0a", "300a", "340a", "380a", "3c0a", "400a", "440a", "480a", "4c0a", "500a" Return "Spanish" Case "041d", "081d" Return "Swedish" Case Else Return "Other (can't determine with @OSLang directly)" EndSwitch EndFuncThanks for the code to parse the Culture.xml file and your idea of improving the @OSLang section in general. Also you were missing a closing <tr> tag. See the amendment. $htm &= '<tr>' & @CRLF & '<td>' & $A4D[$i][0] & '</td>' & @CRLF & '<td>' & $A4D[$i][1] & '</td>' & @CRLF & '<td>' & $A4D[$i][2] & '</td>' & @CRLF & '<td>' & $A4D[$i][3] & '</td>' & @CRLF & '</tr>' & @CRLF 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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
guinness Posted August 3, 2012 Author Share Posted August 3, 2012 I've updated some of the examples for the _Excel functions from the help files. I've corrected a few errors in the scripts, modified how some were written, made the msgbox displayed for the examples more informative, and removed the extra #include lines that were in them. Help_Excel_Examples_Rewrites.zip Just one point to make, I made the mistake once of changing MsgBox(4096, to MsgBox(0, until trancexx pointed out that a system modal dialogue box is a preferred choice due to focus (if I remember correctly.) So I reverted back to MsgBox(4096, where applicable. Thanks for helping out. 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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
guinness Posted August 3, 2012 Author Share Posted August 3, 2012 _GUICtrlStatusBar_SetText($hWnd, $sText = "", $iPart = 0, $iUFlag = 0) _GUICtrlStatusBar_SetSimple($hWnd, $fSimple = True) $hWnd[, $sText = ""[, $iPart = 0[, $iUFlag = 0]]]Done. _WinAPI_CreateSolidBrush _WinAPI_GetWindowDC _WinAPI_FrameRect Example #include <GuiConstantsEx.au3> #include <WinAPI.au3> Opt('MustDeclareVars', 1) _Main() Func _Main() Local $hGUI, $hBrush, $hDC Local $hBrush, $hDC, $hGUI, $ptrRect, $tRect $hGUI = GUICreate("WinAPI", 400, 300) $hDC = _WinAPI_GetWindowDC($hGUI) GUISetState() $hBrush = _WinAPI_CreateSolidBrush(0x0000FF) $tRect = DllStructCreate($tagRECT) DllStructSetData($tRect, "Left", 20) DllStructSetData($tRect, "Top", 50) DllStructSetData($tRect, "Right", 200) DllStructSetData($tRect, "Bottom", 200) $ptrRect = DllStructGetPtr($tRect) _WinAPI_FrameRect($hDC, $ptrRect, $hBrush) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE _WinAPI_DeleteObject($hBrush) _WinAPI_ReleaseDC($hGUI, $hDC) EndFuncI will consider though the example will need to be tidied up. _WinAPI_MAKELANGID Example #include <Constants.au3> #include <WinAPI.au3> $LangID = _WinAPI_MAKELANGID($LANG_ENGLISH, $SUBLANG_DEFAULT) MsgBox(4096, '', Hex(Int($LangID), 4) & @LF & $LangID)I will consider though the example will need to be tidied up. _WinAPI_PtInRect Example #include <WinAPI.au3> $tRect = DllStructCreate($tagRECT) DllStructSetData($tRect, "Left", 20) DllStructSetData($tRect, "Top", 50) DllStructSetData($tRect, "Right", 200) DllStructSetData($tRect, "Bottom", 200) $tPoint = DllStructCreate($tagPOINT) DllStructSetData($tPoint, "X", 120) DllStructSetData($tPoint, "Y", 120) MsgBox(4096, 'PtInRect', _WinAPI_PtInRect($tRect, $tPoint))I will consider though the example will need to be tidied up. _WinAPI_FindExecutable Example: @ScriptName -> @ScriptFullPathDone. _WinAPI_IsWindow Success: Handle is a window Failure: Handle is not a window And where is the "True", "False"?Done. Also fixed an error in _WinAPI_IsWindowVisible too. _WinAPI_GetCurrentProcess pseudo Sorry? 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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Recommended Posts