nitekram Posted March 18, 2013 Posted March 18, 2013 Thanks Exit. Would you mind replacing the MsgBox values with constant variables and then I will update. Thanks.As far as the helpfile is concerned there are no constants? There is no include listed for them either? 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
guinness Posted March 19, 2013 Posted March 19, 2013 Search in Constants.au3. You guys are smart so should be able to figure it 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
BrewManNH Posted March 19, 2013 Author Posted March 19, 2013 If you add this "#AutoIt3Wrapper_Add_Constants=y" to the top of your script, you won't even need to search for the right file to include. 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
guinness Posted March 19, 2013 Posted March 19, 2013 (edited) If you add this "#AutoIt3Wrapper_Add_Constants=y" to the top of your script, you won't even need to search for the right file to include. Are you sure? If they don't know that 4096 is $MB_SYSTEMMODAL then the directive doesn't work. #AutoIt3Wrapper_Add_Constants=Y MsgBox(4096, '', '') Edited March 19, 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
Richard Robertson Posted March 19, 2013 Posted March 19, 2013 Are you sure? If they don't that 4096 is $MB_SYSTEMMODAL then the directive doesn't work. #AutoIt3Wrapper_Add_Constants=Y MsgBox(4096, '', '') No, the wrapper command will automatically include the files that declare the constants you used.
guinness Posted March 19, 2013 Posted March 19, 2013 I missed know in that last post. Correct, I was pointing this out to BrewManNH. 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
BrewManNH Posted March 19, 2013 Author Posted March 19, 2013 I was talking about doing it the other way around, obviously. Putting the constant in and having the wrapper find the correct include. 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
Moderators Melba23 Posted March 19, 2013 Moderators Posted March 19, 2013 Hi,I always thought that the directive only recognised constants which were defined in the various include files by NAME, not by VALUE. On my system this gets the #include file added:#AutoIt3Wrapper_Add_Constants=y MsgBox($MB_SYSTEMMODAL , '', '')but this does not:#AutoIt3Wrapper_Add_Constants=y MsgBox(4096, '', '')M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
BrewManNH Posted March 19, 2013 Author Posted March 19, 2013 I must be talking to myself. 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
guinness Posted March 19, 2013 Posted March 19, 2013 There's some code Mat and I created to determine MsgBox constants from the value floating around the Forum somewhere. 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
nitekram Posted March 19, 2013 Posted March 19, 2013 (edited) My point is, if you are going to want us to put the correct value, either by constant or by number, then it should be listed in the helpfile. I have never used anything other then the numbers listed in the msgbox() helpfile - link and would never know there were constants had I not read this post?These should be added to the table that is listed in the helpfile for MsgBox()expandcollapse popup[/color] [color=#5a5a5a]; Message Box Constants ; Indicates the buttons displayed in the message box Global Const $MB_OK = 0 ; One push button: OK Global Const $MB_OKCANCEL = 1 ; Two push buttons: OK and Cancel Global Const $MB_ABORTRETRYIGNORE = 2 ; Three push buttons: Abort, Retry, and Ignore Global Const $MB_YESNOCANCEL = 3 ; Three push buttons: Yes, No, and Cancel Global Const $MB_YESNO = 4 ; Two push buttons: Yes and No Global Const $MB_RETRYCANCEL = 5 ; Two push buttons: Retry and Cancel[/color] [color=#5a5a5a]; Displays an icon in the message box Global Const $MB_ICONHAND = 16 ; Stop-sign icon Global Const $MB_ICONQUESTION = 32 ; Question-mark icon Global Const $MB_ICONEXCLAMATION = 48 ; Exclamation-point icon Global Const $MB_ICONASTERISK = 64 ; Icon consisting of an 'i' in a circle[/color] [color=#5a5a5a]; Indicates the default button Global Const $MB_DEFBUTTON1 = 0 ; The first button is the default button Global Const $MB_DEFBUTTON2 = 256 ; The second button is the default button Global Const $MB_DEFBUTTON3 = 512 ; The third button is the default button[/color] [color=#5a5a5a]; Indicates the modality of the dialog box Global Const $MB_APPLMODAL = 0 ; Application modal Global Const $MB_SYSTEMMODAL = 4096 ; System modal Global Const $MB_TASKMODAL = 8192 ; Task modal[/color] [color=#5a5a5a]; Indicates miscellaneous message box attributes Global Const $MB_TOPMOST = 262144 ; top-most attribute Global Const $MB_RIGHTJUSTIFIED = 524288 ; right-justified title and text[/color] [color=#5a5a5a]; Indicates the button selected in the message box Global Const $IDTIMEOUT = -1 ; The message box timed out Global Const $IDOK = 1 ; OK button was selected Global Const $IDCANCEL = 2 ; Cancel button was selected Global Const $IDABORT = 3 ; Abort button was selected Global Const $IDRETRY = 4 ; Retry button was selected Global Const $IDIGNORE = 5 ; Ignore button was selected Global Const $IDYES = 6 ; Yes button was selected Global Const $IDNO = 7 ; No button was selected Global Const $IDTRYAGAIN = 10 ; Try Again button was selected Global Const $IDCONTINUE = 11 ; Continue button was selected[/color] [color=#5a5a5a] Edited March 19, 2013 by nitekram 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
guinness Posted March 19, 2013 Posted March 19, 2013 Mat has been working hard on adding those to the help file, already done. For future reference Exit should have put: BitOR($MB_IConstop, $MB_ICONWARNING, $MB_TOPMOST) 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
nitekram Posted March 19, 2013 Posted March 19, 2013 Thanks Mat & guinness for all your hard work!!! 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
BrewManNH Posted March 19, 2013 Author Posted March 19, 2013 (edited) Just remember, in the discussion that brought this all up, two of those constants don't exist in the standard UDF Include files in the current version. You can't find $MB_IConstop or $MB_ICONWARNING unless you've downloaded the WINAPIEx files (they're in APIConstants.au3).EDIT: Correction to the above, those constants don't exist, but $MB_IConstop is equivalent to $MB_ICONHAND which is already referenced, and $MB_ICONWARNING is equivalent to $MB_ICONEXCLAMATION.Global Const $MB_IConstop = 0x00000010Global Const $MB_IConerror = 0x00000010Global Const $MB_ICONHAND = 0x00000010Global Const $MB_ICONEXCLAMATION = 0x00000030Global Const $MB_ICONWARNING = 0x00000030 Edited March 19, 2013 by BrewManNH 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
guinness Posted March 19, 2013 Posted March 19, 2013 (edited) That's true and sometimes I forget because I'm using "custom" includes, well the beta version. My bad. Edited March 19, 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
AZJIO Posted March 23, 2013 Posted March 23, 2013 (edited) _GUICtrlRebar_GetBandBorders, _GUICtrlRebar_GetBandBordersExDescription is too long. Part can be moved to the "Remarks"Zero-based index of the band for which the borders will be retrievedMany of the functions in the header already describes. Why repeat it in the parameters? This applies not only to this function. Such lines should be brought to the same style.StringUpperRelatedStringIsLower, StringIsUpper, StringInStr, StringLeft, StringLen, StringLower, StringMid, StringRight, StringTrimLeft, StringTrimRight, StringCompare, StringIsAlNum, StringIsAlpha, StringIsASCII, StringIsSpace, StringIsXDigit, StringReplace, StringSplitWhy to list all functions in the section? Usually sufficient Set, Get. Most expected to do first in the listAscAscW, Chr, ChrW, StringToASCIIArrayAscWAsc, Chr, ChrW, StringToASCIIArrayBinaryString, BinaryToString, StringToBinary, Int, Number, IsBinary, BinaryLen, BinaryMidBinaryLenStringLen, Binary, BinaryMidBinaryMidStringMid, Binary, BinaryLenBinaryToStringStringToBinary, Binary, String, IsBinary, StringToASCIIArrayCeilingFloor, Round, Int, NumberChrAsc, AscW, ChrW, String, StringFromASCIIArrayChrWAsc, AscW, Chr, String, StringFromASCIIArrayDirCopyDirMove, FileCopy, FileMoveDirGetSizeFileGetSizeDirMoveFileMove, FileCopy, DirRemoveEvalAssign, IsDeclared, ExecuteExecuteCall, Assign, EvalFileChangeDir<a href="../macros.htm#@WorkingDir">@WorkingDir</a>FileCopyFileMove, FileDelete, DirCopy, DirCreateFileGetAttribFileSetAttrib, FileGetTime, FileExists, FileGetSize, FileSetTimeFileGetEncodingFileOpen, FileRead, FileReadLine, FileWrite, FileWriteLine, BinaryToStringFileGetSizeDirGetSize, FileGetAttrib, FileGetTime, DriveSpaceTotal, FileGetVersionFileGetTimeFileSetTime, FileGetSize, FileGetAttrib, FileGetVersionFileOpenDialogFileSaveDialog, FileSelectFolderFileSetAttribFileGetAttrib, FileSetTimeFileSetTimeFileGetTime, FileSetAttribFloorCeiling, Round, Int, NumberIsArrayVarGetType, UBound, <a href="../keywords/ReDim.htm">ReDim</a>IsBinaryIsString, VarGetType, IsArray, IsFloat, IsInt, IsNumber, IsBool, IsHWnd, Binary, BinaryToString, StringToBinaryIsFloatStringIsFloat, VarGetType, IsNumber, IsInt, IsArray, IsString, IsBool, IsBinary, IsPtr, IsHWndIsIntIsNumber, IsArray, IsFloat, IsString, IsBool, IsHWnd, StringIsInt, IsBinary, IsPtr, VarGetTypeIsNumberIsInt, IsArray, IsFloat, IsString, IsBool, IsHWnd, IsBinary, IsPtrIsStringIsBinary, IsArray, IsFloat, IsInt, IsNumber, IsBool, IsHWnd, IsPtr, String, VarGetTypeNumberInt, String, Binary, Ceiling, Floor, HWnd, Ptr, RoundRandomSRandom, RoundSetErrorSetExtended, <a href="../keywords/Func.htm">Func...Return...EndFunc</a>SetExtendedSetError, <a href="../keywords/Func.htm">Func...Return...EndFunc</a>StringBinary, BinaryToString, StringToBinary, Int, Number, IsString, Chr, ChrW, HWnd, PtrStringCompareStringInStr, StringLen, StringLeft, StringRight, StringTrimLeft, StringTrimRightStringInStrStringRegExp, StringCompare, StringLeft, StringRight, StringTrimLeft, StringTrimRight, StringLen, StringMid, StringSplitStringIsAlNumStringIsAlpha, StringIsASCII, StringIsDigit, StringIsXDigitStringIsAlphaStringIsAlNum, StringIsASCII, StringIsLower, StringIsUpper, StringIsXDigitStringIsASCIIStringIsAlNum, StringIsAlpha, StringIsDigit, StringIsSpace, StringIsLower, StringIsUpper, StringIsXDigitStringIsDigitStringIsXDigit, StringIsFloat, StringIsInt, StringIsAlNum, StringIsASCIIStringIsFloatStringIsInt, IsFloat, StringIsDigitStringIsLowerStringIsUpper, StringUpper, StringLower, StringIsAlNum, StringIsAlpha, StringIsASCIIStringIsSpaceStringStripWS, StringIsASCII, StringStripCRStringIsUpperStringIsLower, StringUpper, StringLower, StringIsAlpha, StringIsAlNum, StringIsASCIIStringIsXDigitStringIsDigit, StringIsAlNum, StringIsAlpha, StringIsASCIIStringLeftStringRight, StringTrimLeft, StringTrimRight, StringMid, StringLen, StringInStrStringLenBinaryLen, StringInStr, StringLeft, StringRight, StringTrimLeft, StringTrimRight, StringMidStringLowerStringUpper, StringIsLower, StringIsUpperStringMidBinaryMid, StringInStr, StringLeft, StringRight, StringTrimLeft, StringTrimRight, StringLenStringRegExpStringRegExpReplace, StringInStrStringRegExpReplaceStringRegExp, StringReplaceStringReplaceStringRegExpReplace, StringInStr, StringStripWS, StringAddCR, StringLeft, StringLen, StringMid, StringRight, StringTrimLeft, StringTrimRightStringRightStringLeft, StringTrimLeft, StringTrimRight, StringMid, StringLen, StringInStrStringSplitStringRegExp, StringToASCIIArray, StringMid, StringInStrStringStripCRStringAddCR, StringStripWS, StringIsSpace, StringReplaceStringStripWSStringStripCR, StringIsSpace, StringReplace, StringRegExpReplaceStringToASCIIArrayStringFromASCIIArray, BinaryToString, StringSplitStringToBinaryBinaryToString, Binary, String, IsBinaryStringTrimLeftStringTrimRight, StringLeft, StringRight, StringLen, StringMid, StringInStrStringTrimRightStringTrimLeft, StringLeft, StringRight, StringLen, StringMid, StringInStrStringUpperStringLower, StringIsLower, StringIsUpperTraySetToolTipToolTip, TrayTipTrayTipToolTip, MsgBox, TrayIconHide (Option), TraySetToolTipUBound<a href="../keywords/Dim.htm">Dim</a>, <a href="../keywords/ReDim.htm">ReDim</a>, IsArrayWinGetTextControlGetText, WinGetTitle, WinGetClassListWinListWinGetState, WinGetHandle_WinAPI_OpenProcess_WinAPI_CloseHandle, _WinAPI_ReadProcessMemory, _WinAPI_WriteProcessMemory_WinAPI_ReadProcessMemory_WinAPI_WriteProcessMemory, _WinAPI_OpenProcess_WinAPI_WriteProcessMemory_WinAPI_ReadProcessMemory, _WinAPI_OpenProcess_GUICtrlRebar_SetBandLengthSet Application-defined value_WinAPI_DrawFrameControlHandle to the device context into which the icon or cursor is drawn_GUICtrlRebar_HitTestDetermines which item is at a specified positionband_WinAPI_SetEndOfFileFailure: False, @extend is set to GetLastError() to get details_WinAPI_Mouse_Event$MOUSEEVENTF_ABSOLUTE - repeats twice Edited March 25, 2013 by AZJIO My other projects or all
BrewManNH Posted March 28, 2013 Author Posted March 28, 2013 _ArrayUnique - The help file has many problems in this section First line states: Returns the Unique Elements of a 1-dimensional array.This is incorrect as it doesn't return the unique elements and it doesn't only return them from a 1D array. What it returns is a 1D array containing the elements of the dimension selected with all duplicate items removed. In other words, as mvg put it in the Trac ticket I submitted 2 years ago, it makes the array returned unique, not it gets the unique elements of the array. Plus, this function works quite well with a 2D array as well as a 1D array.The return values listed in the file are all wrong as well, see point #1 as to what the return values are.The Example script for it uses Dim and has the #include <Array.au3> line in it before every example which is bad coding style and a poor example for new users of the help file.The comments in the example scripts are wrong as to what is returned, the examples don't return the unique values, they return the values with all duplicates removed, see point #1 above. 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
AZJIO Posted March 29, 2013 Posted March 29, 2013 FileFindFirstFileFailure: Returns -1 if error occurs. If the Folder is empty the @error is set to 1.Failure: Returns -1 if nothing is found. The value of @error is set to 1 only if the Folder is empty. My other projects or all
Moderators Melba23 Posted March 29, 2013 Moderators Posted March 29, 2013 I have always found that StringFormat example only really shows the required format string when run - the double %% used in the printf strings really confused me when I first started using the function. I hope this proposal works both as a reference script and when run: expandcollapse popup_StringFormat_Example() Func _StringFormat_Example() Local $iInt_Unsigned = 43951789 Local $iInt_Negative = -43951789 ConsoleWrite(@CRLF & "Numeric Formats" & @CRLF) ShowFormat($iInt_Unsigned, "%d", "standard positive integer with no sign", 1) ; 43951789 ShowFormat($iInt_Negative, "%d", "standard negative integer with sign", 1) ; -43951789 ShowFormat($iInt_Unsigned, "%i", "standard integer", 1) ; 43951789 ShowFormat($iInt_Unsigned, "%09i", "9 digits with leading zero", 1) ; 043951789 ShowFormat($iInt_Unsigned, "%e", "scientific notation") ; 4.395179e+007 ShowFormat($iInt_Unsigned, "%u", "unsigned integer with positive integer", 1) ; 43951789 ShowFormat($iInt_Negative, "%u", "unsigned integer with negative integer", 1) ; 4251015507 ShowFormat($iInt_Unsigned, "%f", "floating point") ; 43951789.000000 ShowFormat($iInt_Unsigned, "%.2f", "floating point with 2 digits after decimal point", 1) ; 43951789.00 ShowFormat($iInt_Unsigned, "%o", "octal", 1) ; 247523255 ShowFormat($iInt_Unsigned, "%s", "string", 1) ; 43951789 ShowFormat($iInt_Unsigned, "%x", "hexadecimal (lower-case)", 1) ; 29ea6ad ShowFormat($iInt_Unsigned, "%X", "hexadecimal (upper-case)", 1) ; 29EA6AD ShowFormat($iInt_Unsigned, "%+d", "sign specifier on a positive integer", 1) ; +43951789 ShowFormat($iInt_Negative, "%+d", "sign specifier on a negative integer", 1) ; -43951789 Local $sString = "string" Local $sString_Long = "longstring" ConsoleWrite(@CRLF & "String Formats - [ ] used to show beginning/end of string" & @CRLF) ShowFormat($sString, "[%s]", "standard string", 1) ; [string] ShowFormat($sString, "[%10s]", "10 chars right justified with added spaces") ; [ string] ShowFormat($sString, "[%-10s]", "10 chars left justified with added spaces") ; [string ] ShowFormat($sString_Long, "[%10.8s]", "right justified but precision 8 so truncated") ; [ longer s] ShowFormat($sString_Long, "[%-10.8s]", "left justifed but precision 8 so truncated") ; [longer s ] ShowFormat($sString, "[%010s]", "10 chars with leading zero") ; [0000string] ConsoleWrite(@CRLF & "Date Format - each % uses a new parameter" & @CRLF) ConsoleWrite('"%02i\%02i\%04i" 0n (1, 9, 2013) => ' & StringFormat("%02i\%02i\%04i", 1, 9, 2013) & @CRLF & @CRLF) EndFunc Func ShowFormat($vVar, $sFormat, $sExplan, $iTab = 0) ConsoleWrite('"' & $sFormat & '" on ' & $vVar & @TAB & ' => ' & StringFormat($sFormat, $vVar)) If $iTab Then ConsoleWrite(@TAB) ConsoleWrite(@TAB & " ; " & $sExplan & @CRLF) EndFuncNumeric Formats "%d" on 43951789 => 43951789 ; standard positive integer with no sign "%d" on -43951789 => -43951789 ; standard negative integer with sign "%i" on 43951789 => 43951789 ; standard integer "%09i" on 43951789 => 043951789 ; 9 digits with leading zero "%e" on 43951789 => 4.395179e+007 ; scientific notation "%u" on 43951789 => 43951789 ; unsigned integer with positive integer "%u" on -43951789 => 4251015507 ; unsigned integer with negative integer "%f" on 43951789 => 43951789.000000 ; floating point "%.2f" on 43951789 => 43951789.00 ; floating point with 2 digits after decimal point "%o" on 43951789 => 247523255 ; octal "%s" on 43951789 => 43951789 ; string "%x" on 43951789 => 29ea6ad ; hexadecimal (lower-case) "%X" on 43951789 => 29EA6AD ; hexadecimal (upper-case) "%+d" on 43951789 => +43951789 ; sign specifier on a positive integer "%+d" on -43951789 => -43951789 ; sign specifier on a negative integer String Formats - [ ] used to show beginning/end of string "[%s]" on string => [string] ; standard string "[%10s]" on string => [ string] ; 10 chars right justified with added spaces "[%-10s]" on string => [string ] ; 10 chars left justified with added spaces "[%10.8s]" on longstring => [ longstri] ; right justified but precision 8 so truncated "[%-10.8s]" on longstring => [longstri ] ; left justifed but precision 8 so truncated "[%010s]" on string => [0000string] ; 10 chars with leading zero Date Format - each % uses a new parameter "%02i\%02i\%04i" 0n (1, 9, 2013) => 01\09\2013The various tabs all line up in SciTE - I really hate this editor! M23 trancexx 1 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
BrewManNH Posted March 29, 2013 Author Posted March 29, 2013 Nice example, might make it a bit easier to understand it. The current example script in the help file confused the hell out of me for a long time, and one of the examples has the wrong description as to what the parameters mean. 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
Recommended Posts