Board Logo
« getting started, Pigeon Breeders Records program »

Welcome Guest. Please Login or Register.
Jan 21st, 2018, 12:52am


Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Please use the forums Search feature before asking.
Please post code using the code box described in Format Your Messages.
This will keep indentation, separate it better form the message and prevent gibberish.
If the code is too long for one post or additional files are needed, upload a ZIP archive to the Just BASIC Files Archive Site.

« Previous Topic | Next Topic »
Pages: 1 ... 4 5 6 7 8  ...  11 Notify Send Topic Print
 veryhotthread  Author  Topic: getting started, Pigeon Breeders Records program  (Read 10846 times)
stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #75 on: Sep 11th, 2016, 03:46am »

Updated again 20.36
Breeders_Records v1.48: Switching directories/folders has been adjusted and the guide amplified to describe the maintenance of separate records for each family, season, or breeding loft as required.

removed and updated later
« Last Edit: Sep 12th, 2016, 02:59am by stumpy » User IP Logged

tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Re: getting started with Prog for Pigeon Breeding
« Reply #76 on: Sep 12th, 2016, 02:18am »

Hello stumpy
I found an issue in your program (I believe it was 1.42 - sorry I can't keep up! ;) )

Here's the code
Code:
nomainwin

open "test" for graphics as #gr
#gr "trapclose [quit]"
#gr "down; home"

#gr "font Arial Narrow 10 italic"   'actually works like Arial - needs underscore!
#gr "\font Arial Narrow 10 italic"
#gr "\"

#gr "font Arial 10 italic"
#gr "\font Arial 10 italic"
#gr "\"

#gr "font Arial_Narrow 10 italic"
#gr "\font Arial_Narrow 10 italic"
#gr "\"

wait

[quit]
    close #gr
    end 

it shows that then you request "Arial Narrow" you actually get "Arial"
To get what you want you should replace space in font name with underscore: "Arial_Narrow".

(it is mentioned in the help file)
User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #77 on: Sep 12th, 2016, 02:56am »

Thank you tsh73 for checking it out, and for your comments about arial narrow.

I will look into it but clearly the code was wrong. Whatever I am getting seems ok though and I probably just need to remove the incorrect 'Narrow'. Thanks again.

Since 1.42 the thought had occurred that if I could tame the direct changes of directory on-screen a bit better, the user could use any folder for different groups of data, while their titles could remain the same. So I am afraid it's now v1.49! which I was about to post, but will correct Narrow in the next one.

I guess there is still plenty of duplication of certain operations instead of re-use of bits of code, but this one is just about dealing with an inconsistency which only sometimes appeared after saving and loading data in the Nest Cards section - a card was really still selected, when it appeared not to be. Not that anyone else apart from us two is likely ever to get that far...grin

« Last Edit: Sep 12th, 2016, 03:49am by stumpy » User IP Logged

stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #78 on: Sep 12th, 2016, 03:34am »

Apologies. 1.49 package has a problem. For now here's 1.48.bas

Edit 13.9.2016 (superceded later)
« Last Edit: Sep 13th, 2016, 04:37am by stumpy » User IP Logged

tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Re: getting started with Prog for Pigeon Breeding
« Reply #79 on: Sep 12th, 2016, 03:53am »

I spent some time making program scale itself
Automagically
Actually it's AWK script (it works with some old AWK I have on my computer, well might be not very standard)
that basically does stuff like:
* if there is a line "WindowWidth = 1920" change it to "WindowWidth = DisplayWidth"
* if there is a line 10 add definition of scale and fontscale
* if there is a line with "button #main" change last 4 comma-delimited words to themselves +"*scale"
** etc
(including some workarounds to comment handling)

(actually, I'm pretty sure I could translate it to JB using allmighty WORD$.)

Here is AWK script "prog1.awk"
Code:
BEGIN{FS=","; OFS=","; flag=1}

{flag=1}

/WindowWidth = 1920/{
    print "WindowWidth = DisplayWidth"
	flag = 0
}

/WindowHeight = 1080/{
    print "WindowHeight = WindowWidth/1920*1080+20"
	flag = 0
}

NR==10 {
	print "    scale = WindowWidth/1920"
    print "    fontscale = 1.4*scale"
	flag = 0
}

/button #main/ && !/bmpbutton #main./ {
	for (i = NF-3; i<= NF; i++)
		$i =$i "*scale"
	print
	flag = 0
}

/bmpbutton #main./{
	for (i = NF-1; i<= NF; i++)
		$i =$i "*scale"
	print
	flag = 0
}

0 && /button #main/ && $4!=" UL" {
	print "'### " $0
	flag = 0
}

/"font Arial Narrow 10 italic"/{
	print $1, "\"font Arial_Narrow 0 \";int(17*fontscale);\" italic\""
	flag = 0
}

/graphicbox #main./{
	for (i = 2; i<= NF; i++)
		$i =$i "*scale"
	print
	flag = 0
}

/TEXTBOX #main./{
	for (i = 2; i<= NF-1; i++)
		$i =$i "*scale"
	$NF=($NF+0) "*scale"
	print
	flag = 0
}
/textbox #main./{
	for (i = 2; i<= NF-1; i++)
		$i =$i "*scale"
	$NF=($NF+0) "*scale"
	print
	flag = 0
}

/statictext #main./{
	for (i = NF-3; i<= NF; i++)
		$i =$i "*scale"
	print
	flag = 0
}

/listbox #main./{
	for (i = NF-3; i<= NF; i++)
		$i =$i "*scale"
	print
	flag = 0
}

flag==1{ #everithing else
	print
} 

Here's what resulted from version 1.42: link
(but since it works automagically with
Code:
awk -f prog1.awk <"Breeders_Records v1.42.bas" >out.bas 
it could be tried on newer versions.
)
It should be run from same place where original program was ("c:\users\Public\Documents" etc)
So. Interface scales to 1280x1024 monitor rather nice, you now can have a look without having 1920 pixels wide monitor (before that I looked via virtual mashine, scrolling back and forth)
Two problems - if textbox is too narrow there is no cursor visible
("scale" is actual scaling factor, "fontscale = 1.4*scale" found by trial and error - so text be visible and fit alotted spaces)
and big pictures does not scale down (pictures could be scaled UP with sprite background, but it doesn't work down)
« Last Edit: Sep 12th, 2016, 04:00am by tsh73 » User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #80 on: Sep 12th, 2016, 05:31am »

Automagic indeed! and fantastic!

Having put 'out' (with v1,42) into "c:\users\Public\Documents" it works fine on my machine too, except that that the screen always reverts to being set a little high, so that only the lower extremities of the red box with 'X' in it show.

The rest of the top of the screen does not matter so much, but I have relied upon the 'red cross' for Windows to close the program, rather than making yet another button.

I also found that the main set of 13 list boxes is shown in full in the Nest Cards screen, so that the lower borders are shown, which you might have used to decide the required size, while they didn't show, and are not needed in the original. I think that was because I think that the scroll bars can't be avoided just by reducing the height of the listboxes, but actually they could have been a bit shorter.

I take it that eventually there would need to be alternative versions, for 1280x1024 and, say, 1920x1080. Is that right?
(I also have a display with 3840x2160 which I might want to use in future)

If the default screen position could be changed a bit would you consider applying the new scheme to v1.48 for me to try as well?

btw (with a new shortcut from Program files x86 to desktop for JustBasic.exe it now says 'could not understand .ini' when I run it with that shortcut, and am not sure why that is)

« Last Edit: Sep 12th, 2016, 05:53am by stumpy » User IP Logged

stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #81 on: Sep 12th, 2016, 06:18am »

or maybe the point is that 'out' works at any display screen?

« Last Edit: Sep 12th, 2016, 06:58am by stumpy » User IP Logged

tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Re: getting started with Prog for Pigeon Breeding
« Reply #82 on: Sep 12th, 2016, 06:55am »

"out" should work for any display size, but font gets really very small at 1024x768

On your monitor, scale supposed to be 100% so it should look exactly as source program.
But I added 20 pixels vertical space because something didn't quite fit (as you wrote it was deliberate thing).

I will try newer version at home later. I saved new BAS program (some techy guy with ladder broke my home Internet last Saturday ;( )
« Last Edit: Sep 12th, 2016, 06:57am by tsh73 » User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #83 on: Sep 12th, 2016, 07:00am »

PS
Right!

Yes, I put a tokenised version of 'out' on my 3840x2160 display and it works, as you said the large picture doesn't all show but that doesn't matter because the buttons are in the right place,

- and the printed 'cursor', '< SELECTED >' doesn't fit, as you also pointed out, but maybe it would if I made the textbox deeper?

Bad luck about the interweb but Amazing work, looking forward to the next installment
« Last Edit: Sep 12th, 2016, 07:01am by stumpy » User IP Logged

tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Re: getting started with Prog for Pigeon Breeding
« Reply #84 on: Sep 12th, 2016, 07:00am »

Quote:
and the printed 'cursor', '< SELECTED >' doesn't fit

Font should be scaled too
But I scaled only Arial Narrow for whole window
lines
Code:
print #main.select1, "!font calibri 12 italic bold" 
went unchanged.

Will fix.
User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #85 on: Sep 13th, 2016, 04:34am »

v1.49 fixes the .pdf output for printing young birds for the year, from Nest Cards

« Last Edit: Sep 13th, 2016, 3:00pm by stumpy » User IP Logged

tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Re: getting started with Prog for Pigeon Breeding
« Reply #86 on: Sep 13th, 2016, 08:59am »

v.1.49 converted to autosize
Main font changed to Small (and not italic) - so 1024x768 still readable.
Also, long dialogs (1400+ pixels wide) scaled down, too.
link

Stumpy, after printing bitmap to graphicbox one usually does "flush", so after obscuring window (or minimizing) picture doesn't disappear.

Now if only parts that loaded as striped bitmaps would be made with code, they could be scaled down, too.
« Last Edit: Sep 13th, 2016, 09:01am by tsh73 » User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #87 on: Sep 13th, 2016, 09:25am »

thanks tsh73. I have to go out and unfortunately! there are other things I must do, but sounds great and asap will look into flush, check it out, and come back.
« Last Edit: Sep 13th, 2016, 09:26am by stumpy » User IP Logged

stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #88 on: Sep 13th, 2016, 2:02pm »

See what you mean about bmps disappearing after minimising, which I had noticed before. It made things untidy but I did not realize why that was - so have added flush everywhere I could find, which is much better, and added some more error trapping messages.

out v1.49 works well on 1280x1024 except bmps, as you point out.

Yes there are several striped bmps which get out of proportion vertically, which matters because they need to match the textboxes, also the 'select ring set' buttons in Nest Cards screen, which masks nearby objects on 1280x1024 and static text is displaced, also on 1920x1080.

Looked at graphics windows and drawing boxes in them, but on first sight that looks too clumsy and windows can't get small enough. I haven't looked at graphics windows before, except for bmp, so it seems impenetrable.

Also looked at the possibilty of using textboxes, one for each square in the bmp strips, but it seems JB can only set the colours for all textboxes together.

Right now all I can imagine is to provide a set of bmps for each of the most commonly used display screen sizes, so the right one could be copied from a folder by the user into the package's 'bmp' folder, to suit user's screen.

What screen sizes do you think would be most useful?
- and could selection of bmp folder be somehow automated to fit the screen being used too?

Noted that in out v1.49 you changed to non-italic, and the text does look wider. Is it necessary to that extent or can it be made more similar to Breeders Records again (maybe a half-way house or 'semi-italic' and 'semi-bold'!)?
« Last Edit: Sep 15th, 2016, 01:53am by stumpy » User IP Logged

stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #89 on: Sep 14th, 2016, 1:30pm »

I have been able to run 'out v1.49.tkn' on my old desktop too, with Windows Vista at 1280x1024, which is the maximum resolution available and presumably describes the physical size of that display screen.

The proportions of the pages and code-produced text look ok, except for bmp proportions as discussed, but the three pages each open near the middle of the screen, when they only slightly overlap the bottom. If dragged up to fit the top of the screen (when bmps disappear, as discussed and perhaps won't with v1.51) they creep down again with each change of page: Intro <> Pairs <> Nest cards. Could this be fixed?

I am ready to try making alternative bmps for 1280x1024, if that would be likely to help, and perhaps could try to fill the Intro screen with one of the new bmps and leave that as a background to the program's pages, which do not fill the screen at 1280x1024, with the intro buttons de-activated. How should it be shown as full screen background, or could it just be left open?
« Last Edit: Sep 14th, 2016, 2:03pm by stumpy » User IP Logged

Pages: 1 ... 4 5 6 7 8  ...  11 Notify Send Topic Print
« Previous Topic | Next Topic »

Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls