Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / registry commands and cl$

Author
Message
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 13th Jul 2012 13:09 Edited at: 13th Jul 2012 13:16
Hello.

five commands I always left for later:

write to registry
write string to registry
get registry()
get registry$()

cl$

although I know what these commands are about but always left with empty results.

please if someone can give a good explanation supported by examples.

RonsWare
15
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 13th Jul 2012 13:22
Here is an example of the use of the CL$ command.



If you drag a DDS file over the executable it's shows the DDS picture.

Cheers Ron.

Programming is learning
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 13th Jul 2012 14:03
this is supper cool. thanks.

still waiting for registry commands.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 13th Jul 2012 16:38
NICE!

this is interesting, keeping my eyes on this one but how does one begin setting up a registry entry node?

basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 13th Jul 2012 21:38
registry commands allow you to change/add information to your system, changing its security and general values.

you need to know the location of registry folders to use these commands or if you need to change a value, you must know the key associated with it.

Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 13th Jul 2012 22:20 Edited at: 13th Jul 2012 22:22
i didn't know cl$() could be used for "drag over executable" = awesome. that functionality was always something i envied and had on my to-do list to investigate. thanks

otherwise, i'd been using cl$() in conjunction with shortcuts where parameters could be passed into the executable as variables (or one that could be parsed into multiple variable settings).

ie, including the code:


then adding the parameter -win in the shortcut target would cause the .exe to launch in a window vs default fullscreen, etc.



Virtual Nomad @ California, USA . DBPro V7.5
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
Daniel wright 2311
User Banned
Posted: 13th Jul 2012 22:25 Edited at: 13th Jul 2012 22:25
this made my program stop runing,it then told me to close the program,



my signature keeps being erased by a mod So this is my new signature.
RonsWare
15
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 13th Jul 2012 22:36
@Daniel wright did you test it with different DDS files ?
Some DDS formats are not supported bij DBPro.

This program works with tga , jpg etc also.
I think with every image format DBPro uses.


I have tested it before i posted it here.

Its is far from perfect but i can put it to a better version.

Cheers Ron.

Programming is learning
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 13th Jul 2012 22:37
Works perfectly here. Did you use it correctly? For example, did you "compile and execute" in DBPro by mistake?
RonsWare
15
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 13th Jul 2012 22:45
@Green Gandalf
You are right.

It must be a .exe

You can use this to load object , music or what ever you want.

Cheers Ron.

Programming is learning
RonsWare
15
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 13th Jul 2012 22:48
@Virtual Nomad

Your welcome , i just try to make it easy to do this.

Cheers Ron.

Programming is learning
RonsWare
15
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 14th Jul 2012 00:25
Here is a link to some information on Windows Registry.

I am looking at it , and how we can use this.

http://http://en.wikipedia.org/wiki/Windows_Registry


Cheers Ron

Programming is learning
RonsWare
15
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 14th Jul 2012 00:27
Sorry my mistake.
Here is the correct link.

http://en.wikipedia.org/wiki/Windows_Registry

Cheers Ron.

Programming is learning
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 14th Jul 2012 00:36
Quote: "You are right.

It must be a .exe

You can use this to load object , music or what ever you want."


Thanks for pointing us at this feature. You can also make your program the default one that Windows uses to open the file - just right click a typical file then use Open With and browse to your brand new program. Then you can just open your files in the usual way using your custom made application instead of the usual "official" applications.

I'll have to remember this trick (probably should have been aware of this possibility but I wasn't ).
RonsWare
15
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 14th Jul 2012 00:47
@Green Gandalf

I wrote this small program a year ago because windows did not regonize DDS images.

I used DDS images for the Bump Maps in the RonsWare Engine.

You are right about the "Open With" thing window's offers.

This is the way i use this little thing myself.

Cheers Ron

Programming is learning
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 14th Jul 2012 05:01
@ronsware: your code has worked on all formats supported by DBpro. as well, calling a format to open with the exe has caused the image to open within DBpro.

RonsWare
15
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 20th Jul 2012 14:18
@basjak

Thank's for testing the program.

I will take a look in to the registry commands.

Cheers Ron.

Programming is learning
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 21st Jul 2012 02:23
Quote: "You can also make your program the default one that Windows uses to open the file"

... and that's something you can automate by writing to the registry.

However I recall that DBPro can only read from / write to the HKEY_LOCAL_MACHINE folder (or if it possibly was HKEY_CURRENT_USER) which leaves the registry functionality a bit lacking.


"Why do programmers get Halloween and Christmas mixed up?"

Login to post a reply

Server time is: 2026-07-08 10:39:43
Your offset time is: 2026-07-08 10:39:43