TheSwamp

Code Red => Visual DCL Programming => AutoLISP (Vanilla / Visual) => OpenDCL => Topic started by: It's Alive! on June 19, 2007, 07:40:33 AM

Title: Beta testers needed for odcl_*ini functions
Post by: It's Alive! on June 19, 2007, 07:40:33 AM
This should behave like doslib’s

Code: [Select]
(odcl_getini "settings" "strings" "c:\\temp\\test.ini" "default")
(odcl_getini "settings" "strings" "c:\\temp\\test.ini")
(odcl_getini "settings" nil "c:\\temp\\test.ini" )
(odcl_getini nil nil "c:\\temp\\test.ini" )

Code: [Select]
(odcl_setini "settings" "strings1" "value1" "c:\\temp\\test.ini")
(odcl_setini "settings" "strings2" "value2" "c:\\temp\\test.ini")
(odcl_setini "settings" "strings3" "value3" "c:\\temp\\test.ini")
(odcl_setini "settings" "strings2" nil "c:\\temp\\test.ini")
(odcl_setini "settings" nil nil "c:\\temp\\test.ini")

Thanks :-)
Title: Re: Beta testers needed for odcl_*ini functions
Post by: owenwengerd on June 19, 2007, 11:50:03 AM
Daniel, INI files can be read and written via lisp, so what is the advantage of writing them in C++?
Title: Re: Beta testers needed for odcl_*ini functions
Post by: It's Alive! on June 19, 2007, 12:12:17 PM
Hi Owen,

An ODCL user requested I put this together,
I suppose this would be up to the community to decide if it finally does become a part of OpenDCL?


Dan
Title: Re: Beta testers needed for odcl_*ini functions
Post by: JohnK on June 19, 2007, 12:43:54 PM
I think a AutoLisp library of ``supported'' or ``recommended'' methods should/could be put together for use instead of `functions'. -i.e. a set of functions is great, but tends to cause steeper learning curves (The Scheme language was kept `simple' for a reason--I say learn from their example).
Title: Re: Beta testers needed for odcl_*ini functions
Post by: It's Alive! on June 19, 2007, 12:56:00 PM
Well it had already been done in a closed source c++ project. It was thought it would be useful in odcl
Window’s WritePrivateProfileString and GetPrivateProfileString are fast and efficient methods of providing this functionality to lisp
Title: Re: Beta testers needed for odcl_*ini functions
Post by: JohnK on June 19, 2007, 01:00:56 PM
Is this for binary write/read?
Title: Re: Beta testers needed for odcl_*ini functions
Post by: It's Alive! on June 19, 2007, 01:06:22 PM
Nope good ol text .INI stuff, This certainly could be done with lisp with a good bit of code
Title: Re: Beta testers needed for odcl_*ini functions
Post by: JohnK on June 19, 2007, 01:17:44 PM
I dont think i totaly understand, but ok.
Title: Re: Beta testers needed for odcl_*ini functions
Post by: Kerry on June 19, 2007, 06:28:22 PM
I asked Daniel if he had this functionality, with a view to adding it to the OpenDCL build.

Sorry for any wasted time I caused you Daniel.

Title: Re: Beta testers needed for odcl_*ini functions
Post by: It's Alive! on June 20, 2007, 01:54:20 AM
Sorry for any wasted time I caused you Daniel.

Not a waste of time, but a pleasurable learning experience and IMO a valuable tool for the lisper’s toolbox.
Title: Re: Beta testers needed for odcl_*ini functions
Post by: JohnK on June 20, 2007, 01:40:12 PM
Despite my initial thought of using a lisp lib proced for this task, i do think this could be a very valuable tool. Also I have a few more questions on this tool.

Can you document the args; i dont use doslib.

What version is this compiled for?

Can we add a feature or two? (like read and write to binary)
Title: Re: Beta testers needed for odcl_*ini functions
Post by: Kerry on June 20, 2007, 05:31:37 PM
.............
Can we add a feature or two? (like read and write to binary)

http://www.theswamp.org/index.php?topic=16949.msg207059#msg207059
Title: Re: Beta testers needed for odcl_*ini functions
Post by: JohnK on June 20, 2007, 05:38:11 PM
*click* ... *gasp!*

Thanx!!
Title: Re: Beta testers needed for odcl_*ini functions
Post by: It's Alive! on June 20, 2007, 09:16:42 PM

Can you document the args; i dont use doslib.

Since the proggy is just calling the Win API methods WritePrivateProfileString and GetPrivateProfileString,
until I get something written up, please checkout
http://msdn2.microsoft.com/en-us/library/ms725501.aspx
and
http://msdn2.microsoft.com/en-us/library/ms724353.aspx


What version is this compiled for?

The arx is compiled for Acad 2007+ , but I can make builds for other versions too if needed
If it does not make it into odcl, I will post versions for Acad 2000 – 2008 and Intellicad.
Title: Re: Beta testers needed for odcl_*ini functions
Post by: JohnK on June 21, 2007, 09:33:33 AM
good'nuff Thanx dude