piccaso Posted November 1, 2004 Share Posted November 1, 2004 Take a look at http://www.autoitscript.com/fileman/users/public/piccaso/_regex.zipexample insideTake a look at _regex.txt if you dont know howt to write a regex mask...Have fun CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
Matt @ MPCS Posted November 1, 2004 Share Posted November 1, 2004 That's great, piccaso! You may want to collaborate with Nutster, because he is writing native RegEx commands for use in AutoIt. I think you could compliment each other's work well. *** Matt @ MPCS Link to comment Share on other sites More sharing options...
piccaso Posted November 1, 2004 Author Share Posted November 1, 2004 oh no!i didnt know that nativ reglular expressions where in development.no i'm no genius, here is the source for _regex.dll#COMPILE DLL #TOOLS OFF #OPTION VERSION3 ' Windows NT3 and up (NT4/2K/95/98/ME/XP) FUNCTION Regexp ALIAS "Regexp" ( _ regexmask AS ASCIIZ PTR, _ regexmain AS ASCIIZ PTR, _ regexstart AS LONG, _ BYREF regexipos AS LONG, _ BYREF regexilen AS LONG _ ) EXPORT AS STRING regexipos = 0 regexilen = 0 REGEXPR @regexmask IN @regexmain AT regexstart TO regexipos , regexilen END FUNCTIONJust using Regex from power basic, nothing special.I nedded Regular Expressions so i found a way...i just took a peek into nutsters thread in the dev forum, you just cant compare nutsters work to mine ... CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
Nutster Posted November 1, 2004 Share Posted November 1, 2004 I just took a peek into Nutster's thread in the dev forum. You just cant compare Nutster's work to mine ...<{POST_SNAPBACK}>So yours is sooo much better, is that it? I will see what is in the .zip file and see if I can use any of the ideas, but I am trying to get what I have right now working first. More ideas get implemented later. David NuttallNuttall Computer Consulting An Aquarius born during the Age of Aquarius AutoIt allows me to re-invent the wheel so much faster. I'm off to write a wizard, a wonderful wizard of odd... Link to comment Share on other sites More sharing options...
piccaso Posted November 2, 2004 Author Share Posted November 2, 2004 @Nutsteryou dont get the point (or its my bad english) my work (_regexp.dll) was easy done.but you are implementing native regular expressions, i dont even know where to start when it comes to parsing the pattern i doubt that my code can inspire you.but you could take a look at pcre (Perl Compatible Regular Expressions) , i think its open source (Search sf.net for it) or the source of the ereg* functions of php...Were not having a contest here.My implementation might be Fast, Stable and Ready to use but i'm sure you will catch up soon.And even if i spend time working on it it will never be native and will hang around in a dll forever ... :"> CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
Matt @ MPCS Posted November 2, 2004 Share Posted November 2, 2004 @picasso I understand that you aren't trying to compete with Nutster, but what you did is still a useful implementable solution. Be proud of your accomplishment. There is a lot to be said about making advanced functionality external instead of embedding everything nativly. If I write a basic automation script why should I take the performance and resource hit of a RegEx parser? I am not trying to diminish the importance of Nutsters work at all but it is still pretty spectacular having the functionality. This is the true strength of having DllCall in AutoIt. Scalabilty is a key feature looked for in languages today whether for scripting or compilation. You provided a single example of how to do things without begging the developers for it. Good Job! *** Matt @ MPCS Link to comment Share on other sites More sharing options...
piccaso Posted November 2, 2004 Author Share Posted November 2, 2004 I am proud. This is the first dll i ever wrote Thanks for the Flowers Matt CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
piccaso Posted November 2, 2004 Author Share Posted November 2, 2004 Updated !added a new function: _EnumWindowsTitles()i decided to make this dll (+wrapper) a function toolbox to aid in finding Window Names/Handles using Regular expressions on Window Title or Text and pidsnext step will be a function Returning Window Names and Pids.function is done, just have to find a way to pass it back to autoiti'm stuck with titles for now, the api returns numeric (DWORD) representation of hWnd any idea how to translate ? (just hex()ing them doesent work )My implementation might be Fast, Stable and Ready to useThis only stands for the Regexp function CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
piccaso Posted November 2, 2004 Author Share Posted November 2, 2004 i did it now you can get a nice list like 1 Pid: 1360 Title: Startmenü 2 Pid: 1360 Title: SysFader 3 Pid: 672 Title: NetDDE Agent 4 Pid: 1212 Title: AutoIt v3 5 Pid: 1556 Title: C:\Programme\AutoIt3\projekte\Dll\Regex\_regexp.au3 - SciTE [3 of 3] 6 Pid: 1112 Title: AutoIt Forums -> Antwort zum Thema: Regular Exp[b][/b]ressions - Mozilla Firefox 7 Pid: 1360 Title: C:\Programme\AutoIt3\projekte\Dll\Regex 8 Pid: 1100 Title: C:\WINDOWS\system32\cmd.exe 9 Pid: 1112 Title: Downloads 10 Pid: 1588 Title: PowerBASIC Compiler for Windows IDE - [C:\Programme\AutoIt3\projekte\Dll\Regex\_regexp.bas] 11 Pid: 1588 Title: Super Utilities 12 Pid: 1112 Title: Java Sys Tray 13 Pid: 1112 Title: theAwtToolkitWindow ... ... ... example use included source of dll included this time (forgot bevore) CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
tuape Posted November 2, 2004 Share Posted November 2, 2004 i did it now you can get a nice list like1 Pid: 1360 Title: Startmenü 2 Pid: 1360 Title: SysFader 3 Pid: 672 Title: NetDDE Agent 4 Pid: 1212 Title: AutoIt v3 5 Pid: 1556 Title: C:\Programme\AutoIt3\projekte\Dll\Regex\_regexp.au3 - SciTE [3 of 3] 6 Pid: 1112 Title: AutoIt Forums -> Antwort zum Thema: Regular Exp[b][/b]ressions - Mozilla Firefox 7 Pid: 1360 Title: C:\Programme\AutoIt3\projekte\Dll\Regex 8 Pid: 1100 Title: C:\WINDOWS\system32\cmd.exe 9 Pid: 1112 Title: Downloads 10 Pid: 1588 Title: PowerBASIC Compiler for Windows IDE - [C:\Programme\AutoIt3\projekte\Dll\Regex\_regexp.bas] 11 Pid: 1588 Title: Super Utilities 12 Pid: 1112 Title: Java Sys Tray 13 Pid: 1112 Title: theAwtToolkitWindow ... ... ...example use includedsource of dll included this time (forgot bevore)<{POST_SNAPBACK}>This is a very good example how to add functionality to AutoIt with your favourite language. There is no need to include everything as internal function. Maybe we will start sharing UDF's and also dll's in 'Scripts & scraps' section? God I love dllCall and the possibilities that come with it...Good work! Link to comment Share on other sites More sharing options...
Marc Posted November 3, 2004 Share Posted November 3, 2004 Just a small suggestion: perhaps you could add the lincecount-function into this library. Sorry, forgot the exact name of the command and have no access to PB here...something like CountLines, LineCount or such. Returns simply the number of lines which a given file contains, and it is of course somewhat faster than the UDF function Best regards, Marc Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL) Link to comment Share on other sites More sharing options...
piccaso Posted November 4, 2004 Author Share Posted November 4, 2004 The window functions where useless... (removed) you can use GetWindow and GetWindowThreadProcessId directly from autoit using dllcall... (kept a copy http://www.autoitscript.com/fileman/users/public/piccaso/_regexp.old.zip)upxed the dll, its only 6kb now @marcdo you mean FILESCAN ?... probably, it counts lines quickly i dont think it fits in here.im working on a lib containing md5,rc4 and base64 functions which will be done soon, i'll append it there if you want, or do you want it in a seperate dll ?@nutsterstill pissed? CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
trids Posted November 4, 2004 Share Posted November 4, 2004 [..]@nutsterstill pissed? <{POST_SNAPBACK}>(((( .. i think he was just kidding with you )))) Link to comment Share on other sites More sharing options...
this-is-me Posted November 4, 2004 Share Posted November 4, 2004 Please have the md5 in a separate dll... Who else would I be? Link to comment Share on other sites More sharing options...
piccaso Posted November 4, 2004 Author Share Posted November 4, 2004 @marchttp://www.autoitscript.com/fileman/users/public/piccaso/linecount.zip@this-is-meof course, md5 alone would add ~13kb to the dll ... CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
this-is-me Posted November 5, 2004 Share Posted November 5, 2004 Sorry, I didn't make myself clear... I would like to see the md5 and only the md5 in a dll by itself. Is that possible? Who else would I be? Link to comment Share on other sites More sharing options...
Marc Posted November 5, 2004 Share Posted November 5, 2004 (edited) @piccaso thanx :"> Edited November 5, 2004 by Marc Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL) Link to comment Share on other sites More sharing options...
piccaso Posted November 5, 2004 Author Share Posted November 5, 2004 @this-is-me sure, its possible, allready did this one, i'll upload it when i get home... @marc what udf did you use? i'd like to compare... CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
piccaso Posted November 5, 2004 Author Share Posted November 5, 2004 @this-is-mehttp://www.autoitscript.com/fileman/users/public/piccaso/md5.dlluse it like$r = DllCall("md5.dll", "str", "GetMD5FromFile", "str","C:\windows\regedit.exe")or$r = DllCall("md5.dll", "str", "GetMD5FromString", "str","lol")$r[0] will be the hashGetMd5FromFile doesent check if file is accessable.if file access fails it returns a hash of an empty string (d41d8cd98f00b204e9800998ecf8427e)dont know how long the string can be that is passed to GetMD5FromString, but let me know if you find out... CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
this-is-me Posted November 6, 2004 Share Posted November 6, 2004 Thanks, piccaso. Who else would I be? 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