SBASIC Programming
Re: SBASIC Programming
Why not just use WMON ,x, y instead of all those lines of code?
Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
Re: SBASIC Programming
Sorry can't remember, why I wrote this. BUT: I remember there was a problem (don't know what). BTW: Is it possible with WMON to set the top left corner of the screen (was not possible on a BBQL and TK2, as it has had only 512x256).pjw wrote: Wed Dec 25, 2024 11:36 pm Why not just use WMON ,x, y instead of all those lines of code?
Edit: Found it :-)
With WMON x,y the colors (and eventually borders) of the windows are not set. This can look horrible.
http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX

Re: SBASIC Programming
Im not sure what you mean..ql_freak wrote: Thu Dec 26, 2024 1:46 am <> BTW: Is it possible with WMON to set the top left corner of the screen (was not possible on a BBQL and TK2, as it has had only 512x256). <>
When programs, like the recent Christmas tree one, messes up my screen (myEdit: Found it
With WMON x,y the colors (and eventually borders) of the windows are not set. This can look horrible.
gripe with that kind of programming is one of the purposes of this thread)
then I come prepared with a hotkey ALT+B, defined in my boot sequence:
Code: Select all
ERT HOT_KEY('B', "CLOSE:PAPER#0;0:INK#0;4:PAPER 2:INK
7:PAPER#2;7:INK#2;2:WMON ,512,0:CLS#0:CLS:CLS#2" & CHR$(10))
Note this code is all on one line! It presumes TK2+EE or SMSQ/E. (EE =
Extended Environment = PE + hotkey system.)
However, I wouldnt normally expose my system console to the vagaries of
incidental programs I try out. Us lucky SMSQ/E users have the luxury of
daughter SBASICS. So I have another set of hotkeys to start up an SBASIC of
512x256a0x0, which is used for such cases. Thus, when the rogue program has
run its course, I just type QUIT:
Code: Select all
ERT HOT_THING(CHR$(236), 'SBASIC'): REMark F2 = New SBasic
ERT HOT_PICK(CHR$(238), 'SBASIC'): REMark Shift+F2 = Pick SBasic
not to cover it, therefore my system console is defined by, and restored
with, the following hotkey command (again: all one line!):
Code: Select all
ERT HOT_KEY('b',
"OUTLN#0,512,242,SCR_XLIM-512,14:WINDOW#0;512,62,SCR_XLIM-512,194:BORDER#0-
;1,255:WINDOW#1;256,178,SCR_XLIM-256,14:BORDER#1;1,255:WINDOW#2,256,178,SC-
R_XLIM-512,14:BORDER#2;1,255:CLS#0:CLS#1:CLS#2" & CHR$(10))
on the RHS below the button frame. I could probably have made this more
compact and elegant. However, like so many of us, I wrote this a long time
ago, under different conditions, and have forgotten the reasons for the
decisions made at the time.
There may well be better ways of doings things, also there is the question
of taste.. I dont use any BASIC consoles for programming, except perhaps to
try out some expression or function, so the slightly smaller window is no
loss.
Anyone loading EasyPointer's toolkit ptrmen_cde has access to the command
WMOV. Type that in any SBASIC window to move the window anywhere on screen.
WMOV can be used in BASIC programs too, no need to go full PE to use it,
just call it as any other program function.
For those not yet familiar with SMSQ/E or the Extended Environment there
are two other hot things I find quite handy:
Code: Select all
ERT HOT_THING('z', 'Button_Sleep')
program is "put to sleep", or buttonised. Works with any type of program!
Useful to find buried windows or just clear away some clutter.
The other is:
Code: Select all
ERT HOT_THING('=', 'Button_Pick')
the top like a menu.
I dont know who invented this kind of functionality. I cant remember
anything half as useful in Windows back in the day, let alone Linux. Mac,
perhaps? From the little Ive gleaned of other people's setups, It doesnt
seem to have arrived on a lot of QL desktops yet either..
Merry Christmas!
Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
Re: SBASIC Programming
Agree - in most setups I've seen, the potential of the Hotkey System is just about scratched, if at all (and I would absolutely not claim that my own one couldn't be improved a lot). You can make your QL life so much easier with a few hotkeys.pjw wrote: Thu Dec 26, 2024 12:26 pm
I dont know who invented this kind of functionality. I cant remember
anything half as useful in Windows back in the day, let alone Linux. Mac,
perhaps? From the little Ive gleaned of other people's setups, It doesnt
seem to have arrived on a lot of QL desktops yet either..
Merry Christmas!
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: SBASIC Programming
Sorry, I messed up the first code snippet as I had tried to edit it to a comply with a more standard usage than I expect my own is. It should be (or could be):
Lesson (re)learned: However small the change, always test any code after editing before posting! <slaps wrist> (<Ouch!>)
Code: Select all
ERT HOT_KEY('B', "CLOSE:PAPER#0;0:INK#0;4:PAPER 2:INK 7:PAPER#2;7:INK#2;2:WMON 4:CLS#0:CLS:CLS#2" & CHR$(10))
Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
Re: SBASIC Programming
Im glad you agree! I wonder how many others do. Perhaps many are just mystified, or think it too complicated, or are too uncurious to even try, or have tried but simply dont like it.. Or maybe they know something far superior that we've never even heard of or are too dumb to understand..tofro wrote: Thu Dec 26, 2024 2:49 pm <>
Agree - in most setups I've seen, the potential of the Hotkey System is just about scratched, if at all (and I would absolutely not claim that my own one couldn't be improved a lot). You can make your QL life so much easier with a few hotkeys.
Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
-
- Font of All Knowledge
- Posts: 4684
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: SBASIC Programming
Hi,
Most of the HOTKEY definitions to suspend running tasks, select the ButtonFrame, as detailed in the QPAC2, QPTR manuals.
The example boot files supplied with QPAC2, detail a lot of the use of Hotkeys and Buttons.
The Extended Environment (EE) is a very misunderstood environment, often compared to Windows and other GUI systems, which is a totally different systems. There is some critricism of EE, of how bad if looks in relation to something GEM or Workbench. But how many Amiga experts actually understand Institution...
I would rather have EE than the other GUI systems that need Megabytes of memory and disk space, where as 640Kb ram gives a reasonable good GUI based system, that is easy to understand.
Most of the HOTKEY definitions to suspend running tasks, select the ButtonFrame, as detailed in the QPAC2, QPTR manuals.
The example boot files supplied with QPAC2, detail a lot of the use of Hotkeys and Buttons.
The Extended Environment (EE) is a very misunderstood environment, often compared to Windows and other GUI systems, which is a totally different systems. There is some critricism of EE, of how bad if looks in relation to something GEM or Workbench. But how many Amiga experts actually understand Institution...
I would rather have EE than the other GUI systems that need Megabytes of memory and disk space, where as 640Kb ram gives a reasonable good GUI based system, that is easy to understand.
Last edited by Derek_Stewart on Fri Dec 27, 2024 6:58 am, edited 1 time in total.
Regards,
Derek
Derek
- XorA
- Site Admin
- Posts: 1625
- Joined: Thu Jun 02, 2011 11:31 am
- Location: Shotts, North Lanarkshire, Scotland, UK
Re: SBASIC Programming
No idea what that is, but Intuition was really easy. But I think you are talking on different levels, Intuition is widget based, as far as I can see the PE is more like X11 and window based!But how many Amiga experts actually understand Institution
-
- Font of All Knowledge
- Posts: 4684
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: SBASIC Programming
yes sorry, there is widget based system on the QL, I mean QPAC2, ProWesS is not the same thing.XorA wrote: Thu Dec 26, 2024 6:48 pmNo idea what that is, but Intuition was really easy. But I think you are talking on different levels, Intuition is widget based, as far as I can see the PE is more like X11 and window based!But how many Amiga experts actually understand Institution
Regards,
Derek
Derek
Re: SBASIC Programming
What the QL scene lacks is a good manual for those new to anything other than the most basic BBQL.
And there are plenty of new users from the retro community in general now, not to mention returnees to the scene.
What documentation exists is often fragmented into several places and light on good clear examples. As one of the most prominent QL websites, mine generates the same old questions all the time despite all the answers (or the vast majority) already being on my site or the Forum. There are times when I could kill that "Contact Me" message form. Most of tonight went answering the build-up of messages which came in from about mid December to now which I didn't feel up to answering while I was ill.
We have so many varieties of QL expansions, QL-compatibles and emulations (not to mention filing systems) it tends to be harder now for people to understand anything other than the system in front of them. Personally, I'm amazed that so many people use MDV-based systems, not just QL microdrives but MDV emulations, be they emulators or SD card systems, not to mention ancient systems like ICE.
It really needs someone to write a "QL Manual Version 2" covering the diverse directions QL systems can go in these days. Quick list :
It'll probably end up being at least the size of the SuperBasic Reference Manual!
As ever, the problem is TIME. I've not written much QL software at all this year simply because I've been so busy. Despite being early-retired (my formal retirement is end of next year) I seem to have less time on my hands than I ever did
.
And there are plenty of new users from the retro community in general now, not to mention returnees to the scene.
What documentation exists is often fragmented into several places and light on good clear examples. As one of the most prominent QL websites, mine generates the same old questions all the time despite all the answers (or the vast majority) already being on my site or the Forum. There are times when I could kill that "Contact Me" message form. Most of tonight went answering the build-up of messages which came in from about mid December to now which I didn't feel up to answering while I was ill.
We have so many varieties of QL expansions, QL-compatibles and emulations (not to mention filing systems) it tends to be harder now for people to understand anything other than the system in front of them. Personally, I'm amazed that so many people use MDV-based systems, not just QL microdrives but MDV emulations, be they emulators or SD card systems, not to mention ancient systems like ICE.
It really needs someone to write a "QL Manual Version 2" covering the diverse directions QL systems can go in these days. Quick list :
- Toolkit 2
Other system extensions
Adding memory and QL cards.
Pointer Environment (not many seem to know the difference between pointer environment and extended environment for example)
QDOS and SMSQ/E differences
Getting going with SMSQ/E
Basic differences between the various QL systems - which can do what.
Filing systems used by QLs, Qubides, compatibles, emulators, etc.
Downloading, unzipping, file transfer, serial links
Networking, including use of Martin's software on capable hardware.
Sources of advanced information - the QPTR and SMSQ Ref guides, etc
It'll probably end up being at least the size of the SuperBasic Reference Manual!
As ever, the problem is TIME. I've not written much QL software at all this year simply because I've been so busy. Despite being early-retired (my formal retirement is end of next year) I seem to have less time on my hands than I ever did

--
All things QL - https://dilwyn.theqlforum.com
All things QL - https://dilwyn.theqlforum.com