iamtheky Posted May 1, 2017 Share Posted May 1, 2017 wtf does If your script is going to use an inputbox you must include the pragma directive "#pragma compile(inputboxres, true)" mean? it is certainly not a necessity to add that directive (not even the example in the help file uses it) ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
BrewManNH Posted May 1, 2017 Share Posted May 1, 2017 It does seem to not do anything either set as true or false. I compiled the example script both ways and there wasn't any difference. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
JohnOne Posted April 10, 2018 Share Posted April 10, 2018 click inpitbox in the above code 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...
JohnOne Posted April 10, 2018 Share Posted April 10, 2018 I'm guessing it's a relic. 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...
iamtheky Posted April 10, 2018 Author Share Posted April 10, 2018 1 hour ago, JohnOne said: I'm guessing it's a relic. fair, but even as a relic i have a difficult time believing that statement to have ever been true. Is there a specific build or scenario in which it would cause different behavior? Not that I want to know either in granularity, just a general curiosity. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
JohnOne Posted April 10, 2018 Share Posted April 10, 2018 Here's something https://www.autoitscript.com/trac/autoit/ticket/2976 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...
BrewManNH Posted April 10, 2018 Share Posted April 10, 2018 Whether it's ever been true or not is a moot point, it's not needed now. Unless there was a change in the build somewhere in the past that made that pragma directive no longer needed, unless someone with more knowledge says to change the help file it's going to stay there. It might have been something that was accidentally included that may get changed in the future. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
trancexx Posted April 10, 2018 Share Posted April 10, 2018 What's the problem? Not needed how? If input box is going to be used then add that directive. The only "issue" is the use of imperative sentence, because if the InputBox() function is detected inside the script Aut2Exe does everything by itself. InputBox("AA", "Bb") However, obviously this wouldn't work without the #pragma: Execute('InputBox("AA", "Bb")') ...the last time I checked. Skysnake and iamtheky 1 1 ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
BrewManNH Posted April 10, 2018 Share Posted April 10, 2018 The help file doesn't explain that, it just says you have to use it if you're using an InputBox in your script. Perhaps the help file needs to go into more detail about when to use the #pragma directive. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 10, 2018 Moderators Share Posted April 10, 2018 Hi, This runs fine for me when compiled in 3.3.14.5 without the pragma: #include <MsgBoxConstants.au3> $sRet = InputBox("AA", "Bb") MsgBox($MB_SYSTEMMODAL, "Direct", $sRet) $sRet = Execute('InputBox("CC", "Dd")') MsgBox($MB_SYSTEMMODAL, "Execute", $sRet) Both InputBoxes appear and the returns are displayed. 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...
BrewManNH Posted April 10, 2018 Share Posted April 10, 2018 If you omit this line with the InputBox, the Execute line won't work. $sRet = InputBox("AA", "Bb") If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 10, 2018 Moderators Share Posted April 10, 2018 BrewManNH, You are quite correct - I misunderstood the previous comment. Sorry to all for the confusion. 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...
RTFC Posted April 10, 2018 Share Posted April 10, 2018 The same issue (Execute("inputbox"))was reported in the CodeCrypter thread a while back (thanks again, BrewmanNH). Codecrypter now always adds that #pragma by default, just to be sure any indirect reconstruction (such as decryption of a call to it) can rely on it being supported. My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O Link to comment Share on other sites More sharing options...
Skysnake Posted April 16, 2018 Share Posted April 16, 2018 On 4/10/2018 at 6:00 PM, Melba23 said: #include <MsgBoxConstants.au3> $sRet = InputBox("AA", "Bb") MsgBox($MB_SYSTEMMODAL, "Direct", $sRet) $sRet = Execute('InputBox("CC", "Dd")') MsgBox($MB_SYSTEMMODAL, "Execute", $sRet) Should there be a reference to this in the manual? Or another example? The confusion seems to be with the "Execute" example. Is this deprecated? Skysnake Why is the snake in the sky? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 16, 2018 Moderators Share Posted April 16, 2018 Skysnake, The Help file already states: Quote If your script is going to use an inputbox you must include the pragma directive "#pragma compile(inputboxres, true)" What more do you want? 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...
Skysnake Posted April 16, 2018 Share Posted April 16, 2018 Dear @Melba23 Yes. So it does. And there have been several questions around the Forum as to Why? it states that. Also, the Execute example does not appear in the Help File. I suggest. You decide. Skysnake Why is the snake in the sky? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 16, 2018 Moderators Share Posted April 16, 2018 Skysnake, Quote as to Why? it states that Because a then Dev changed the source code to require the #pragma - but, as we have discovered in this thread, also added something to Aut2Exe to make its addition automatic if the function call was direct. Quote the Execute example does not appear in the Help File Not every usage instance of every function appears in the examples - otherwise the Help file would be several times larger than it already is. There is a clear and unambiguous statement in the Help file telling coders that if they need an InputBox then they need the #pragma as well. Personally, I see no reason to add anything more. M23 Skysnake 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 Link to comment Share on other sites More sharing options...
iamtheky Posted April 22, 2018 Author Share Posted April 22, 2018 (edited) On 4/16/2018 at 6:36 AM, Melba23 said: Not every usage instance of every function appears in the examples - otherwise the Help file would be several times larger than it already is. Think how much larger the helpfile would be if you told the user everything that was required, but that was done for them during compilation. If the original statement is unambiguous, then how is this less ambiguous? "If your script is going to use call inputbox indirectly you must include this pragma directive "#pragma compile(inputboxres, true)" Edited April 22, 2018 by iamtheky tried to format the line and made it worse so stopped... ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 22, 2018 Moderators Share Posted April 22, 2018 iamtheky, I understand the "indirectly" reference - but would everyone, particularly less-experienced coders? I prefer the statement as it is. Anyway I wonder how much is saved by NOT having the InputBox code in the final exe? 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...
iamtheky Posted April 22, 2018 Author Share Posted April 22, 2018 (edited) I dont have the answer, but saying something must happen, without caveat, and then providing an example that does not do what you just said must happen. That's the most unambiguous way we can express that to the user? Edited April 22, 2018 by iamtheky ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
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