Hawk Posted March 7, 2012 Share Posted March 7, 2012 (edited) I am talking about the functions that I cannot find in the include files. Like DllOpen, PixelSearch, FileRead, etc. so I can make create my own edited functions based on those. But where is the source of those internal functions? Edited March 7, 2012 by Hawk Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 7, 2012 Moderators Share Posted March 7, 2012 Hawk,AutoIt is closed source so the short answer is "you cannot". The longer answer is that that you can download the source of a very old version of AutoIt from here but with the caveat that the current source looks very little like it given the amount of development that has taken place (the last source available is for v3.1.0). 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...
Mat Posted March 7, 2012 Share Posted March 7, 2012 Melba23 is right that you can't see the actual thing... BUT: As a general rule, the AutoIt functions use the standard winapi methods...As a result, with a good knowledge of the winapi, you can work out what functions they were using.DllOpen uses LoadLibraryEx (or just LoadLibrary, or possibly GetModuleHandle if it's already loaded). Similarly DllCall uses GetProcAddress.PixelSearch I'm not sure about, I've never had to look at that sort of stuff, but there are people who have written libraries in C(++). They will use similar (maybe faster?) methods to do the same thing.FileRead will use the normal CreateFile then ReadFile and finally CloseHandle.So as you can see, there is no magic in the AutoIt source code. It does what you'd expect it to. All it does is make it a bit more simple and safe for us. Look at a few of the msdn pages for the functions above, and you could spend 10 minutes deciding what flags you need (particularly things like CreateFile). Having programmed on windows for years I would still not be able to write you winapi programs without msdn handy. AutoIt Project Listing Link to comment Share on other sites More sharing options...
Hawk Posted March 10, 2012 Author Share Posted March 10, 2012 @Mat: Of course we could write all our functions using the WinAPI (I've written in it too for quite some time), but seeing how easy it is in AutoIT and how well everything works (especially because most things you need, are already written, unlike in other languages). So taking something that works good and just changing it to your needs will lead to better results than trying to mime it from scratch. But the answer of M23 astounded me. That's sad, I hope I will not need to change basic functions that often... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 10, 2012 Moderators Share Posted March 10, 2012 Hawk,the answer of M23 astounded meWhy did it astound you? Would you expect MS to make its source available to you because you wanted to amend a particular function in Word to be more to your liking? As AutoIt has been ripped off in the past, the Devs are rightly keen to protect their work from similar behaviour in the future. Personally I do not blame them one little bit. 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...
Mat Posted March 10, 2012 Share Posted March 10, 2012 You wanting the AutoIt source to slightly modify a few functions is overkill. As I've already said, you could rewrite similar things in 20 lines of C. Or 20 lines of AutoIt for that matter. In the AutoIt source code those functions will be a lot longer, and include a lot of stuff for dealing with AutoIt variants etc... So you'd have to learn all that stuff first. You are better off writing a few small AutoIt functions which add a layer on top of the existing functions. AutoIt Project Listing Link to comment Share on other sites More sharing options...
Hawk Posted March 11, 2012 Author Share Posted March 11, 2012 I didn't think from the beginning that such security is a matter to the devs, because AutoIT is freeware. @M23: It astounded me because I have changed already a number of functions and apparantly all of them must have been UDFs without me noticing Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 11, 2012 Moderators Share Posted March 11, 2012 Hawk,I didn't think from the beginning that such security is a matter to the devs, because AutoIT is freewareAnd we are very lucky that it is - but that does not mean that the intellectual effort behind it should also be freely available. As I explained above, the AutoIt source has been ripped off before - which is why it is no longer available. And if you modify some of the UDFs, be careful to read the headers carefully. Certain members only post their code here under license, as is their right, so you need to make sure you respect the conditions. It normally only means adding suitable credit if you use it. 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...
Hawk Posted March 11, 2012 Author Share Posted March 11, 2012 Hmm, I am talking about the UDFs added in AutoIT (listed in the helpfile under "User Defined Functions Reference"), like array or GUI management. Is it necessary for these? Link to comment Share on other sites More sharing options...
JohnOne Posted March 11, 2012 Share Posted March 11, 2012 Hmm, I am talking about the UDFs added in AutoIT (listed in the helpfile under "User Defined Functions Reference"), like array or GUI management. Is it necessary for these?No you were not, you were talking about "DllOpen, PixelSearch, FileRead" it says so in the first post. 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...
Mat Posted March 11, 2012 Share Posted March 11, 2012 Is it necessary for these?As a general rule, in the header there will be an Author...: part and a Modified...: part. You should always leave the original author in tact, and add your name to the modified list. If you are using someone elses code then it's always nice to credit them.In the standard UDF's, there are no additional rules, they are a part of AutoIt. Some user-submitted UDFs do have additional terms though. Some take it more seriously than others. AutoIt Project Listing Link to comment Share on other sites More sharing options...
Hawk Posted March 15, 2012 Author Share Posted March 15, 2012 (edited) No you were not, you were talking about "DllOpen, PixelSearch, FileRead" it says so in the first post.->@M23: It astounded me because I have changed already a number of functions and apparantly all of them must have been UDFs without me noticing "I am talking about..." was related to that post. Please read all posts before writing such a comment.@Mat: Will do! Thanks. Edited March 15, 2012 by Hawk 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