hi, I have created script which cycles through keys Q,W,E,R using mouse scroll. This helps to select a card on Android emulator with a mouse wheel.
Code: Select all
startPos := 0
endPos := 3
pos := startPos
WheelDown::
if (pos = 0) {
send {W}
pos++
return
}
else if (pos = 1) {
send {E}
pos++
return
}
else if (pos = 2) {
send {R}
pos++
return
}
else if (pos = 3) {
send {Q}
pos := startPos
return
}
WheelUp::
if (pos = 0) {
send {R}
pos := endPos
return
}
else if (pos = 1) {
send {Q}
pos--
return
}
else if (pos = 2) {
send {W}
pos--
return
}
else if (pos = 3) {
send {E}
pos--
return
}
Numpad0::
pos := startPos
send {Q}
Code: Select all
keyArray := [Q,W,E,R]
startIndex := 0
Index := startIndex
WheelDown::
Send keyArray[Index]
Shift Index to the Next Element, Jump to 0 index if the last Key reached
return
WheelUp::
Send keyArray[Index]
Shift Index to the Previous Element, Jump to Last index if the first Key reached
return
Numpad0::
Index := startIndex
send {Q}