c.haslam Posted June 12, 2018 Share Posted June 12, 2018 (edited) Now you can't write this: $sPath = _CFF_Choose('Choose drive or directory', _ ; $sTitle Default, _ ; $iW Default, _ ; $iH Default, _ ; $iX Default, _ ; $iY '', _ ; $root '*.txt|*.jpg|*.vbs', _ ; $sMask: include|exclude|exclude_folders 2, _ ; $iDisplay: Entire folder tree only - no files. Doubleclicks will expand, not select, item -1, _ ; $iMultiple: Multiple selections using checkboxes $gui _ ; parent ) You can write: $sPath = _CFF_Choose('Choose drive or directory',Default,Default,Default,Default,"",'','*.txt|*.jpg|*.vbs',2,-1,$gui) But it is all too easy to write $sPath = _CFF_Choose('Choose drive or directory',Default,Default,Default,"",'','*.txt|*.jpg|*.vbs',2,-1,$gui) If the function only has 3 or 4 parameters, it is easy enough to keep track of which is which. But if there are more, one ends up counting them, and if you get the count off, you wonder why the function doesn't behave as you expect. You end up wasting time, thinking that your error is complex, when it isn't. This can particularly problematic where a function has optional parameters. When I have a problem, I think of there being too many alligators in my pond. By allowing the format suggested above, one alligator could be no more: the user would not need to depend on his count of parameters to make sure that he has the intended value for a particular parameter. OK, it true that you can now write Local $iW = Default,$iH=Default ... $sPath = _CFF_Choose('Choose drive or directory',Default,Default,Default,Default,$root ... but I find this to be a bit of a pain. I am thinking that adding this feature to AutoIt would be fairly easily. Perhaps I am mistaken. Back when I used Visual Basic, it could handle the format I am suggesting. Thoughts? Edited June 12, 2018 by c.haslam Spoiler CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 12, 2018 Moderators Share Posted June 12, 2018 c.haslam, Quote Now you can't write this: Oh yes you can - I have just tried. Did you? 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...
c.haslam Posted June 12, 2018 Author Share Posted June 12, 2018 I had tried it, but ... You are correct: my code, with nothing else in the script, passes the syntax check. I had something else wrong in my longer script. I had it in my mind that in-statement comments don't work. I was probably doing this: $sPath = _CFF_Choose('Choose drive or directory', ; $sTitle _ Default, ; $iW _ Default, ; $iH _ Default, ; $iX _ Default, ; $iY _ '', ; $root _ '*.txt|*.jpg|*.vbs', ; $sMask: include|exclude|exclude_folders _ 2, ; $iDisplay: Entire folder tree only - no files. Doubleclicks will expand, not select, item _ -1, ; $iMultiple: Multiple selections using checkboxes _ $gui ; parent _ ) Here the _s are taken as part of the comments My error Spoiler CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard Link to comment Share on other sites More sharing options...
c.haslam Posted November 22, 2019 Author Share Posted November 22, 2019 Please reread my wish. This is about running a script, not editing it. Spoiler CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard 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