Search found 37 matches

by SHX
Mon Dec 24, 2007 3:46 pm
Forum: newLISP and the O.S.
Topic: COM in newLISP
Replies: 25
Views: 29640

I too have plans aon using this important module.

Steven
by SHX
Thu Nov 15, 2007 8:47 pm
Forum: newLISP in the real world
Topic: Some help needed coding
Replies: 16
Views: 10992

:-)
just learning. thanks for your help and direction.
by SHX
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...
by SHX
Thu Nov 15, 2007 3:39 pm
Forum: newLISP and the O.S.
Topic: Help with DLL Call
Replies: 2
Views: 4537

Thanks Lutz,

I didn't realize that there was stuff in the documentation.
by SHX
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 ...
by SHX
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...
by SHX
Wed Nov 14, 2007 3:31 am
Forum: newLISP in the real world
Topic: Some help needed coding
Replies: 16
Views: 10992

Thanks rickyboy.
by SHX
Tue Nov 13, 2007 10:01 pm
Forum: newLISP and the O.S.
Topic: COM in newLISP
Replies: 25
Views: 29640

Thanks, now I see.

It would be great if someone would develop such a wrapper.
by SHX
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...
by SHX
Tue Nov 13, 2007 9:09 pm
Forum: newLISP and the O.S.
Topic: COM in newLISP
Replies: 25
Views: 29640

However, by creating a newLISP interface to it
m35,

Excuse my ignorance but does that mean that the interface to the Microsoft Scripting Control can be written in Newlisp script by interfacing with the dll or does it mean some sort of external interface in c or something.

Steven
by SHX
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...
by SHX
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

Code: Select all

(define code-domain (sequence 1 100))
I wrote

Code: Select all

(setq the-number-list  (sequence 1 100) )
Why is "define" more appropriate than "setq"

Steven
by SHX
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) )...
by SHX
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...
by SHX
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...
by SHX
Thu Jun 21, 2007 12:46 pm
Forum: newLISP in the real world
Topic: Regex expression
Replies: 10
Views: 8569

Now I understand.

Thanks rickyboy.


Steven
by SHX
Wed Jun 20, 2007 11:47 pm
Forum: newLISP in the real world
Topic: Regex expression
Replies: 10
Views: 8569

newdep thanks for your help.


rickyboy thanks it gives me exactly what I am looking for.

How does the 2 changes you made, work to give me what I was looking for?

(find-all (append {(.*)} searchstring) {Books~~Shelock,Christie} $1)
by SHX
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...
by SHX
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

Code: Select all

(find-all {.*~~} (read-file {test.txt}) )
Something like

Code: Select all

(setq searchstring {~~})
(find-all {.*searchstring} (read-file {test.txt}) )


Steven
by SHX
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}) )
Can someone give me an example of how to code the above with a symbol containing the
~~
Steven
by SHX
Sun Jun 10, 2007 1:02 pm
Forum: newLISP and the O.S.
Topic: write-line
Replies: 16
Views: 15515

Jeff,

Thanks, exactly what I was looking for.

Steven
by SHX
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

Code: Select all

(write-file "myfile" (chop (read-file "myfile") 2) )
This will cut off the final "\r\n" and rewite the file.
by SHX
Fri Jun 08, 2007 7:21 pm
Forum: newLISP and the O.S.
Topic: write-line
Replies: 16
Views: 15515

That is what i am doing.

And the write-line puts "\r\n" at the end of each line which is good until it writes the last line which should not have the "\r\n"

Thanks again for your help.
by SHX
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...
by SHX
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...