REMINDER - Stay logged in for at least 2 hours a week to get whitelisted.
Also it helps build a picture where our "good traffic" is coming from for detection scripts.
:o)

AUTOEXEC.BAS explained

STOS programming section.
User avatar
exxos
Site Admin
Site Admin
Posts: 28436
Joined: 16 Aug 2017 23:19
Location: UK

AUTOEXEC.BAS explained

Post by exxos »

This file allows a STOS BAS file to auto execute when STOS loads.

For example rather than having to constantly type in the missing link registration line, this can be done automatically in the AUTOEXEC.BAS .

10 rem register missing link
20 A = mostly harmless (1,2,3,4,5)

However we would still have this file loaded in the editor. What I do is use the PUT KEY command to set up the editor a little bit..

30 put key "mode 1:colour0,0:dir$=drive$+"+chr$(34)+":\"+chr$(34)+":new`"

So now it will automatically switch to medium resolution, I set the background colour to black, the drive is set to the root folder, and the "new" command is run, which obviously clears the editor from the loaded AUTOEXEC.BAS. Noticed the small single quote ":new`" after the words new, which is the equivalent of pressing enter.

chr$(34) is the ASCII code for the double quotation marks. Obviously we cannot use quotation marks twice as PUT KEY needs quotation marks, and we also need quotation marks for the directory select. So the workaround is to use chr$(34).

For example:

Print "hello"
hello


Or we can do:

print chr$(34)+"hello"+chr$(34)
"hello"


To take things little further we can autoload ACB's like the compiler sprite editor automatically..

A complete loader would look something like this..


10 rem exxos auto acb loader
20 rem register missing link..
30 A=mostly harmless(1,2,3,4,5)
40 print "loading ACB.."
50 dir$=drive$+":\ACB"
60 put key "accload"+chr$(34)+"*.acb"+chr$(34)+":mode 1:colour0,0:dir$=drive$+"+chr$(34)+":\"+chr$(34)+":new`"

This will load automatically any ACB file located in the ACB folder.

You can of course change *.acb" to "*.*" to load everything in the folder.. But realistically we do not want to load items we will not use. So I would suggest moving the accessories you do not want to load into a temporary folder elsewhere so they are not loaded automatically.


DOWNLOAD
AUTOEXEC.zip
You do not have the required permissions to view the files attached to this post.

Return to “STOS”

Who is online

Users browsing this forum: CCBot and 0 guests