Uhh, I dont really know what to call this but I have a question(propably a noob one) that I cant seem to figure out. Since I don't know what to call this question I cant search for it on the forums, therefore I have to ask it myself.
Ok I'm making a button function for my program like this:
function button(left,top,right,bottom,t$)
if mouseclick()=1
if mouseX()>left
if mouseY()>top
if mouseX()<right
if mouseY()<bottom
t$
endif
endif
endif
endif
endif
endfunction
Where it says t$ how would I get darkbasic to process this as a command and use it in my program, for example.
button(0,0,100,12,"print "button pressed"")
Now I dont quite think I am going at this with the right aproach and any help would be apreciated.
Edit I shortened the function down to:
function button(left,top,right,bottom,t$)
if mouseclick()=1 and mouseX()>left and mouseY()>top and mouseX()<right and mouseY()<bottom then t$
endfunction
but I still dont have the solution to my problem