ALisp Re: New file uploaded to AutoItList
"valery_vi" <[email protected]> Tue, 04 Sep 2007 13:00:05 -0000
| Newsgroups | gmane.comp.windows.autoit.user |
|---|---|
| Message-ID | <[email protected]> |
You can also use high-speed find/replace (with regexp) and regex: ".. Performs a Perl Compatible Regular Expression (PCRE) search on str-text with the pattern specified in str-pattern. The same regular expression pattern matching is also supported in the functions directory, find, find-all, parse, replace, and search when using these functions on strings. regex returns a list with the matched strings and substrings and the beginning and length of each string inside the text. If no match is found, it returns nil. The offset numbers can be used for subsequent processing. regex also sets the variables $0, $1, and $2 to the expression and subexpressions found. Just like any other symbol in newLISP, these variables or their equivalent expressions $0, $1, and $2 can be used in other LISP expressions for further processing. " and more... by simple call Dll's function newlispEvalStr. Enjoy, Valery --- In [email protected], "valery_vi" <shehrer1@...> wrote: > > BTW. About random numbers in newLisp: > > You can evaluate this > (random 0 100) > > to get random floating point number from 0.0 to 100.0 > > And this one > (seed (date-value)) > > is guaranteeing a different seed any time the script starts. > > It works for me. > > Valery > > --- In [email protected], "valery_vi" <shehrer1@> wrote: > > > > Hi, > > > > There is a new branch of AutoIt's application: > > AutoLisp based on the following Lisp implementation: > > > > http://newlisp.org/index.cgi?page=Home > > > > ;=================================================== > > ; ALisp by Valery Ivanov, 3 September 2007 > > ;=================================================== > > > > #include <GUIConstants.au3> > > Global $Target, $Result > > Global $Dll = DllOpen("newlisp.dll") > > > > > > $hWnd = GUICreate("ALisp © Valery Ivanov, 3 September 2007", 400, 450) > > ;-------------------------------------------------- > > $LabelTarget = GUICtrlCreateLabel("Your Lisp sample lines:", 10, 40, > > 380, 21) > > $Target = GUICtrlCreateEdit('(+ 3 4)', 10, 70, 380, 100) > > > > ;-------------------------------------------------- > > $LabelResult = GUICtrlCreateLabel("Lisp evaluation: ", 10, 180, 100, 21) > > $Result = GUICtrlCreateEdit('', 10, 210, 380, 200) > > ;-------------------------------------------------- > > $Evaluate = GUICtrlCreateButton("Evaluate", 150, 420, 100, 21) > > GUISetState() > > > > ; Start the main loop > > While 1 > > $Msg = GUIGetMsg() > > Select > > Case $Msg = $GUI_EVENT_CLOSE > > DllClose($Dll) > > Exit > > Case $Msg = $Evaluate > > Evaluate() > > EndSelect > > WEnd > > > > func Evaluate() > > local $TargetContent, $ResultContent > > $TargetContent = GUICtrlRead($Target) > > $ResultContent = DllCall($Dll, "str", "newlispEvalStr", "str", > > $TargetContent) > > GUICtrlSetData($Result,StringTrimRight($ResultContent[0],1)) > > endfunc > > > > DLL lib is in ALisp.zip, too. > > > > Valery > > > > > > --- In [email protected], [email protected] wrote: > > > > > > > > > Hello, > > > > > > This email message is a notification to let you know that > > > a file has been uploaded to the Files area of the AutoItList > > > group. > > > > > > File : /MISC/ALisp.zip > > > Uploaded by : valery_vi <shehrer1@> > > > Description : ALisp script > > > > > > You can access this file at the URL: > > > http://groups.yahoo.com/group/AutoItList/files/MISC/ALisp.zip > > > > > > To learn more about file sharing for your group, please visit: > > > http://help.yahoo.com/help/us/groups/files > > > > > > Regards, > > > > > > valery_vi <shehrer1@> > > > > > >