Akshay07 Posted February 1, 2010 Share Posted February 1, 2010 All in the title.. Any difference between _Myfunction($parm) and Call("MyFunction", $parm)? thanks A. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 1, 2010 Developers Share Posted February 1, 2010 What do you think the difference is? 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...
Akshay07 Posted February 1, 2010 Author Share Posted February 1, 2010 Well, with all due respect, if I am asking, it's because I don't now I would tend to think that there are no difference, except maybe how fast the instruction is run, but this is just a guess. That is mostly why I am asking, I did not manage to find any answer in the autoit help or in this forum (which does not mean that it is not there, I might just have used the wrong keywords). Link to comment Share on other sites More sharing options...
Developers Jos Posted February 1, 2010 Developers Share Posted February 1, 2010 Simple rule of thumb is never to use Call() unless you need to perform a Func of which the name is the value of a variable. So, yes they are the same but don't use Call(). 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...
Akshay07 Posted February 1, 2010 Author Share Posted February 1, 2010 Thanks Jos, I did not know that. I appreciate very much your input. I just checked the "autoit" help for "´Functions" and this is not at all mentioned. I will update my scripts according to your comment. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 1, 2010 Developers Share Posted February 1, 2010 The helpfile does mention it "somewhat" in the page about Call().Call --------------------------------------------------------------------------------Calls a user-defined function contained in a string parameter. 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...
Akshay07 Posted February 1, 2010 Author Share Posted February 1, 2010 (edited) If I may give a constructive comment, this is not very clear It is not mentioned that it is better to use something like _Myfunction($parm) This is not at all a complain, I absolutely love AutoIt and I cannot thank enough all of those who contributed to make this tool so great. I don't know any other free program for Window that is as powerful as AutoIt. And I also cannot thank enough the AutoiIt community here for helping us out so much. Edited February 1, 2010 by Akshay07 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 1, 2010 Moderators Share Posted February 1, 2010 Ashkay07, this is not very clearNothing personal, but the Help file describes Call quite clearly: Call - Calls a user-defined function contained in a string parameter And the overwhelming majority of examples in the Help file use this form of function call: _Main() Func _Main() So it requires a real effort to decide to use Call as a default for calling functions. However, you are not entirely alone as we do get the odd query about it - and that is not playing with words before you ask! 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...
Akshay07 Posted February 1, 2010 Author Share Posted February 1, 2010 (edited) M23, You are right. Thanks to Jos and you for your answers. Edited February 1, 2010 by Akshay07 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