AZJIO Posted July 13, 2013 Posted July 13, 2013 AZJIO, Would you mind checking if these are still relevant please in v3.3.9.7. Thanks Yes, some. But I don't like doing the job twice. My other projects or all
AZJIO Posted July 13, 2013 Posted July 13, 2013 but also mean longer processing time and larger helpfile I have 2 files are compiled 5 minutes. It is very little, if you update once a year. I would like to import a reference to examples. The increase in file no more than 10%. But the help file is very usability of My other projects or all
jchd Posted July 13, 2013 Posted July 13, 2013 As a sidenote about _SQLite_Exec: the current (undocumented) callback feature is a pain and causes a penalty to every user 99.99% of the time *_Exec or *_GetTable2d is invoked. I'm removing that dirty hack in favor of a more general separate function for using with callbacks exclusively. Don't hold you breath anyway. 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 hereRegExp tutorial: enough to get startedPCRE 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)
AZJIO Posted July 14, 2013 Posted July 14, 2013 (edited) but also mean longer processing time and larger helpfile If to check date of change of the file, at compilation only some files are processed. Â SoundPlay SoundPlay ( "filename" [, wait = 1] ) 0 = continue script while sound is playing (default) StringToBinary StringToBinary ( expression [, flag = 0] ) flag = 1 (default), binary data is ANSI Â syntax.7z - SYNTAX_3.3.9.7_En.txt +Â SYNTAX_3.3.8.1_Ru.txt (Compare) Â search: [, style [, exStyle ]] replacement: [, style = -1 [, exStyle = -1 ]] mask: GUICtrl*.txt GUICreate ( "title" [, width [, height [, left = -1 [, top = -1 [, style = -1 [, exStyle = -1 [, parent = 0 ]]]]]]] ) InputBox ( "title", "prompt" [, "default" [, "password char" [, width = -1 [, height = -1 [, left = Default [, top = Default [, timeout = 0 [, hwnd ]]]]]]]] ) GUICtrlCreateMenu ( "submenutext" [, menuID = -1 [, menuentry ]] ) GUICtrlCreateMenuItem ( "text", menuID = -1 [, menuentry = -1 [, menuradioitem = 0 ]] ) GUIGetMsg ( [ advanced = 0 ] ) GUICtrlRead ( controlID [, advanced = 0 ] ) GUICtrlSetLimit ( controlID, max [, min = 0 ] ) WinWait ( "title" [, "text" [, timeout = 0 ]] ) WinWaitActive ( "title" [, "text" [, timeout = 0 ]] ) WinWaitClose ( "title" [, "text" [, timeout = 0 ]] ) WinWaitNotActive ( "title" [, "text" [, timeout = 0 ]] ) Edited July 14, 2013 by AZJIO My other projects or all
Developers Jos Posted July 14, 2013 Developers Posted July 14, 2013 (edited) If to check date of change of the file, at compilation only some files are processed. This is already done in our buildscript. Not sure if the rest of you post is for me or just a dump of stuff that needs changing. In the latter case: Maybe you should make our lives easier by making the proposed changes to all these files and then generate a patch file so others can easily see all the changes you have made to files when applying this patch file. What do the others think of this? Jos Edited July 14, 2013 by Jos SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past.Â
AZJIO Posted July 14, 2013 Posted July 14, 2013 SetError return value [optional] Override the default return value and return this parameter. default = 0 MsgBox(4096, '', _FuncName0()) Func _FuncName0() Return ; $iReturn = 0 EndFunc default = 1 MsgBox(4096, '', _FuncName1()) Func _FuncName1() Return SetError(999) ; $iReturn = 1 EndFunc Test For $i = 1 To 7 $iReturn = _FuncName($i) MsgBox(4096, $i, '(' & @error & ', ' & @extended & ', ' & $iReturn & ')') Next Func _FuncName($i) Switch $i Case 1 Return SetError(999) ; $iReturn = 1 Case 2 Return SetError(999, 999) ; $iReturn = 1 Case 3 Return SetError(999, 999, 999) Case 4 SetError(999) ; $iReturn = 0 Return Case 5 SetError(999, 999) ; $iReturn = 0 Return Case 6 SetError(999, 999, 999) ; $iReturn = 0 Return Case Else Return ; $iReturn = 0 EndSwitch EndFunc ;==>_FuncName My other projects or all
guinness Posted July 14, 2013 Posted July 14, 2013 (edited) Maybe you should make our lives easier by making the proposed changes to all these files and then generate a patch file so others can easily see all the changes you have made to files when applying this patch file. What do the others think of this? Agreed! AZJIO would have to download the sources, create a local repository and work from there. It would make life easier instead of doing twice the work. Edited July 14, 2013 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 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
guinness Posted July 14, 2013 Posted July 14, 2013 SetErrorreturn value [optional] Override the default return value and return this parameter. default = 0MsgBox(4096, '', _FuncName0()) Func _FuncName0() Return ; $iReturn = 0 EndFuncdefault = 1MsgBox(4096, '', _FuncName1()) Func _FuncName1() Return SetError(999) ; $iReturn = 1 EndFuncTestFor $i = 1 To 7 $iReturn = _FuncName($i) MsgBox(4096, $i, '(' & @error & ', ' & @extended & ', ' & $iReturn & ')') Next Func _FuncName($i) Switch $i Case 1 Return SetError(999) ; $iReturn = 1 Case 2 Return SetError(999, 999) ; $iReturn = 1 Case 3 Return SetError(999, 999, 999) Case 4 SetError(999) ; $iReturn = 0 Return Case 5 SetError(999, 999) ; $iReturn = 0 Return Case 6 SetError(999, 999, 999) ; $iReturn = 0 Return Case Else Return ; $iReturn = 0 EndSwitch EndFunc ;==>_FuncNameYou're misunderstanding the sentence. It's the default return value of SetError not Return. See...#include <Constants.au3> MsgBox($MB_SYSTEMMODAL, '', SetError(100)) MsgBox($MB_SYSTEMMODAL, '', SetError(100, 0, 1000))I changed it to this...By default SetError will return 1 if the optional parameter "return value" has not been set. If it is, then SetError will return this value. 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
guinness Posted July 14, 2013 Posted July 14, 2013 SoundPlaySoundPlay ( "filename" [, wait = 1] )0 = continue script while sound is playing (default)Done. StringToBinaryStringToBinary ( expression [, flag = 0] )flag = 1 (default), binary data is ANSIDone. syntax.7z - SYNTAX_3.3.9.7_En.txt + SYNTAX_3.3.8.1_Ru.txt (Compare)Not following. search: [, style [, exStyle ]]replacement: [, style = -1 [, exStyle = -1 ]]mask: GUICtrl*.txtDone.GUICreate ( "title" [, width [, height [, left = -1 [, top = -1 [, style = -1 [, exStyle = -1 [, parent = 0 ]]]]]]] )InputBox ( "title", "prompt" [, "default" [, "password char" [, width = -1 [, height = -1 [, left = Default [, top = Default [, timeout = 0 [, hwnd ]]]]]]]] )GUICtrlCreateMenu ( "submenutext" [, menuID = -1 [, menuentry ]] )GUICtrlCreateMenuItem ( "text", menuID = -1 [, menuentry = -1 [, menuradioitem = 0 ]] )GUIGetMsg ( [ advanced = 0 ] )GUICtrlRead ( controlID [, advanced = 0 ] )GUICtrlSetLimit ( controlID, max [, min = 0 ] )WinWait ( "title" [, "text" [, timeout = 0 ]] )WinWaitActive ( "title" [, "text" [, timeout = 0 ]] )WinWaitClose ( "title" [, "text" [, timeout = 0 ]] )WinWaitNotActive ( "title" [, "text" [, timeout = 0 ]] )Done.Thanks AZJIO, much appreciated. 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
AZJIO Posted July 14, 2013 Posted July 14, 2013 GUICtrlCreateUpdown ( inputcontrolID [, style = -1 ] ) ToolTip ( "text" [, x [, y [, "title" [, icon = 0 [, options ]]]]] ) GUISetCursor ( [ cursorID [, override = 0 [, winhandle ]]] ) SetError ( code [, extended = 0 [, return value = 1 ]] ) SetExtended ( code [, return value = 1 ] ) FtpSetProxy ( mode = 0 [, "proxy:port" [, "username" [, "password" ]]] ) HttpSetProxy ( mode = 0 [, "proxy:port" [, "username" [, "password" ]]] ) InetGetInfo ( [ handle [, index = -1 ]] ) StringInStr ( "string", "substring" [, casesense = 0 [, occurrence = 1 [, start = 1 [, count ]]]] ) StringMid ( "string", start [, count = -1 ] ) TrayCreateMenu ( "sub/menutext" [, menuID = -1 [, menuentry = -1 ]] ) GUICtrlCreateMenu ( "submenutext" [, menuID = -1 [, menuentry = -1 ]] ) IniWriteSection ( "filename", "section", "data" [, index = 1 ] ) My other projects or all
guinness Posted July 14, 2013 Posted July 14, 2013 GUICtrlCreateUpdown ( inputcontrolID [, style = -1 ] )ToolTip ( "text" [, x [, y [, "title" [, icon = 0 [, options ]]]]] )GUISetCursor ( [ cursorID [, override = 0 [, winhandle ]]] )SetError ( code [, extended = 0 [, return value = 1 ]] )SetExtended ( code [, return value = 1 ] )FtpSetProxy ( mode = 0 [, "proxy:port" [, "username" [, "password" ]]] )HttpSetProxy ( mode = 0 [, "proxy:port" [, "username" [, "password" ]]] )InetGetInfo ( [ handle [, index = -1 ]] )StringInStr ( "string", "substring" [, casesense = 0 [, occurrence = 1 [, start = 1 [, count ]]]] )StringMid ( "string", start [, count = -1 ] )TrayCreateMenu ( "sub/menutext" [, menuID = -1 [, menuentry = -1 ]] )GUICtrlCreateMenu ( "submenutext" [, menuID = -1 [, menuentry = -1 ]] )IniWriteSection ( "filename", "section", "data" [, index = 1 ] )Done. 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
guinness Posted July 14, 2013 Posted July 14, 2013 AZJIO, you might be interested to know I did this today...Revision: 7905Author: guinnessDate: 15 July 2013 01:20:57Message:Changed: @LF and @CR in comments and strings to @CRLF.----Revision: 7904Author: guinnessDate: 15 July 2013 01:16:27Message:Changed: Converted @CR or @LF to @CRLF.----Revision: 7903Author: guinnessDate: 15 July 2013 01:02:00Message:Changed: MsgBox numbers to constants.----Revision: 7901Author: guinnessDate: 14 July 2013 23:52:15Message:Removed: Empty whitespace.----Revision: 7900Author: guinnessDate: 14 July 2013 23:47:44Message:Removed: Duplicate includes.----Revision: 7899Author: guinnessDate: 14 July 2013 23:44:05Message:Removed: Trailing whitespace and double blank lines.----Revision: 7896Author: guinnessDate: 14 July 2013 23:13:02Message:Changed: Replaced 4096 with $MB_SYSTEMMODAL and added the include if needed.---- Mat 1 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
jchd Posted July 15, 2013 Posted July 15, 2013 DllStructGetData says: *char[n], byte[n] and ubyte[n] return all element data when index is omitted. Also in Remarks: When the element is char[n] and index is omitted the data returned is a String, both lines should also mention wchar[n] Â BTW, @error = 4 case is not clear (to me at least): in which case is a Struct element type unknown??? 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 hereRegExp tutorial: enough to get startedPCRE 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)
guinness Posted July 15, 2013 Posted July 15, 2013 DllStructGetData says: *char[n], byte[n] and ubyte[n] return all element data when index is omitted. Also in Remarks: When the element is char[n] and index is omitted the data returned is a String, both lines should also mention wchar[n]  BTW, @error = 4 case is not clear (to me at least): in which case is a Struct element type unknown??? Done. Though I didn't know the best way to re-word @error = 4. 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
guinness Posted July 15, 2013 Posted July 15, 2013 lang_operators.htm Thanks.I will update with that one. Though I will remove the openstat code when adding. 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
AZJIO Posted July 15, 2013 Posted July 15, 2013 (edited) Tutorial - Creating to GUI Calculator I like idea with the calculator, but it has to be finished. Three weeks ago I started to make an example of a calculator. expandcollapse popup#AutoIt3Wrapper_Run_AU3Check=y #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Local $hGui, $Input, $iBtnNg, $iBtnPn, $iBtnExe, $tmp Local $iBtnDiv, $iBtnMul, $iBtnSub, $iBtnAdd Local $iBtn0, $iBtn1, $iBtn2, $iBtn3, $iBtn4, $iBtn5, $iBtn6, $iBtn7, $iBtn8, $iBtn9 $hGui = GUICreate('Calculator', 230, 200) $Input = GUICtrlCreateInput('', 10, 10, 120, 25, $ES_RIGHT, $WS_EX_STATICEDGE) $iBtn7 = GUICtrlCreateButton('7', 10, 40, 30, 29) $iBtn8 = GUICtrlCreateButton('8', 40, 40, 30, 29) $iBtn9 = GUICtrlCreateButton('9', 70, 40, 30, 29) $iBtn4 = GUICtrlCreateButton('4', 10, 70, 30, 29) $iBtn5 = GUICtrlCreateButton('5', 40, 70, 30, 29) $iBtn6 = GUICtrlCreateButton('6', 70, 70, 30, 29) $iBtn1 = GUICtrlCreateButton('1', 10, 100, 30, 29) $iBtn2 = GUICtrlCreateButton('2', 40, 100, 30, 29) $iBtn3 = GUICtrlCreateButton('3', 70, 100, 30, 29) $iBtn0 = GUICtrlCreateButton('0', 10, 130, 30, 29) $iBtnNg = GUICtrlCreateButton('+/-', 40, 130, 30, 29) $iBtnPn = GUICtrlCreateButton('.', 70, 130, 30, 29) $iBtnDiv = GUICtrlCreateButton('/', 100, 40, 30, 29) $iBtnMul = GUICtrlCreateButton('*', 100, 70, 30, 29) $iBtnSub = GUICtrlCreateButton('-', 100, 100, 30, 29) $iBtnAdd = GUICtrlCreateButton('+', 100, 130, 30, 29) $iBtnExe = GUICtrlCreateButton('Calculate', 10, 160, 120, 29) GUISetState() While 1 Switch GUIGetMsg() Case $iBtn1 GUICtrlSetData($input, '1', 1) Case $iBtn2 GUICtrlSetData($input, '2', 1) Case $iBtn3 GUICtrlSetData($input, '3', 1) Case $iBtn4 GUICtrlSetData($input, '4', 1) Case $iBtn5 GUICtrlSetData($input, '5', 1) Case $iBtn6 GUICtrlSetData($input, '6', 1) Case $iBtn7 GUICtrlSetData($input, '7', 1) Case $iBtn8 GUICtrlSetData($input, '8', 1) Case $iBtn9 GUICtrlSetData($input, '9', 1) Case $iBtn0 GUICtrlSetData($input, '0', 1) Case $iBtnDiv GUICtrlSetData($input, '/', 1) Case $iBtnMul GUICtrlSetData($input, '*', 1) Case $iBtnSub GUICtrlSetData($input, '-', 1) Case $iBtnAdd GUICtrlSetData($input, '+', 1) Case $iBtnNg $tmp = GUICtrlRead($input) If StringLeft($tmp, 1) = '-' Then $tmp = StringTrimLeft($tmp, 1) GUICtrlSetData($input, $tmp) Else GUICtrlSetData($input, '-' & $tmp) EndIf Case $iBtnPn GUICtrlSetData($input, '.', 1) Case $iBtnExe $tmp = GUICtrlRead($input) $tmp = Execute($tmp) GUICtrlSetData($input, $tmp) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd A little doubtful and decided to make an example notepad. expandcollapse popup#AutoIt3Wrapper_Run_AU3Check=y #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 #include <Misc.au3> #include <GuiEdit.au3> #include <GuiMenu.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Local $sPathCur, $ifCharSet = 0 ; Font Settings Local $sFontName = 'Arial' Local $iPointSize = 10 Local $iColorRef = 0 Local $iFontWeight = 400 Local $iItalic = False Local $iUnderline = False Local $iStrikethru = False ; Set the background Local $iColorBg = 0xffffff Local $hGui, $hMenuFile, $aRect, $iHeightMenu, $iStyle, $hEdit ; item Local $iMenuFile, $iMenuNew, $iMenuOpen, $iMenuSave, $iMenuSaveAs, $iMenuExit, $iMenuEdit, $iMenuUndo, $iMenuCut, $iMenuCopy, $iMenuIns, $iMenuDel, $iMenuSelAll, $iMenuDate, $iMenuOpt, $iMenuFont, $iMenuBg, $iMenuHelp, $iMenuAbout, $iEdit Local $a_font, $iFntStl, $tmp, $sSelect, $sText, $sPath, $hFile $hGui = GUICreate('Untitled - Notepad AutoIt3', 500, 400, -1, -1, BitOR($WS_POPUP, $WS_OVERLAPPEDWINDOW), $WS_EX_COMPOSITED) GUISetIcon('shell32.dll', 2) $iMenuFile = GUICtrlCreateMenu('File') $iMenuNew = GUICtrlCreateMenuItem('New', $iMenuFile) $iMenuOpen = GUICtrlCreateMenuItem('Open', $iMenuFile) $iMenuSave = GUICtrlCreateMenuItem('Save', $iMenuFile) $iMenuSaveAs = GUICtrlCreateMenuItem('Save as...', $iMenuFile) GUICtrlCreateMenuItem('', $iMenuFile) $iMenuExit = GUICtrlCreateMenuItem('Exit', $iMenuFile) $iMenuEdit = GUICtrlCreateMenu('Edit') $iMenuUndo = GUICtrlCreateMenuItem('Undo' & @TAB & 'Ctrl+Z', $iMenuEdit) GUICtrlCreateMenuItem('', $iMenuEdit) $iMenuCut = GUICtrlCreateMenuItem('Cut' & @TAB & 'Ctrl+X', $iMenuEdit) $iMenuCopy = GUICtrlCreateMenuItem('Copy' & @TAB & 'Ctrl+C', $iMenuEdit) $iMenuIns = GUICtrlCreateMenuItem('Paste' & @TAB & 'Ctrl+V', $iMenuEdit) $iMenuDel = GUICtrlCreateMenuItem('Delete' & @TAB & 'Del', $iMenuEdit) $iMenuSelAll = GUICtrlCreateMenuItem('Select all', $iMenuEdit) GUICtrlCreateMenuItem('', $iMenuEdit) $iMenuDate = GUICtrlCreateMenuItem('Insert date', $iMenuEdit) $iMenuOpt = GUICtrlCreateMenu('Options') $iMenuFont = GUICtrlCreateMenuItem('Font', $iMenuOpt) $iMenuBg = GUICtrlCreateMenuItem('Background Color', $iMenuOpt) $iMenuHelp = GUICtrlCreateMenu('Help') $iMenuAbout = GUICtrlCreateMenuItem('About', $iMenuHelp) $hMenuFile = _GUICtrlMenu_GetMenu($hGui) $aRect = _GUICtrlMenu_GetMenuBarInfo($hGui, 0, 1) ; Specifies the height of the menu to calculate the height of an item Edit $iHeightMenu = $aRect[3] - $aRect[1] $iStyle = BitOR($ES_AUTOVSCROLL, $WS_VSCROLL, $ES_NOHIDESEL, $ES_WANTRETURN) $iEdit = GUICtrlCreateEdit('', 0, 0, 500, 400 - $iHeightMenu, $iStyle) $hEdit = GUICtrlGetHandle(-1) GUISetState() While 1 Switch GUIGetMsg() Case $iMenuFont $a_font = _ChooseFont($sFontName, $iPointSize, $iColorRef, $iFontWeight, $iItalic, $iUnderline, $iStrikethru, $hGui) If @error Then ContinueLoop If BitAND($a_font[1], 2) Then $iItalic = True Else $iItalic = False EndIf If BitAND($a_font[1], 4) Then $iUnderline = True Else $iUnderline = False EndIf If BitAND($a_font[1], 8) Then $iStrikethru = True Else $iStrikethru = False EndIf $sFontName = $a_font[2] $iPointSize = $a_font[3] $iFontWeight = $a_font[4] $iColorRef = $a_font[5] $iFntStl = 0 If $iItalic Then $iFntStl = 2 If $iUnderline Then $iFntStl += 4 If $iStrikethru Then $iFntStl += 8 GUICtrlSetFont($iEdit, $iPointSize, $iFontWeight, $iFntStl, $sFontName) GUICtrlSetColor($iEdit, $a_font[7]) $a_font = 0 Case $iMenuDate GUICtrlSetData($iEdit, @HOUR & ':' & @MIN & ' ' & @MDAY & '.' & @MON & '.' & @YEAR, 1) Case $iMenuBg $tmp = _ChooseColor(2, $iColorBg, 2, $hGui) If @error Then ContinueLoop GUICtrlSetBkColor($iEdit, $tmp) $iColorBg = $tmp Case $iMenuSelAll GUICtrlSendMsg($iEdit, $EM_SETSEL, 0, -1) Case $iMenuUndo _GUICtrlEdit_Undo($hEdit) Case $iMenuCut $sSelect = ControlCommand($hGui, "", $iEdit, "GetSelected") If Not @error Then ClipPut($sSelect) GUICtrlSetData($iEdit, '', 1) EndIf Case $iMenuCopy $sSelect = ControlCommand($hGui, "", $iEdit, "GetSelected") If Not @error Then ClipPut($sSelect) Case $iMenuIns GUICtrlSetData($iEdit, ClipGet(), 1) Case $iMenuDel GUICtrlSetData($iEdit, '', 1) Case $iMenuNew GUICtrlSetData($iEdit, '') $sPathCur = '' WinSetTitle($hGui, '', 'Untitled - Notepad AutoIt3') $ifCharSet = 0 Case $iMenuOpen $sPath = FileOpenDialog('Open', @WorkingDir, 'All (*)|Text documents (*.txt)', 8, '', $hGui) If @error Then ContinueLoop $ifCharSet = FileGetEncoding($sPath) $sText = FileRead($sPath) GUICtrlSetData($iEdit, $sText) $sPathCur = $sPath $sText = 0 $sPath = StringRegExpReplace($sPath, '^(?:.*\\)([^\\]+?)(\.[^.]+)?$', '\1\2') WinSetTitle($hGui, '', $sPath & ' - Notepad AutoIt3') Case $iMenuSave If FileExists($sPathCur) Then $sText = GUICtrlRead($iEdit) $hFile = FileOpen($sPathCur, 2 + $ifCharSet) FileWrite($hFile, $sText) FileClose($hFile) $sText = 0 Else ContinueCase EndIf Case $iMenuSaveAs $sPath = FileSaveDialog("Save as", @WorkingDir, 'All (*)|Text documents (*.txt)', 16, '', $hGui) If @error Then ContinueLoop $sText = GUICtrlRead($iEdit) $hFile = FileOpen($sPath, 2 + $ifCharSet) FileWrite($hFile, $sText) FileClose($hFile) $sPathCur = $sPath $sText = 0 $sPath = StringRegExpReplace($sPath, '^(?:.*\\)([^\\]+?)(\.[^.]+)?$', '\1\2') WinSetTitle($hGui, '', $sPath & ' - Notepad AutoIt3') Case $iMenuAbout MsgBox(0, 'About', 'The program is an example of a standard' & @LF & 'notepad created with AutoIt3.', 0, $hGui) Case $GUI_EVENT_CLOSE, $iMenuExit Exit EndSwitch WEnd Edited July 16, 2013 by AZJIO My other projects or all
jchd Posted July 16, 2013 Posted July 16, 2013 guinness, I don't where you are at it but the ternary operator also has to come up in the Operators Precedence topic. The function datatype is missing (or not!). 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 hereRegExp tutorial: enough to get startedPCRE 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)
guinness Posted July 16, 2013 Posted July 16, 2013 You mean in Language Reference - Operators? Where should it be placed? 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
guinness Posted July 16, 2013 Posted July 16, 2013  Tutorial - Creating to GUI Calculator I like idea with the calculator, but it has to be finished. Three weeks ago I started to make an example of a calculator. expandcollapse popup#include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $hGui = GUICreate('Calculator', 230, 200) $Input = GUICtrlCreateInput('', 10, 10, 120, 25, $ES_RIGHT, $WS_EX_STATICEDGE) $iBtn7 = GUICtrlCreateButton('7', 10, 40, 30, 29) $iBtn8 = GUICtrlCreateButton('8', 40, 40, 30, 29) $iBtn9 = GUICtrlCreateButton('9', 70, 40, 30, 29) $iBtn4 = GUICtrlCreateButton('4', 10, 70, 30, 29) $iBtn5 = GUICtrlCreateButton('5', 40, 70, 30, 29) $iBtn6 = GUICtrlCreateButton('6', 70, 70, 30, 29) $iBtn1 = GUICtrlCreateButton('1', 10, 100, 30, 29) $iBtn2 = GUICtrlCreateButton('2', 40, 100, 30, 29) $iBtn3 = GUICtrlCreateButton('3', 70, 100, 30, 29) $iBtn0 = GUICtrlCreateButton('0', 10, 130, 30, 29) $iBtnNg = GUICtrlCreateButton('+/-', 40, 130, 30, 29) $iBtnPn = GUICtrlCreateButton('.', 70, 130, 30, 29) $iBtnDiv = GUICtrlCreateButton('/', 100, 40, 30, 29) $iBtnMul = GUICtrlCreateButton('*', 100, 70, 30, 29) $iBtnSub = GUICtrlCreateButton('-', 100, 100, 30, 29) $iBtnAdd = GUICtrlCreateButton('+', 100, 130, 30, 29) $iBtnExe = GUICtrlCreateButton('Calculate', 10, 160, 120, 29) GUISetState() While 1 Switch GUIGetMsg() Case $iBtn1 GUICtrlSetData($input, '1', 1) Case $iBtn2 GUICtrlSetData($input, '2', 1) Case $iBtn3 GUICtrlSetData($input, '3', 1) Case $iBtn4 GUICtrlSetData($input, '4', 1) Case $iBtn5 GUICtrlSetData($input, '5', 1) Case $iBtn6 GUICtrlSetData($input, '6', 1) Case $iBtn7 GUICtrlSetData($input, '7', 1) Case $iBtn8 GUICtrlSetData($input, '8', 1) Case $iBtn9 GUICtrlSetData($input, '9', 1) Case $iBtn0 GUICtrlSetData($input, '0', 1) Case $iBtnDiv GUICtrlSetData($input, '/', 1) Case $iBtnMul GUICtrlSetData($input, '*', 1) Case $iBtnSub GUICtrlSetData($input, '-', 1) Case $iBtnAdd GUICtrlSetData($input, '+', 1) Case $iBtnNg $tmp = GUICtrlRead($input) If StringLeft($tmp, 1) = '-' Then $tmp = StringTrimLeft($tmp, 1) GUICtrlSetData($input, $tmp) Else GUICtrlSetData($input, '-' & $tmp) EndIf Case $iBtnPn GUICtrlSetData($input, '.', 1) Case $iBtnExe $tmp = GUICtrlRead($input) $tmp = Execute($tmp) GUICtrlSetData($input, $tmp) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd A little doubtful and decided to make an example notepad. expandcollapse popup#include <Misc.au3> #include <GuiEdit.au3> #include <GuiMenu.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Local $sPathCur, $ifCharSet = 0 $sFontName = 'Arial' $iPointSize = 10 $iColorRef = 0 $iFontWeight = 400 $iItalic = False $iUnderline = False $iStrikethru = False $hGui = GUICreate('Untitled - Notepad AutoIt3', 500, 400, -1, -1, BitOR($WS_POPUP, $WS_OVERLAPPEDWINDOW), $WS_EX_COMPOSITED) GUISetIcon('shell32.dll', 2) $iMenuFile = GUICtrlCreateMenu('File') $iMenuNew = GUICtrlCreateMenuItem('New', $iMenuFile) $iMenuOpen = GUICtrlCreateMenuItem('Open', $iMenuFile) $iMenuSave = GUICtrlCreateMenuItem('Save', $iMenuFile) $iMenuSaveAs = GUICtrlCreateMenuItem('Save as...', $iMenuFile) $iMenuExit = GUICtrlCreateMenuItem('Exit', $iMenuFile) $iMenuEdit = GUICtrlCreateMenu('Edit') $iMenuUndo = GUICtrlCreateMenuItem('Undo', $iMenuEdit) $iMenuSelAll = GUICtrlCreateMenuItem('Select all', $iMenuEdit) $iMenuFrmt = GUICtrlCreateMenu('Options') $iMenuFont = GUICtrlCreateMenuItem('Font', $iMenuFrmt) $iMenuHelp = GUICtrlCreateMenu('Help') $iMenuAbout = GUICtrlCreateMenuItem('About', $iMenuHelp) $hMenuFile = _GUICtrlMenu_GetMenu($hGui) $aRect = _GUICtrlMenu_GetItemRect($hGui, $hMenuFile, 0) $iStyle = BitOR($ES_AUTOVSCROLL, $WS_VSCROLL, $ES_NOHIDESEL, $ES_WANTRETURN) $iEdit = GUICtrlCreateEdit('', 0, 0, 500, 400 - ($aRect[3] - $aRect[1]), $iStyle) $hEdit = GUICtrlGetHandle(-1) GUISetState() While 1 Switch GUIGetMsg() Case $iMenuFont $a_font = _ChooseFont($sFontName, $iPointSize, $iColorRef, $iFontWeight, $iItalic, $iUnderline, $iStrikethru, $hGui) If @error Then ContinueLoop If BitAND($a_font[1], 2) Then $iItalic = True Else $iItalic = False EndIf If BitAND($a_font[1], 4) Then $iUnderline = True Else $iUnderline = False EndIf If BitAND($a_font[1], 8) Then $iStrikethru = True Else $iStrikethru = False EndIf $sFontName = $a_font[2] $iPointSize = $a_font[3] $iFontWeight = $a_font[4] $iColorRef = $a_font[5] $iFntStl = 0 If $iItalic Then $iFntStl = 2 If $iUnderline Then $iFntStl += 4 If $iStrikethru Then $iFntStl += 8 GUICtrlSetFont($iEdit, $iPointSize, $iFontWeight, $iFntStl, $sFontName) GUICtrlSetColor($iEdit, $a_font[7]) $a_font = 0 Case $iMenuSelAll _GUICtrlEdit_SetSel($hEdit, 0, -1) Case $iMenuUndo _GUICtrlEdit_Undo($hEdit) Case $iMenuNew GUICtrlSetData($iEdit, '') $sPathCur = '' WinSetTitle($hGui, '', 'Untitled - Notepad AutoIt3') $ifCharSet = 0 Case $iMenuOpen $sPath = FileOpenDialog('Open', @WorkingDir, 'Text documents (*.txt)|All (*)', 8, '', $hGui) If @error Then ContinueLoop $ifCharSet = FileGetEncoding($sPath) $sText = FileRead($sPath) GUICtrlSetData($iEdit, $sText) $sPathCur = $sPath $sText = 0 $sPath = StringRegExpReplace($sPath, '^(?:.*\\)([^\\]+?)(\.[^.]+)?$', '\1\2') WinSetTitle($hGui, '', $sPath & ' - Notepad AutoIt3') Case $iMenuSave If FileExists($sPathCur) Then $sText = GUICtrlRead($iEdit) $hFile = FileOpen($sPathCur, 2 + $ifCharSet) FileWrite($hFile, $sText) FileClose($hFile) $sText = 0 Else ContinueCase EndIf Case $iMenuSaveAs $sPath = FileSaveDialog("Save as", @WorkingDir, 'Text documents (*.txt)|All (*)', 16, '', $hGui) If @error Then ContinueLoop $sText = GUICtrlRead($iEdit) $hFile = FileOpen($sPath, 2 + $ifCharSet) FileWrite($hFile, $sText) FileClose($hFile) $sPathCur = $sPath $sText = 0 $sPath = StringRegExpReplace($sPath, '^(?:.*\\)([^\\]+?)(\.[^.]+)?$', '\1\2') WinSetTitle($hGui, '', $sPath & ' - Notepad AutoIt3') Case $iMenuAbout MsgBox(0, 'About', 'The program is an example of a standard' & @LF & 'notepad created with AutoIt3.') Case $GUI_EVENT_CLOSE, $iMenuExit Exit EndSwitch WEnd I like the idea and it's something that can be added in the future. 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
Recommended Posts