I have an odd problem which i can only put down to a] a bug or b] me being rusty.
Here is the code listing.
set display mode 640,480,32
sync on
sync rate 0
focus=0
load image "customer.bmp",1
do
set cursor 0,0
print focus
gosub screendisplay
gosub mousecheck
gosub focuscheck
sync
loop
screendisplay:
paste image 1,0,0
ink rgb(0,0,0),rgb(255,255,255)
set cursor 120,110
print "First name"
set cursor 120,139
print "Last Name"
set cursor 120,169
print "Address"
set cursor 120,289
print "Postcode"
set cursor 120,319
print "Telephone"
set cursor 120,352
print "Warranty Number"
set cursor 200,400
print mousex()
set cursor 200,430
print mousey()
return
mousecheck:
`goto skip
if mousex()>251 and mousex()<430 and mousey()>112 and mousey()<122
if mouseclick()=1
focus=1
endif
endif
if mousex()>251 and mousex()<430 and mousey()>142 and mousey()<156
if mouseclick()=1
focus=2
endif
endif
if mousex()>251 and mousex()<430 and mousey()>170 and mousey()<185
if mouseclick()=1
focus=3
endif
endif
if mousex()>251 and mousex()<430 and mousey()>201 and mousey()<215
if mouseclick()=1
focus=4
endif
endif
if mousex()>251 and mousex()<430 and mousey()>231 and mousey()<245
if mouseclick()=1
focus=5
endif
endif
if mousex()>251 and mousex()<430 and mousey()>260 and mousey()<275
if mouseclick()=1
focus=6
endif
endif
return
skip:
if mousex()>251 and mousex()<430 and mousey()>292 and mousey()<306
if mouseclick()=1
focus=7
endif
endif
if mousex()>251 and mousex()<430 and mousey()>323 and mousey()<338
if mouseclick()=1
focus=8
endif
endif
if mousex()>251 and mousex()<430 and mousey()>353 and mousey()<367
if mouseclick()=1
focus=9
endif
endif
return
focuscheck:
if focus=1
set cursor 251,111
input name$
` gosub entry
focus=0
endif
if focus=2
set cursor 251,140
input surname$
focus=0
endif
if focus=3
set cursor 251,168
input address1$
focus=0
endif
if focus=4
set cursor 251,200
input address2$
focus=0
endif
if focus=5
set cursor 251,230
input address3$
focus=0
endif
if focus=6
set cursor 251,260
input county$
focus=0
endif
if focus=7
set cursor 251,290
input postcode$
focus=0
endif
if focus=8
set cursor 251,320
input phone$
focus=0
endif
if focus=9
set cursor 251,350
input warranty$
focus=0
endif
return
entry:
return
This should basically load up a screen I designed and then let you click on each box to the right of the description textn and type into it. The problem I am having is that it works fine until I get to the last 3 boxes. Then it stops working. The code is identical to code earlier on except for co-ordinates but will not work. If I rem in the "goto skip" line the last three will work.... Obviously theres something very odd going on with this, but I am at a loss as to why.
Anyone have any ideas? Does it work on other peoples machine and just not mine? I include my image if you feel you want it to see it running properly. Any help would be appreciated.
<center><img src="http://tinyurl.com/oz8mf"><center>