cres Posted January 25, 2016 Share Posted January 25, 2016 (edited) Hi! Is there any function in Autoit that gets the number of required/optional parameters of a function (just like how SciTE does it) _TestFunction("param1") Func _TestFunction($p1, $p2, $p3, $p4, $p5) EndFunc When you run the code above, SciTE determines that I called the function with 1 arg but 5 are required (image reference below). Is there a way I could do this or at least could you point me to the right path? Thanks! Edited January 25, 2016 by cres Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 25, 2016 Moderators Share Posted January 25, 2016 cres, As you have the function code in your script, surely you already know the number of required/optional parameters? You can very easily add UserCallTips (the popup that SciTE produces when you enter a function name) for your most commonly used functions using the CallTipManager available in the full SciTE4AutoIt3 package (as well as getting lots of other utilities to help you code in AutoIt). M23 cres 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...
cres Posted January 26, 2016 Author Share Posted January 26, 2016 Hi Melba23, Thanks a lot for your reply! I'm actually interested to know how SciTE does this (determining how many parameters should I pass to a function call) or what's the algorithm for this? Thanks! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 26, 2016 Moderators Share Posted January 26, 2016 cres, I think it is Au3Check that does that particular piece of magic - I will point Jos here as in either case he is the man to answer. 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...
Developers Jos Posted January 26, 2016 Developers Share Posted January 26, 2016 @cres, You are getting that inline error only when you perform Run/Compile or Check on your source. YOu will see in the SciTE output pane the very same information during the execution of au3check, which is interpreted by SciTE and shown in-line. So it is indeed au3check that does the lexing and checking. Jos cres 1 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...
cres Posted January 28, 2016 Author Share Posted January 28, 2016 Hi Jos, Thanks for the clarification about au3check! Link to comment Share on other sites More sharing options...
Gianni Posted January 28, 2016 Share Posted January 28, 2016 Maybe you could be interested also on this post by mLipok, where all functions of a script ar enumerated within an array and one column of the array contains parameters required by each function cres 1 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
cres Posted January 28, 2016 Author Share Posted January 28, 2016 Hi Chimp, That's actually a great function and it shows the algorithm I was looking for. Thanks for the link! 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