I too have plans aon using this important module.
Steven
Search found 37 matches
- Mon Dec 24, 2007 3:46 pm
- Forum: newLISP and the O.S.
- Topic: COM in newLISP
- Replies: 25
- Views: 29640
- Thu Nov 15, 2007 8:47 pm
- Forum: newLISP in the real world
- Topic: Some help needed coding
- Replies: 16
- Views: 10992
- Thu Nov 15, 2007 3:44 pm
- Forum: newLISP in the real world
- Topic: Some help needed coding
- Replies: 16
- Views: 10992
Thanks Rickyboy for your help. It really opened my eyes to how to code in Newlisp I unserstood from you the value of define and used it in definning a condition that I am checking for. Here is how I did it at the end. I did not wanted to exit the loop but rather just skip blank lines. (define (the-l...
- Thu Nov 15, 2007 3:39 pm
- Forum: newLISP and the O.S.
- Topic: Help with DLL Call
- Replies: 2
- Views: 4537
- Wed Nov 14, 2007 9:14 pm
- Forum: newLISP and the O.S.
- Topic: Help with DLL Call
- Replies: 2
- Views: 4537
Help with DLL Call
I am trying to call a DLL with the following requirements DWORD __stdcall EnumeratePIE(long VID, long *data, long &count) Call EnumeratePIE() once, before doing anything else, to determine a list of available devices. For our uses, always pass our VID of 0x05F3 for the first parameter, so that only ...
- Wed Nov 14, 2007 12:56 pm
- Forum: newLISP in the real world
- Topic: Some help needed coding
- Replies: 16
- Views: 10992
Rickyboy Could you have coded it like this? (catch (letn ((the-line (parse (current-line) {,} 0)) (thepgmcode (int (eval-string (the-line 0)))) (cond ((null? thepgmcode) (throw 'escape)) ) (repl-num ((find thepgmcode not-available-set) (allocate-from is-available-set)) thepgmcode))) (write-line (joi...
- Wed Nov 14, 2007 3:31 am
- Forum: newLISP in the real world
- Topic: Some help needed coding
- Replies: 16
- Views: 10992
- Tue Nov 13, 2007 10:01 pm
- Forum: newLISP and the O.S.
- Topic: COM in newLISP
- Replies: 25
- Views: 29640
- Tue Nov 13, 2007 9:19 pm
- Forum: newLISP in the real world
- Topic: Some help needed coding
- Replies: 16
- Views: 10992
Thanks Lutz, rickyboy Don't know what you mean by this. Can you elaborate? What I mean is do I have to worry about the fact that if I am processing a blank line and I do the parse and find that there is no number in the position where I expected the number to be or if there was a mistake and there w...
- Tue Nov 13, 2007 9:09 pm
- Forum: newLISP and the O.S.
- Topic: COM in newLISP
- Replies: 25
- Views: 29640
- Tue Nov 13, 2007 6:08 pm
- Forum: newLISP and the O.S.
- Topic: COM in newLISP
- Replies: 25
- Views: 29640
m35 The easiest way to do COM is to use Microsoft Scripting Control (like ws4ahk uses). I would like to understand what you are saying. Are you saying that currenlty there is a facility within Newlisp to use Microsoft Scripting Control and then you can access com objects via a scripting language? St...
- Tue Nov 13, 2007 5:49 pm
- Forum: newLISP in the real world
- Topic: Some help needed coding
- Replies: 16
- Views: 10992
rickyboy, thanks for getting back to me.
You wrote
I wrote
Why is "define" more appropriate than "setq"
Steven
You wrote
Code: Select all
(define code-domain (sequence 1 100))
Code: Select all
(setq the-number-list (sequence 1 100) )
Steven
- Mon Nov 12, 2007 1:40 pm
- Forum: newLISP in the real world
- Topic: Some help needed coding
- Replies: 16
- Views: 10992
Thanks all for your help. I was a little sidelined so am finally getting back to this. Here is how I did it. ; this will clean out the numbers that should not be used when loading a table ;---- List of Unavailable Numbers (setq not-available-list (map int (parse ( read-file "test4.txt" ) {\r\n} 0) )...
- Fri Nov 02, 2007 1:02 am
- Forum: newLISP in the real world
- Topic: Some help needed coding
- Replies: 16
- Views: 10992
Some help needed coding
Hi Here is what I am trying to do. I have a file that looks like the following "11","abc","some value" "12","aaa","another value" "13","bbb","next value" What I have to do is 1- read each line 2- check the number in quotes against a list of numbers that should not be used 3- If it does exist in that...
- Sun Jul 29, 2007 4:41 am
- Forum: newLISP and the O.S.
- Topic: Function to create multiple sub directories
- Replies: 2
- Views: 4036
Function to create multiple sub directories
Can someone give me an example of how to code a function that creates multiple sub directories For instance if I pass "c:\firstdir\seconddir\thirddir" to the function and only "c:\" exists, that the code will create "c:\firstdir" and then "c:\firstdir\seconddir" and finally "c:\firstdir\seconddir\th...
- Thu Jun 21, 2007 12:46 pm
- Forum: newLISP in the real world
- Topic: Regex expression
- Replies: 10
- Views: 8569
- Wed Jun 20, 2007 11:47 pm
- Forum: newLISP in the real world
- Topic: Regex expression
- Replies: 10
- Views: 8569
- Wed Jun 20, 2007 11:15 pm
- Forum: newLISP in the real world
- Topic: Regex expression
- Replies: 10
- Views: 8569
Yes, I would like a list from the file of all line that have the "~~" in middle. I would like to return a list of where I have the charachters leading up to the ~~ captured. Example The File --------- Books~~Shelock,Christie Games~~monopoly,sorry a plain line Friends~~David,Bob The list ("Books" "Ga...
- Wed Jun 20, 2007 11:03 pm
- Forum: newLISP in the real world
- Topic: Regex expression
- Replies: 10
- Views: 8569
Thanks newdep
I am looking to put the ~~ into a symbol
so insteadof this
Something like
Steven
I am looking to put the ~~ into a symbol
so insteadof this
Code: Select all
(find-all {.*~~} (read-file {test.txt}) )
Code: Select all
(setq searchstring {~~})
(find-all {.*searchstring} (read-file {test.txt}) )
Steven
- Wed Jun 20, 2007 10:49 pm
- Forum: newLISP in the real world
- Topic: Regex expression
- Replies: 10
- Views: 8569
Regex expression
Code: Select all
(find-all {.*~~} (read-file {test.txt}) )
Steven~~
- Sun Jun 10, 2007 1:02 pm
- Forum: newLISP and the O.S.
- Topic: write-line
- Replies: 16
- Views: 15515
- Fri Jun 08, 2007 7:34 pm
- Forum: newLISP and the O.S.
- Topic: write-line
- Replies: 16
- Views: 15515
newdep, thanks again but I guess I am not to clear.
The solution that I found is
This will cut off the final "\r\n" and rewite the file.
The solution that I found is
Code: Select all
(write-file "myfile" (chop (read-file "myfile") 2) )
- Fri Jun 08, 2007 7:21 pm
- Forum: newLISP and the O.S.
- Topic: write-line
- Replies: 16
- Views: 15515
- Fri Jun 08, 2007 7:10 pm
- Forum: newLISP and the O.S.
- Topic: write-line
- Replies: 16
- Views: 15515
(setq thelistbeingprocessed '("c:\Program Files\Microsoft Office\Office10\EXCEL.EXE" "c:\Program Files\Microsoft Office\Office10\winword.exe" c:\Program Files\Microsoft Office\Office10\xxxx.EXE) (dolist (x thelistbeingprocessed ) (if (file? x) (write-line x out-file) ) So if an item on the list exi...
- Fri Jun 08, 2007 6:56 pm
- Forum: newLISP and the O.S.
- Topic: write-line
- Replies: 16
- Views: 15515
newdep thanks, here is the general flow of the code (dolist (x thelistbeingprocessed ) (if (file? x) (write-line x out-file) ) process a list of files that if they exist then write them out into a file. So if there are only 2 items on the list that exist on the computer it the new file should have 2...