EasyPtr4

Anything QL Software or Programming Related.
User avatar
desin
Chuggy Microdrive
Posts: 50
Joined: Mon May 10, 2021 10:33 am

Re: EasyPtr4

Post by desin »

hello
I a have taken the other way
by setting the column width and not showing the whole string
and using a new window for input
menu_rext has its (length) limitations too but it does the job
tarif.zip
(79.02 KiB) Downloaded 63 times
Greetings from Switzerland
Markus


Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: EasyPtr4

Post by Martin_Head »

BSJR wrote:If array text runs longer than the AW widow you need to specify a column width that fits. The same goes for the height but that's unlikely to occur with text.
The xsz%,ysz% parameters for MAWDRAW do just that. Text will be truncated at the column width. If the next column doesn't fit nothing from that column will be shown.
My EasyPtr manual does not mention these parameters. Just MAWDRAW [#ch%,] num [, array$]

I managed to get the pan bars to appear by using a 3 dimensional array in MAWDRAW. But it didn't do what I wanted. So I have gone off on a different tack of slicing my strings before creating the array for MAWDRAW. And having two loose items each side of the application window to do the panning, by re-slicing my strings and recreating the array for MAWDRAW.

This looks like it could work OK. But I hit another problem yesterday, If the application window gets resized (wider). I need to know it's new size, so I can change the length of slices I need to use. Looking in the EasyPtr manual, I could not see an obvious command that returned the size in pixels of an application window.

I see there is a MWDEF command to get the address of the working definition. I don't know if I could navigate that to find the application windows size.


User avatar
JonS
Bent Pin Expansion Port
Posts: 76
Joined: Fri Nov 11, 2011 3:54 pm
Location: Cumbria

Re: EasyPtr4

Post by JonS »

Try this, call with channel and application window number and xsize% and ysize% are returned. Hope that give you what you want.

Code: Select all

 DEFine PROCedure GET_APPW_SIZE(channel,appw_no,xsize%,ysize%)
   LOCal working_def,ww_nappl,ww_pappl,apw
 :
   working_def=MWDEF(#channel)
 :
   ww_nappl=PEEK_W(working_def+HEX("6E"))
   IF appw_no<1 OR appw_no>ww_nappl THEN
     xsize%=-1 : ysize%=-1
   ELSE
     ww_pappl=PEEK_L(working_def+HEX("70"))
     apw=PEEK_L(ww_pappl+((appw_no-1)*4))
     xsize%=PEEK_W(apw)
     ysize%=PEEK_W(apw+2)
   END IF
 :
 END DEFine GET_APPW_SIZE


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: EasyPtr4

Post by mk79 »

Martin_Head wrote:My EasyPtr manual does not mention these parameters. Just MAWDRAW [#ch%,] num [, array$]
Check the page after that.
I see there is a MWDEF command to get the address of the working definition. I don't know if I could navigate that to find the application windows size.
I don't know either, but that's one way of course. For other window types I also see MOBJA with \ separator, which is easier to handle, but it doesn't seem to support complete application windows (only items). Or maybe it does and it's just not documented, it's been far too long. Or maybe use MWINDOW/MWLINK and a toolkit that gives you the size of a channel.


Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: EasyPtr4

Post by Martin_Head »

JonS wrote:Try this, call with channel and application window number and xsize% and ysize% are returned. Hope that give you what you want.
That looks similar to what I've done. I can now display a string longer than the application window, and pan forwards and backwards to see the whole string. And I can resize the application window, and the panning still works.

I've got a problem with the moving of the two pan buttons each side of the application window when I resize it. I need to look into that a bit more.


Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: EasyPtr4

Post by Martin_Head »

mk79 wrote:
Martin_Head wrote:My EasyPtr manual does not mention these parameters. Just MAWDRAW [#ch%,] num [, array$]
Check the page after that.
I see there is a MWDEF command to get the address of the working definition. I don't know if I could navigate that to find the application windows size.
I don't know either, but that's one way of course. For other window types I also see MOBJA with \ separator, which is easier to handle, but it doesn't seem to support complete application windows (only items). Or maybe it does and it's just not documented, it's been far too long. Or maybe use MWINDOW/MWLINK and a toolkit that gives you the size of a channel.
While your here. Can I ask about the QPC2 DOS_DRIVE$ command. Is there a maximum string length it can return.

I read the DOS drive settings into an array, and I don't know what length to give it.


User avatar
BSJR
Trump Card
Posts: 182
Joined: Sun Oct 18, 2015 12:53 pm
Location: Amsterdam
Contact:

Re: EasyPtr4

Post by BSJR »

Martin_Head wrote:...
I see there is a MWDEF command to get the address of the working definition. I don't know if I could navigate that to find the application windows size.
That is surely an option, see the description in the QPTR manual. I use this to poke new arrow colours.
For SuQcess I use fixed margins between AW and Outline for all sizes. These values are kept in the program and used each time the AW is filled anew.
One point to remember is that when automatic bars are generated the AW size is also reduced to make room while arrows are placed inside the AW, so this need to be taken into account when specifying the top/left corner for displaying the array.
As bars & arrows also have fixed sizes these are also used in recalculating the available array space.

BSJR


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: EasyPtr4

Post by mk79 »

Martin_Head wrote:I read the DOS drive settings into an array, and I don't know what length to give it.
Currently the limit is 200 characters.


Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: EasyPtr4

Post by Martin_Head »

I have been working on my QPC2 DOS drive manager program in EasyPtr.

It still needs a bit of work doing to it, But I could do with a bit of real world testing of selecting new Windows folder paths for the DOS assignments.

I have written a little program in Visual Studio Express, to select the new DOS drive folder. But Visual Studio Express does not produce proper Installation setup files.
So I am just using the Windows .exe file created in Visual Studio Express. This seems to work OK in my Windows 8 ,and 10 systems. It does complain about wanting .NET V4 in Windows 7, But I have not tried installing .NET on my Windows 7 system. I would like to know if the plain .exe file will run OK in most peoples systems.

Unzip the DOSdrive.zip file into a folder on the C: drive named 'QPCfind'

Run the DOSlist_bas program, and click on one of the displayed DOS assignments.
Image1.png
The Browse For Folder window should open, select a folder and click OK
Image2.png
If you Cancel, You will need to press the END key to stop the EasyPtr program waiting.
Attachments
DOSlist.zip
(2.48 KiB) Downloaded 46 times
DOSdrive.zip
(8.67 KiB) Downloaded 47 times


User avatar
BSJR
Trump Card
Posts: 182
Joined: Sun Oct 18, 2015 12:53 pm
Location: Amsterdam
Contact:

Re: EasyPtr4

Post by BSJR »

Martin_Head wrote:I have been working on my QPC2 DOS drive manager program in EasyPtr.
...
Unzip the DOSdrive.zip file into a folder on the C: drive named 'QPCfind'
Run the DOSlist_bas program, and click on one of the displayed DOS assignments.
I can confirm that your program combo does work on my W$7-Ultimate system with QPC2 5.01. No .NET issues here but it does complain about the .exe not being trusted. Each time I force execute it AVG steps in and starts analysing and sends a report back to base.

BSJR


Post Reply