Zedna Posted January 15, 2014 Posted January 15, 2014 (edited) This small reproducing script shows: Result: 1 from AU3 (Run from full Scite by F5) Result: True from compiled EXE $test = '1 > 0' MsgBox(0,'Output', $test & @CRLF & 'Result: ' & Execute($test)) I think behaviour should be the same from AU3 and EXE. Is it bug? EDIT: My mistake, see post #3 for explanation ... Edited January 15, 2014 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Moderators Melba23 Posted January 15, 2014 Moderators Posted January 15, 2014 Zedna,I get True whether I run from SciTE or the executable with 3.3.10.2 and 3.3.11.2 - what version are you using to run/compile? 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
Zedna Posted January 15, 2014 Author Posted January 15, 2014 (edited) I use these old versions: release: 3.2.12.1 beta: 3.3.7.23 EDIT: Sorry for my mistake! It's not different between AU3/EXE but this way: release: 3.2.12.1 - return 1 from both AU3/EXE beta: 3.3.7.23 - return True from both AU3/EXE EDIT2: So this can be considered just as script breaking change and not bug. Edited January 15, 2014 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Moderators Melba23 Posted January 15, 2014 Moderators Posted January 15, 2014 Zedna,Then the answer is simple - it is not a bug, although it might well have been back in June 2008 and December 2011 when those incredibly outdated versions were released. M23Edit: I have just seen your correction. It is still not a bug now - although it would have been a point to be clarified had you raised this during the 3.3.7.# Beta cycle. 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 January 15, 2014 Posted January 15, 2014 On the current release version (3.3.10.2) I get True whether compiled or run from SciTE. Considering that 3.2.12.1 is nearly 6 years old and 3.3.7.23 is a beta from over 2 years ago, does it really matter any more, also considering that 1 and True are equal in AutoIt? 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 January 15, 2014 Posted January 15, 2014 Why are you using an outdated beta Zedna? 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
Zedna Posted January 15, 2014 Author Posted January 15, 2014 On the current release version (3.3.10.2) I get True whether compiled or run from SciTE. Considering that 3.2.12.1 is nearly 6 years old and 3.3.7.23 is a beta from over 2 years ago, does it really matter any more, also considering that 1 and True are equal in AutoIt? As I said this is only script breaking change and not bug. It can break your old scripts compiled with new AutoIt if results are treated as string. Resources UDF ResourcesEx UDF AutoIt Forum Search
BrewManNH Posted January 15, 2014 Posted January 15, 2014 Where would either of those results end up being a string? 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
Zedna Posted January 15, 2014 Author Posted January 15, 2014 (edited) Why are you using an outdated beta Zedna? I use outdated releease 3.2.12.1 because I used Windows98SE even before few years back and I have many older scripts (my and others) compatible with this version. Also many of my small helper utilities don't need any of new features (edit: and EXE is smaller :-) ). There were so much script breaking changes in later versions that I stopped upgrading of my release and I upgraded only beta version each time with new betas. New bigger projects where I could use some benefits from new features I started in latest beta. But later I started my very big project (at time of beta 3.3.7.23 on my computer) and it's so complicated/big that I didn't want to analyze/repair all later big script breaking changes in such big project so I stopped upgrading also beta versions on my computer. Even more I still use Windows XP (it's 12 years old) on my home computers and also on computers of my relatives, I'm happy with old good XP and I hate new Windows, especially Win8. I use Windows7 at work but I turned OFF UAC completely and switched to Classic mode, so it behaves/looks almost like Windows XP. That's the whole story. EDIT: In the future I want to instal (or copy?) new versions (latest release+beta) to separate folders to be able to run/compile in all old/new release/beta. I have seen some tips on the forum that #AutoIt3Wrapper_Autoit3Dir directive could be good solution for this (more paralel AutoIt versions) ... Edited January 15, 2014 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Zedna Posted January 15, 2014 Author Posted January 15, 2014 (edited) Where would either of those results end up being a string? $result = Execute(...) string($result) Edited January 15, 2014 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
BrewManNH Posted January 15, 2014 Posted January 15, 2014 I know how to turn it into a string, but the question was how would the result of that script turn it into a string on its own? If you're expecting a boolean, don't use String() on the result because then it's not a boolean any longer. 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 January 15, 2014 Posted January 15, 2014 If it says expressions evaluate to 0 or 1 then I guess it could be considered a script breaking change, though I don't know where it says that in the help file. 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
czardas Posted January 15, 2014 Posted January 15, 2014 . . . also considering that 1 and True are equal in AutoIt? ; MsgBox(0, "", String(True) = String(1)) ; I don't see them as being the same, and niether does the interpreter, unless evaluated as numeric. On a side note, using magic numbers can sidestep a few script breaking changes if you are still using older versions of AutoIt. Perhaps this is only of passing interest to most, and I've babbled on about it too much already. operator64 ArrayWorkshop
BrewManNH Posted January 15, 2014 Posted January 15, 2014 I'm not sure what you're saying czardas, because in the initial posts it wasn't using string. 1 and True are equal in AutoIt when compared to each other. It wasn't until the goal posts were moved to include changing them to strings was that brought out. What I wrote, when I wrote it and with the information I had at the time, was 100% correct. 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
czardas Posted January 15, 2014 Posted January 15, 2014 (edited) What I mean to say is that, if the interpreter was to view the values as being equal then, string conversion should not produce a different result. So on the face of it they may both evaluate to one numerically and appear to be being treated as equal values but in reality there is a subtle difference. This interpretation also seems to make sense to me: true being boolean, and not really a number. Hmm, you know this already. Edited January 16, 2014 by czardas operator64 ArrayWorkshop
BrewManNH Posted January 16, 2014 Posted January 16, 2014 That makes no sense at all, a string of the word True is not the same as the keyword True. That would be like comparing these as the same. $string = "some random text" MsgBox(0, "", "$string" = "some random text") 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
czardas Posted January 16, 2014 Posted January 16, 2014 That makes no sense at all, a string of the word True is not the same as the keyword True. Did you think I was implying this? operator64 ArrayWorkshop
BrewManNH Posted January 16, 2014 Posted January 16, 2014 No, you didn't imply it, you stated it right out in plain text. What I mean to say is that, if the interpreter was to view the values as being equal then, string conversion should not produce a different result. How else is that supposed to be read other than saying converting a boolean keyword to a string shouldn't change it's meaning/value? The help file is pretty clear as to what gets converted to what when dealing with booleans. 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
czardas Posted January 16, 2014 Posted January 16, 2014 (edited) Well this is an interesting case. MsgBox(0, "", True = 2) ; This is even more interesting. For $i = 1 To 10 ConsoleWrite((True = $i) & @LF) Next ; So your statement about 1 and True being equal is somewhat misleading. There are differences. I don't see how you made the leap from what I said to your choice of rephrasing. If you pass the same value to String() you should not get different results. That's all I'm saying. Edited January 16, 2014 by czardas operator64 ArrayWorkshop
Richard Robertson Posted January 18, 2014 Posted January 18, 2014 Non-zero integers are considered true in boolean terms. Since true appears first, the equals makes a boolean = boolean comparison.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now