PE Programming for dummies

Anything QL Software or Programming Related.
Derek_Stewart
Font of All Knowledge
Posts: 3929
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: PE Programming for dummies

Post by Derek_Stewart »

Hi,

I tried the Charmap application of QPCv5.02, SMSQmulator v2.32, Q68, all running SMSQ/E v3.38, all work great, a nice pointer application.

Is it possible to add in the facility to alter a selected character and save the new Font?

I tried Charmap in sQLux v1.02 running, which did not work, I thought due to the lack of HOME thing, so I added in the HOME thing from the QL Home Page, which also did not work in sQLux, so it looks like only SMSQ/E... Which is not a big deal, probably better to use the best operating system.


Regards,

Derek
User avatar
Andrew
Aurora
Posts: 786
Joined: Tue Jul 17, 2018 9:10 pm

Re: PE Programming for dummies

Post by Andrew »

Derek_Stewart wrote: Is it possible to add in the facility to alter a selected character and save the new Font?
It's possible, but there already is a very good font editor written by Dilwyn: http://www.dilwyn.me.uk/fonts/fonted2.zip
Attachments
FontEd.jpg


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: PE Programming for dummies

Post by dilwyn »

Err, thank you <blush> <blush> :ugeek:


User avatar
desin
Chuggy Microdrive
Posts: 50
Joined: Mon May 10, 2021 10:33 am

Re: PE Programming for dummies

Post by desin »

hello
here is my adress database program
it is based on
datadesign
easypointer
qmenu
works best in compiled form (Qlib) from a win container
Smsqe is preferable
adr.zip
(105.38 KiB) Downloaded 134 times
Greetings from Switzerland
Markus
Attachments
ADR.png


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: PE Programming for dummies

Post by NormanDunbar »

Have you, by any chance, just fallen foul of the EU's GDPR laws? Are those real names and addresses, if so, you may have broken the law by publishing data than can identify a person, online. Just wondering.

UPDATE: I'm told it's publically available data, many years out of date, and Switzerland isn't in the EU. I shall go back to not worrying! :)

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
Andrew
Aurora
Posts: 786
Joined: Tue Jul 17, 2018 9:10 pm

Re: PE Programming for dummies

Post by Andrew »

Hi - I need help!!
How the heck do you read the arrow keys in PE?
Using PVAL [#ch%,] result%
result%(6) returns the ASCII code of key pressed

This works for all keys, except for the arrows! If any arrow key is pressed then result%(6)=0
The arrows only move the cursor on screen, but I need to know if the arrow keys were pressed or not.


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: PE Programming for dummies

Post by dilwyn »

Not at a QL to check this. Please try the CKEYON #channel and CKEYOFF commands present in both QDOS PE and SBASIC. Channel number optional.
https://superbasic-manual.readthedocs.i ... keyon.html

Don't remember if this does what you want to achieve or not.


User avatar
Andrew
Aurora
Posts: 786
Joined: Tue Jul 17, 2018 9:10 pm

Re: PE Programming for dummies

Post by Andrew »

dilwyn wrote: Thu Jan 04, 2024 7:16 pm Not at a QL to check this. Please try the CKEYON #channel and CKEYOFF commands present in both QDOS PE and SBASIC. Channel number optional.
https://superbasic-manual.readthedocs.i ... keyon.html

Don't remember if this does what you want to achieve or not.
Thanks Dilwyn, but it seems it's not working.
This is my test code:

Code: Select all

100 DIM prec%(15)
110 WMON 4:OUTL:OUTL#1
120 XJ 'dos1_6_qlc_demo_handA_spr',adr,1
130 SPRS#1,adr
140 PAPER 0:INK 7:CLS
150 acolor=7
160 MAWS#1,5,2
170 RDPT#1,48
180 PVAL#1,prec%
190 RDPT#1,48,prec%(10)+20,prec%(11)+20
200 REPeat TheLoop
207   CKEYON#1
210   RDPT#1,25,1:PVAL#1,prec%
220   IF prec%(1)<>prec%(13):NEXT TheLoop
230   IF prec%(6)=27:EXIT TheLoop
235   PRINT #0, prec%(6)
240   IF prec%(6)=245:WMOV#1:NEXT TheLoop
250   IF prec%(6)>47 AND prec%(6)<56
260     acolor=prec%(6)-48
270   END IF
280   BLOCK#1,2,1,prec%(3),prec%(4),acolor
290 END REPeat TheLoop
300 CLPT#1:MAWS#1:RXJ adr


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: PE Programming for dummies

Post by dilwyn »

OK. I haven't had time to look at it.

Maybe if you give us an idea of what you want to achieve we can think of another way around it. Seems an unusual requirement (at first glance) to read a cursor key when it's normally assigned to pointer movement.

Without looking at any code, you might reasonably have expected a temporary CKEYOFF to allow detection of cursor arrow keys. Presumably, the PE still swallows a cursor key press despite a CKEYOFF?
Is the same true with an MKEY% function?

I don't remember if CKEYOFF and CKEYON are meant to work in a program, or just from command line. Since CKEYON allows a channel number, probably supposed to work in a program.

Would a KEYROW be of any use in the context you're trying to use this?


User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: PE Programming for dummies

Post by tofro »

According to my manual, the keycode of the key should also be present in the high byte of the termination vector on return (That must obviously be an integer varable, then, you're currently handing in a constant). Did you check that?


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Post Reply