Victor
New Member
Just havin' fun
Posts: 2
|
Post by Victor on Apr 20, 2022 19:03:53 GMT
Hey guys,
You've already told me that IF | KEYBOARD KEYPRESS was kind of a fuzzy condition to program but I'd need to make a macro that detects if I press either MOUSE4 ~or~ MOUSE5 (mmm detects these values as xbutton2 and xbutton1 respectively). Thing is, if I program IF | KEYBOARD KEYPRESS | Keypress xbutton2 | IS | CONTINUE then I obviously can't program ELSE | IF | KEYBOARD KEYPRESS | Keypress xbutton1 | IS | CONTINUE. I'm not sure if I'm explaining myself correctly but I want the macro to detect wether I press xbutton1 or 2 and from that, do a specific set of steps (I figured I could do it using THEN/ELSE but I can't get to that part yet
|
|
|
Post by philranger on Apr 24, 2022 13:59:06 GMT
Hello,
If I understand correctly:
You want to detect one button OR the other, so a continue doesn’t work.
You can do another kind of looping, such as:
A: If button 1 goto B If button 2 goto C Goto A
Hoping this helps
|
|
Victor
New Member
Just havin' fun
Posts: 2
|
Post by Victor on Apr 25, 2022 16:28:51 GMT
Hello, If I understand correctly: You want to detect one button OR the other, so a continue doesn’t work. You can do another kind of looping, such as: A: If button 1 goto B If button 2 goto C Goto A Hoping this helps But it then won't wait for either keypress to be pressed to continue, it will just go on, right?
|
|
|
Post by cyberchipz on Apr 27, 2022 20:18:38 GMT
As you see, it loops back to the beginning; if you want to exit the loop, you write that code at Label B. or C. He didn't include that code; that's what you wanted to do. ;-) so, it keeps going around in circles until you do one or the other. You could put as many traps inside the loop to handle as many different things you wanted to do.. and when it detects that action, it will go to the line with the label you give it. It's a thing about coders and coding; you have to understand the basic process; or none of it makes sense. As a coder; we have a rule; we don't write your code for you.. we will help with syntax, logic, function; but the path is yours to take. ;-) We're quite literal; so be specific. the code is unforgiving. And at the top, in the menu is a box with a c inside it; it's quirky; but not hard to figure out... Give examples of your code; in that way, we only help to fix it for you; so You can see what it's missing; but... when you do provide examples... use that command to enter the code... click on the [C] above, and enter the code in the box. Hit enter; and it formats it for you.. the way you wrote it... and it's easier to help that way. :-)
|
|