qbasicking
Programmer
Heres the deal: When I click my mouse I make my program run a click diagnosis to see what was clicked.
It runs through all the buttons of all of the windows.
Here's the code that is giving me problems:
FOR buttons = 1 to 30
x = butx(buttons)
y = buty(buttons)
x2 = butx2(buttons)
y2 = buty2(buttons)
IF butwin(buttons) = awin OR butwin(buttons) = 0 THEN
IF x<x%>x2 AND y<y%>y2 THEN IF buttons = 1 then task:IF
buttons = 2 then dos
END IF
NEXT
I can't get it to goto the SUB dos, I know that the rest of the code is right becasue is goes to SUB task flawlessly, and when I make the line:
IF x<x%>x2 AND y<y%>y2 THEN IF buttons = 2 then dos: IF
buttons = 1 then task
it goes to dos, but not to task
What should I do to get it to do both?
PS: x% and y% are the cursor positions
Of course I didn't use x<x%>x2; I used AND but i
shortened it to save space
yes, all of the strings were called long before
It runs through all the buttons of all of the windows.
Here's the code that is giving me problems:
FOR buttons = 1 to 30
x = butx(buttons)
y = buty(buttons)
x2 = butx2(buttons)
y2 = buty2(buttons)
IF butwin(buttons) = awin OR butwin(buttons) = 0 THEN
IF x<x%>x2 AND y<y%>y2 THEN IF buttons = 1 then task:IF
buttons = 2 then dos
END IF
NEXT
I can't get it to goto the SUB dos, I know that the rest of the code is right becasue is goes to SUB task flawlessly, and when I make the line:
IF x<x%>x2 AND y<y%>y2 THEN IF buttons = 2 then dos: IF
buttons = 1 then task
it goes to dos, but not to task
What should I do to get it to do both?
PS: x% and y% are the cursor positions
Of course I didn't use x<x%>x2; I used AND but i
shortened it to save space
yes, all of the strings were called long before