Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What do you guys like to use for mouse mapping?
#12
Steve is correct. This is a nearly all-purpose keyboard / mouse subroutine. Autokey$ is my way of not having to code for what is already present in parts.

Say you need to paste new text into an existing filled text field. We need "Select all" chr$(4) followed by "Paste" chr$(22) to accomplish that. So I just use: autokey$ = "chr$(4),chr$(22)" and send it through the routine.

Example:

Code: (Select All)
autokey$ = "1,2,4" ' Let's print choices 1, 2, and 4.
Do
    If Len(autokey$) Then
        b$ = Mid$(autokey$, 1, InStr(autokey$ + ",", ",") - 1) ' Coded autokey$ + "," to allow us not to have to add a trailing comma to our autokey string.
        autokey$ = Mid$(autokey$, InStr(autokey$ + ",", ",") + 1)
    Else
        b$ = InKey$
    End If
    Select Case b$
        Case "1": Print "Pete is tremendous!"
        Case "2": Print "Steve is just amazing."
        Case "3": Print "Note to Steve, buy more buckshot."
        Case "4": Print "What? Steve was writing code before Pete was in diapers!"
    End Select
Loop


Oh, edited in...

@bplus

You asked about the variable 'nob' Number of buttons. My routine allows for mapped button arrays to be recognized. The calling routine then uses the hover variable to highlight or unhighlight the button(s). btl is button top left. btr is button bottom right. I think Steve does something same or similar to map buttons. It sure beats plotting out all four corners with arrays.

Code: (Select All)
For i = 1 To nob ' number of buttons.
If my >= y_btl(i) And my <= y_bbr(i) And mx >= x_btl(i) And mx <= x_bbr(i) Then
b_hover = i
Exit For
End If
Next

Pete
Reply


Messages In This Thread
RE: What do you guys like to use for mouse mapping? - by Pete - 12-22-2024, 05:16 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Polynomial Regression + Mouse Interpolation ' QB64-PE Example ajax12 11 1,210 10-30-2025, 08:23 PM
Last Post: Pete
  Aloha from Maui guys. Cobalt 18 2,971 01-20-2025, 07:33 PM
Last Post: Pete
  Hey guys, riddle me this... Pete 8 1,331 01-01-2025, 02:23 AM
Last Post: Pete
  Clearing the mouse and keyboard buffers Donald Foster 1 599 03-09-2024, 07:47 AM
Last Post: a740g
  IDE' mouse problem with 3.4.1 on macOS Fifi 8 1,872 01-13-2023, 01:06 PM
Last Post: Fifi

Forum Jump:


Users browsing this thread: 1 Guest(s)