TGC Codebase Backup



Shortcut command line by DarkSin

20th Aug 2004 1:14
Summary

This is a small quick detail of the wonderfull use of CL$().



Description

Pretty self explanitory. Anything retreived by CL$ is a string so its best to always treat it as such with str$().

Now that you have all that in you have to create a shortcut. Of course have it pointing towards the exe and at the end of it all put -1, -2, -3, OR -4. They wont work all togehter, has to be one or the other. The only downfall of this is the fact you have to use the shortcut to see the effect, other then that its a handy tool.

If you need more help or just dont think this explains it enough go ahead and email me.



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    `++++++++++++++++++++++++++++++++++
`+        Example Code by:        +
`+             DarkSin            +
`+     webmaster@redgaming.net    +
`+       URHERE.redgaming.net     +
`++++++++++++++++++++++++++++++++++

`Set Window Size
if cl$() = str$(-1)
set window on
set display mode 800,600,32
endif

if cl$() = str$(-2)
set window on
set display mode 1024,768,32
endif

if cl$() = str$(-3)
set window off
set display mode 800,600,32
endif

if cl$() = str$(-4)
set window off
set display mode 1024,768,32
endif

`Set Window Text
if cl$() = str$(-1)
set window title "Window: On, Width: 800, Height: 600, Depth: 32"
endif

if cl$() = str$(-2)
set window title "Window: On, Width: 1024, Height: 768, Depth: 32"
endif

if cl$() = str$(-3)
set window title "Window: Off, Width: 800, Height: 600, Depth: 32"
endif

if cl$() = str$(-4)
set window title "Window: Off, Width: 1024, Height: 768, Depth: 32"
endif

`Set Print Text
if cl$() = str$(-1)
print "Window Mode On"
print "Screen Width: 800"
print "Screen Height: 600"
print "Screen Depth: 32"
endif

if cl$() = str$(-2)
print "Window Mode On"
print "Screen Width: 1024"
print "Screen Height: 768"
print "Screen Depth: 32"
endif

if cl$() = str$(-3)
print "Window Mode Off"
print "Screen Width: 800"
print "Screen Height: 600"
print "Screen Depth: 32"
endif

if cl$() = str$(-4)
print "Window Mode Off"
print "Screen Width: 1024"
print "Screen Height: 768"
print "Screen Depth: 32"
endif

wait key