Moderators Melba23 Posted July 31, 2013 Moderators Share Posted July 31, 2013 JohnOne, Interesting - I have never used that function (I normally set @extended with SetError), but the documentation is very confusing as you say. Testing the function makes me even more confused. It returns the value set in the "return value" parameter (with a default of 1) as can be seen here: $iRet = SetExtended(5, 4) ConsoleWrite(@extended & " - " & $iRet & @CRLF) $iRet = SetExtended(5) ConsoleWrite(@extended & " - " & $iRet & @CRLF) but I cannot imagine why it should. What purpose can it possibly serve? Anyway, here is my suggestion for the Help file text: expandcollapse popup###Function### SetExtended ###Description### Manually set the value of the @extended macro. ###Syntax### SetExtended ( code [, return value = 1 ] ) ###Parameters### @@ParamTable@@ code The required value (integer) to set into the @extended macro. return value [optional] Return the value passed in the parameter. @@End@@ ###ReturnValue### The value of the return value parameter (default = 1) ###Remarks### When entering a function @extended is set to 0. Unless SetExtended() is called, then @extended will remain 0 when the function ends. This means that in order for @extended to be set after a function returns, it must be explicitly set in the function. This also means you may need to backup the status of @extended in a variable if you are testing it in a While-WEnd loop. @extended is limited between the values of -2147483647 to 2147483647. ###Related### SetError ###Example### @@IncludeExample@@ Does that make it any clearer? 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 Link to comment Share on other sites More sharing options...
JohnOne Posted July 31, 2013 Share Posted July 31, 2013 (edited) The value of the return value parameter (default = 1) It does. I think By default, none, however if the optional return value argument is passed, then the function will return that value. Was meant to mean, when SetExtended is used like this. $var = _Test() + @extended Func _Test() Return SetExtended(3, 5) EndFunc Edited July 31, 2013 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
guinness Posted July 31, 2013 Share Posted July 31, 2013 I can see a use for SetExtended over SetError, I think...do I..erm...maybe! UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
JohnOne Posted July 31, 2013 Share Posted July 31, 2013 I often use @error and @extended as int return values when instead of a small array when I need two or thee values from a function. They're very handy macro's. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
guinness Posted July 31, 2013 Share Posted July 31, 2013 I often use @error and @extended as int return values when instead of a small array when I need two or thee values from a function. They're very handy macro's. But I guess you normally use SetError? UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
JohnOne Posted July 31, 2013 Share Posted July 31, 2013 Yep, I only used SetExtended today, after like 3 years or something AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
AZJIO Posted July 31, 2013 Share Posted July 31, 2013 JohnOne My other projects or all Link to comment Share on other sites More sharing options...
czardas Posted July 31, 2013 Share Posted July 31, 2013 (edited) Testing the function makes me even more confused. It returns the value set in the "return value" parameter (with a default of 1) as can be seen here: $iRet = SetExtended(5, 4) ConsoleWrite(@extended & " - " & $iRet & @CRLF) $iRet = SetExtended(5) ConsoleWrite(@extended & " - " & $iRet & @CRLF) but I cannot imagine why it should. What purpose can it possibly serve? I sometimes set the function return value to 1:- a method I copied from the Array.au3 UDF. I presume it is intended to indicate that a function performed successfully. I'm often wrong in my assumptions. Edited July 31, 2013 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
guinness Posted July 31, 2013 Share Posted July 31, 2013 True or False is better. I dunno why AutoIt functions return 1 or 0, but it's not really an issue. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
czardas Posted July 31, 2013 Share Posted July 31, 2013 (edited) I prefer return values of 1 or 0. I think it's more flexible. Edited July 31, 2013 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
MHz Posted July 31, 2013 Share Posted July 31, 2013 (edited) Testing the function makes me even more confused. It returns the value set in the "return value" parameter (with a default of 1) as can be seen here: $iRet = SetExtended(5, 4) ConsoleWrite(@extended & " - " & $iRet & @CRLF) $iRet = SetExtended(5) ConsoleWrite(@extended & " - " & $iRet & @CRLF) but I cannot imagine why it should. What purpose can it possibly serve? That is ill use. $iRet is useless as you have no option to return it from a UDF. This is why $iRet is regarded as none in the help file as it is useless to use. This goes for the return of SetError as well. $iRet value should not be considered reliable to document as it serves no meaningful purpose. Now, a general summary. The old way when SetError used only 1 parameter and SetExtended did not exist was. SetError(1) Return 0 SetError always returned 1 (i.e. $iRet) so you could not append it to Return so it was limited if you wanted to return anything other then 1. As a fix, SetError was extended to accept up to 3 parameters and SetExtended was introduced to do up to 2 parameters. So you could now append to the end of Return. Return SetError(2, 3, "string") ; or Return SetExtended(3, 'string') The return value (like $iRet above) of SetError or SetExtended is not used by Return in this case (and is still ill to consider the return value like $iRet). It is the parameters that are the return values, @extended and @error. The question is, what do you focus on? To focus on a always 1 for SetError or SetExtended, or what the Return from the UDF does. Mind you the always 1 is useless. Doing the below is useless If SetError(1) Then ... as there is nothing to gain from it. If you change the none to some value in the help file then make sure that focus and clarity are of primary concern and that it is well, that return value is useless. It is the parameters that matter most. Notice how I kept referring to $iRet as the return instead of the parameter and this is precisely what you need to be careful in documenting. To try and avoid confusion. Edit: The parameter overrules the return value. Edited July 31, 2013 by MHz Link to comment Share on other sites More sharing options...
JohnOne Posted July 31, 2013 Share Posted July 31, 2013 All that is true, and is also the ambiguity. SetExtended() is a documented function, that function returns 1 if you do not pass it optional second parameter. I realize that it's prime actual use is to pass it a second parameter in order to use it like so. Func _Func() Return SetExtended(1, 5) EndFunc But I think it should be better documented that that is it's primary usage, and the return value of the UDF will be the second parameter. In any case, SetExtended() returns 1, not "none" if second parameter is not set. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 31, 2013 Moderators Share Posted July 31, 2013 MHz,Thanks for that explanation - all suddenly becomes clear. 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 Link to comment Share on other sites More sharing options...
MHz Posted July 31, 2013 Share Posted July 31, 2013 (edited) JohnOne, That is True. Return Value By default, 1, however, if the optional return value argument is passed, then the function will return that value. The however following is vital information as the default 1 is usually unwanted if you want to set error and return 0 to flag failure. Melba23, I think I messed it up a bit. The default is confusing even today to explain. Edited July 31, 2013 by MHz Link to comment Share on other sites More sharing options...
trancexx Posted July 31, 2013 Share Posted July 31, 2013 Return values of SetError() and SetExtended() should be docummented as undefined for cases when return value parameter is omitted. That's the whole thing and probably it's the most correct.Documenting this type of information regarding these functions or other built-ins should be left to developers. czardas 1 ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JohnOne Posted July 31, 2013 Share Posted July 31, 2013 Here's how I'd put it Return Value Success - Sets @Extended to the value of first parameter and returns the second parameter passed, if no value is passed to the second parameter the return is the default of 1. Failure - If SetExtended fails, the return value is the same as Success but @extended is not set Failure $var = _Test() $exten = @extended MsgBox(0,"_Test", "Return = " & $var & @CRLF & "@Extended = " & $exten) $var = _Test2() $exten = @extended MsgBox(0,"_Test2", "Return = " & $var & @CRLF & "@Extended = " & $exten) Func _Test() Return SetExtended("String", 5) EndFunc Func _Test2() Return SetExtended("String") EndFunc AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 31, 2013 Moderators Share Posted July 31, 2013 JohnOne, Let me try again: ###Function### SetExtended ###Description### Manually set the value of the @extended macro. ###Syntax### SetExtended ( code [, return value = 1 ] ) ###Parameters### @@ParamTable@@ code The required value (integer) to set into the @extended macro. return value [optional] The value to be returned by the function - defaults to 1 if no parameter used. @@End@@ ###ReturnValue### The return value parameter (default = 1) ###Remarks### When entering a function @extended is set to 0. Unless SetExtended() is called, then @extended will remain 0 when the function ends. This means that in order for @extended to be set after a function returns, it must be explicitly set in the function. This also means you may need to backup the status of @extended in a variable if you are testing it in a While-WEnd loop. @extended is limited between the values of -2147483647 to 2147483647. ###Related### SetError ###Example### @@IncludeExample@@ and this as an example: #include <Constants.au3> $vRet = Example() MsgBox($MB_SYSTEMMODAL, "", "Return value = " & $vRet & @CRLF & "Value of @extended is: " & @extended) Func Example() Return SetExtended(10, "Return value") EndFunc How does that look now? 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 Link to comment Share on other sites More sharing options...
JohnOne Posted July 31, 2013 Share Posted July 31, 2013 (edited) "The value to be returned by the function - defaults to 1 if no parameter used." Well I know what that means, but SetExtended is not always and does not have to be used in that fashion (Return SetExtended(.,.)) Ans so the function (UDF that it is used in) will not return the second parameter. Func _Test() SetExtended(1, 5) EndFunc And essentially, there is no way to determine if SetExtended() fails, and it can with beginners I'm sure EDIT: I'd suggest AU3Check catch an argument that would cause SetExtended to fail. EDIT2: But I suppose that would not work if the argument were a variable. Edited July 31, 2013 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
guinness Posted July 31, 2013 Share Posted July 31, 2013 Would you possibly mind doing the same for SetError? UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
MHz Posted July 31, 2013 Share Posted July 31, 2013 ...Func _Test() SetExtended(1, 5) EndFunc ... You can use it like that and miss out on getting the 5 on return as you will get 0 instead. You need Return to get the return value. This is how to get both Return SetExtended(1, 5) ; or SetExtended(1) Return 5 Link to comment Share on other sites More sharing options...
Recommended Posts