|
Post by Nicky Peter Hollyoake on Apr 19, 2006 6:04:47 GMT -5
could you tell me what "charat$" does to?
|
|
|
Post by Supermonkey on Apr 19, 2006 6:25:41 GMT -5
here some code which should work:
dim menutext$ dim mx,my
menutext$ = "Click Here" do locate 100,100 print menutext$ mx = mousex()*100 my = mousey()*100
if mx > 100 and mx < 100+len(menutext$) if my = 100 'Mouse button should be clicked endif endif loop
|
|
|
Post by Nicky Peter Hollyoake on Apr 19, 2006 10:31:07 GMT -5
your no good with codes aint you.
|
|
|
Post by Nicky Peter Hollyoake on Apr 19, 2006 12:07:15 GMT -5
well i made my code better lol but i still cant make it so when i go on any part of the writing and i right click it will go to the next page.
'mouse click to go to next page. dim x,y,a$,b$ b$ = "click here to start the game." start: while true textmode(text_buffered) cls color (0,255,0) 'sorry locate 0,0:print"go to the 'c' and press space" color (255,0,0) if x= 9 and y = 12 then color (0,0,255):Endif locate 9,12:print b$ x=mouse_x() * 100 y=mouse_y() * 100 color (0,0,255):locate x,y:print"x" charat$ (x,y) 'you could copy this code over and over again at the bottom here but 'that would just be to difficult they must be an easier way 'if you are reading this and you got any ideas could you email me at 'blue_common_eyes@hotmail.co.uk if mouse_button (mouse_lbutton) and x=9 and y = 12 then 'go to the c and press space. 'and you should go to the next page. color (0,0,255):locate 0,0:goto nextpage:endif drawtext() wend
nextpage: while true textmode (text_buffered) cls 'if it goes to this page it worked color (0,255,0):printr"press b to go back." color (0,0,255):print"or press escape to cut off screen" drawtext() if keydown ("B") then goto start:endif wend 'finished
|
|
|
Post by Supermonkey on Apr 19, 2006 13:07:02 GMT -5
Because I can't stand being insulted by people who have no clue I have wrote some mouse clicking code. THIS is as SIMPLE as it GETS, please don't insult myself or anyone else again, this time I assume its a language issue, next time I wont.
dim menutext$,tx,ty dim mx,my tx = 1:ty = 1
menutext$ = "Click Here" do cls textmode(TEXT_BUFFERED) locate tx,ty printr menutext$ mx = mouse_x()*39 ' * 39 because you can fit 39 characters accross screen my = mouse_y()*24 ' * 24 because you can fit 39 characters down screen 'here you are checking that the mouse position is inbetween the position of the text (len returns the length of a string) 'This comes back to the first section of code I wrote which you disregarded if mouse_button(mouse_lbutton) and mx >= tx and mx < tx+len(menutext$) and my=ty then gosub menu2 endif drawtext() loop
menu2: tx = 20 ty = 20 menutext$ = "Welcome to menu 2" return
|
|