Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Accessing the Windows Registry from Rebol/Command

 [1/5] from: dan::rolander::com at: 4-Dec-2000 6:26


I suppose that since no one has replied to any of my inquiries about this that I might be the only one interested in how to access the Windows Registry from Rebol/Command. But I'll post this anyway to possibly help out others some day. Bo/RT had said that I could access the registry using the Win32 API. But he didn't provide any specifics and after much struggling with Advapi32.dll I've given up. There seems to be some trouble either with the routine! datatypes passed to these particular API structures, or with the way Windows wants to modify these values and pass them back to Rebol, or perhaps it's due to my own ignorance of the proper implementation. Either way, Rebol/Command always crashed on me when I attempted this. But I haven't had any problems at all with the Rebol/Command shell interface, so I've decided to take another approach. There is an excellent, and very small (11 kb), Windows executable from the Cygwin collection (http://sources.redhat.com/cygwin/) called regtool.exe that allows reading and writing to and from the registry using the command line. It's very simple to use Rebol/Command to call this executable to access the registry and to return the results back to Rebol. I realize that this type of work defies the cross-platform philosophy of Rebol, but in order for Rebol to be a practical solution to my everyday scripting needs, I have to be able to play outside the Rebol "sandbox". Now if only I could build a Rebol/View GUI front end to a Rebol/Command script, so that I could access external applications from View. Anybody at RT working on this? Dan

 [2/5] from: mat:eurogamer at: 4-Dec-2000 11:45


Heya Dan, DR> I realize that this type of work defies the cross-platform philosophy of DR> Rebol, but in order for Rebol to be a practical solution to my everyday DR> scripting needs, I have to be able to play outside the Rebol "sandbox". If you're using Rebol/Command at all, you've broken cross-platform philosophy so I wouldn't worry about it. I foolishly overwrote my release rebol.exe with the current experimental and started using that to execute scripts. After a few hours of running my IRC bot - rebol.exe stops working and consumes staggering amounts of CPU power. It's done this on two different scripts. Darn. So I'm using Rebol/Command even to run my core stuff. I hope it doesn't have any operational differences outside of the new interfaces... -- Mat Bettinson - EuroGamer's Gaming Evangelist with a Goatee http://www.eurogamer.net | http://www.eurogamer-network.com

 [3/5] from: jeff:rebol at: 4-Dec-2000 6:17


Howdy, Dan:
> Bo/RT had said that I could access the registry using the > Win32 API. But he didn't provide any specifics and after
<<quoted lines omitted: 5>>
> of the proper implementation. Either way, Rebol/Command > always crashed on me when I attempted this.
Huh-- if you could send me your COMMAND registry code off the list (with maybe the respective C function definitions) I'll try to see what's going on in there. You're using the release version of windows COMMAND, right? -jeff

 [4/5] from: jeff:rebol at: 4-Dec-2000 6:58


Howdy, Mat:
> I foolishly overwrote my release rebol.exe with the current > experimental and started using that to execute > scripts. After a few hours of running my IRC bot - > rebol.exe stops working and consumes staggering amounts of > CPU power. It's done this on two different scripts. Darn.
If you can cause this leak with a simple chunk of code (or even a not so simple chunk), please by all means send it in. That will help us fix it the fastest! :) -jeff

 [5/5] from: mat:eurogamer at: 4-Dec-2000 15:31


Heya jeff, jrn> If you can cause this leak with a simple chunk of code (or jrn> even a not so simple chunk), please by all means send it jrn> in. That will help us fix it the fastest! :) You really don't want to see the code :) -- Mat Bettinson - EuroGamer's Gaming Evangelist with a Goatee http://www.eurogamer.net | http://www.eurogamer-network.com

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted