Moderators Melba23 Posted April 15, 2016 Moderators Share Posted April 15, 2016 stamplin, Quote I am sure nobody of you tried what I wrote in #14 I did - and I get the same result as you. But the difference in behaviour between the version run from SciTE and after compilation is easily explained by this line taken from the Help file: Quote When this function is used from a non-compiled script, a copy operation is performed instead (to allow for easy testing pre-compilation). So when run from SciTE you just copy the files and all works as you expect. When compiled the code will use the "proper" FileInstall code to create the files and that appears (as you have correctly pointed out) to ignore a subsequent FileInstall on the same line. If you find this a serious problem I suggest you open a BugTracker ticket (look in the menu at the top of the page) so that it can be looked at during the next development period. 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...
stamplin Posted April 15, 2016 Author Share Posted April 15, 2016 Thank you, thank you, thank you, that you really tried it. I think it is not that important but it is strange for me. It is used as a normal function so why I can not use so many functions as I want in the same line. Many people did not understand this. Only that was my problem. If it is not possible because of the design or something else there should only be a little hint in the documentation to prevent threads like this. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 15, 2016 Developers Share Posted April 15, 2016 You are correct there some strange behavior with that. try added a 1 for parameter 3 in FileInstall() and it probably will work. Fact remains that you shouldn't be doing it this way whatever you say, so simply split it up into 2 separate fileinstall's to ensure they are both performed. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 15, 2016 Developers Share Posted April 15, 2016 (edited) 2 hours ago, Melba23 said: If you find this a serious problem I suggest you open a BugTracker ticket Please don't as there were already a couple as I indicated earlier in this thread. Even though there is something strange happening, I don't see any reason spending time on it as there is a flaw in that approach. 2 hours ago, stamplin said: Many people did not understand this. I've understood you from the very first post but I am wondering if you understood me when I posted the example that the approach is fundementally wrong? Jos Edited April 15, 2016 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
stamplin Posted April 15, 2016 Author Share Posted April 15, 2016 13 minutes ago, Jos said: I've understood you from the very first post but I am wondering if you understood me when I posted the example that the approach is fundementally wrong? Yes, fundementally it is wrong and a very bad style to code like that you are right. It was important for me to show there is something strange with this function. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 15, 2016 Developers Share Posted April 15, 2016 Do you see the same behavior when using the overwrite setting? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
stamplin Posted April 15, 2016 Author Share Posted April 15, 2016 1 hour ago, Jos said: Do you see the same behavior when using the overwrite Setting? I tried it and I got the same behavior with the overwrite. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 15, 2016 Developers Share Posted April 15, 2016 4 hours ago, stamplin said: One more I have to say: $res = FileInstall("a.txt", "a2.txt") + FileInstall("b.txt", "b2.txt") executed as not compiled version: value of $res = 2 executed as compiled version: value of $res = 1 Just try it, please try it. This is not normal, but nobody believe me. Now you can close it I said my part. What do you get in the log when you run this script from SciTE and compiled : FileDelete("log.txt") ; FileDelete("a.txt") FileDelete("b.txt") FileWrite("a.txt","test a") FileWrite("b.txt","test b") FileDelete("a2.txt") FileDelete("b2.txt") $res = FileInstall("a.txt", "a2.txt") + FileInstall("b.txt", "b2.txt") FileWriteline("log.txt",'$res = ' & $res ) ;### Debug Console FileDelete("a2.txt") FileDelete("b2.txt") $res = FileInstall("a.txt", "a2.txt") $res += FileInstall("b.txt", "b2.txt") FileWriteline("log.txt",'$res = ' & $res) I get this for both: $res = 2 $res = 2 Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 15, 2016 Developers Share Posted April 15, 2016 mmm but this gives 1 FileDelete("log.txt") ; FileDelete("a.txt") FileDelete("b.txt") FileWrite("a.txt", "test a") FileWrite("b.txt", "test b") FileDelete("a2.txt") FileDelete("b2.txt") $res = FileInstall("a.txt", "a2.txt") + FileInstall("b.txt", "b2.txt") FileWriteline("log.txt",'$res = ' & $res ) ;### Debug Console Guess we can conclude that you shouldn't put it on one line. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
stamplin Posted April 15, 2016 Author Share Posted April 15, 2016 1 hour ago, Jos said: What do you get in the log when you run this script from SciTE and compiled : FileDelete("log.txt") ; FileDelete("a.txt") FileDelete("b.txt") FileWrite("a.txt","test a") FileWrite("b.txt","test b") FileDelete("a2.txt") FileDelete("b2.txt") $res = FileInstall("a.txt", "a2.txt") + FileInstall("b.txt", "b2.txt") FileWriteline("log.txt",'$res = ' & $res ) ;### Debug Console FileDelete("a2.txt") FileDelete("b2.txt") $res = FileInstall("a.txt", "a2.txt") $res += FileInstall("b.txt", "b2.txt") FileWriteline("log.txt",'$res = ' & $res) I get this for both: $res = 2 $res = 2 Jos The same here. 1 hour ago, Jos said: mmm but this gives 1 FileDelete("log.txt") ; FileDelete("a.txt") FileDelete("b.txt") FileWrite("a.txt", "test a") FileWrite("b.txt", "test b") FileDelete("a2.txt") FileDelete("b2.txt") $res = FileInstall("a.txt", "a2.txt") + FileInstall("b.txt", "b2.txt") FileWriteline("log.txt",'$res = ' & $res ) ;### Debug Console Guess we can conclude that you shouldn't put it on one line. Jos And the same here, too. 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