On Mon, Apr 11, 2011 at 9:03 PM, pjwitte <[email protected]> wrote: > On 08/04/2011 22:56, Martyn Hill wrote: > >> Dear list >> >> Whilst I suspect that there is no 'simple' way to make an SBasic job >> work with the PE - i.e. able to move #0/1/2 windows and put to sleep >> in QPAC2 frame - without going the whole hog of making a PE >> compliant application, but none-the-less wondered if someone could >> devise and share a basic HowTo on the process. >> >> I think I've read most of the PE documentation out there but I'm >> still at a loss to understand just what is required to be able to >> manipulate an SBasic Job (0 or daughter SBasic jobs) with the PE. >> >> I run QPC2 with QPAC2 and would invoke my copy of QDT more if I >> could tame SBasic windows in this way. >> >> Have I missed something obvious, or is it necessary to develop a >> standalone app using the PE tools available just to achieve this? >> >> Thanks for any ideas. >> > > Here are some ideas for using PE with the S*Basic interpreter. I use the > following in my boot program: > > ERT HOT_THING('z', 'Button_Sleep') > > ALT+z puts the job in focus (including SB) to sleep > > ERT HOT_THING('=', 'Button_Pick') > > ALT+= picks all the buttons to the top > > ERT HOT_CMD(CHR$(245), 'wmov#0') > > ALT+CTRL+F4 moves the SB window, but only when it is receiving input. Ie it > is a direct command. OUTLN must be set before first use, I think. I call the > command below to initialise my windows > > 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,SCR_XLIM-512,14: > BORDER#2;1,255: > CLS#0:CLS#1:CLS#2" > &CHR$(10) > ) > > The above is all one line. It makes ALT+b reset SB's (or an SBASIC daughter > job's) three main windows and move them to the rightmost corner of the > screen( avoiding the pile-up on the left where all pre-PE programs end up.) > It also reduces the hight of the window so as not to get in the way of the > Button Frame. > > You can now use WMAN2 colours and features from S*Basic. Checkout the WM_* > keywords in your manual! > > Per > > I like to have a daughter basic running in case the master basic becomes unusable. I also like the daughter basic not to be in the same place as the master basic. I therefore have a small basic program I can LRUN to move the daughter basic. The program also enlarges #2. The program contains;
1000 WMON SCR_XLIM-512,SCR_YLIM-256 1020 WINDOW#2,512,204,SCR_XLIM-512,SCR_YLIM-256 WMON is part of SMSQ/E and allows the basic windows to be moved without the need for OUTL (or BOUTL in TurboPTR) which I find messy. This program works for different sizes of screen. George _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
