erifash Posted October 26, 2005 Share Posted October 26, 2005 Are you tired of this?$ret = DllCall("somedll.dll", "whatever", "function") $ret2 = DllCall("anotherdll.dll", "whatever", $ret[0]) Return $ret2[4]Do you wish you could do this?Return DllCall("anotherdll.dll", "whatever", DllCall("somedll.dll", "whatever", "function")[0])[4]Now you can do fancy DLL stuff all on one line with this function!Func e($aArray, $iElement = 0) Return $aArray[$iElement] EndFuncI keep the name short to minimize the amount of typing you have to do. The function I have created can turn the above code into this:Return e(DllCall("anotherdll.dll", "whatever", e(DllCall("somedll.dll", "whatever", "function"))), 4)The purpose of this function is to minimize the amount of code you have to type if you need quick access to any element in a one-dimensional array. I hope you like it! Comments or questions are greatly appreciated! My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
Celeri Posted October 26, 2005 Share Posted October 26, 2005 Now you can do fancy DLL stuff all on one line with this function!Func e($aArray, $iElement = 0) Return $aArray[$iElement] EndFuncThat's awfully ingenious But I still get to type in the awful .DLL call I am endeavoring, ma'am, to construct a mnemonic circuit using stone knives and bearskins.SpockMy UDFs:Deleted - they were old and I'm lazy ... :)My utilities:Comment stripperPolicy lister 1.07AutoIT Speed Tester (new!) Link to comment Share on other sites More sharing options...
erifash Posted October 26, 2005 Author Share Posted October 26, 2005 Thanks! I type medium-fast while coding so long function names aren't really a problem. My friend types so fast he actually skips letters! My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
w0uter Posted October 26, 2005 Share Posted October 26, 2005 yes i wished i could do that ! did it a long time ago for myself (only it was called r() ) (would be cool if autoit actually made it build-in the way you did it in the 2nd box) and your friend should get a faster keyboard/pc My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
erifash Posted October 26, 2005 Author Share Posted October 26, 2005 (would be cool if autoit actually made it build-in the way you did it in the 2nd box)Yeah, that would be much nicer. Sadly it would just seem too weird for me. My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
AutoItKing Posted October 27, 2005 Share Posted October 27, 2005 Yeah, that would be much nicer. Sadly it would just seem too weird for me. Why would it be weird for you? http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] 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