Dup Ver Goto 📝

pyautogui notes 001

PT2/lang/python/gui python gui does not exist
To
24 lines, 159 words, 951 chars Page 'PyAutoGui_001' does not exist.

I found out about this recently (kudos to ChatGPT for knowing about it). It makes gui automation very easy, it appears. I'd been fudging around with things like xdotool before.

Examples

Trivial mouse scroll wheel.

import pyautogui
import time
for i in range(5):
  print(i)
  time.sleep(1)
pyautogui.scroll(-10)

I was thinking about using the 8 knobs on a Novation Nocturn, sent via OSC, to generate mouse scroll signals with various modifiers. For Control, Shift, Alt, there are eight possible modifier states, and 8 knobs. Then the 16 buttons can function as macros.

The sender app needs to know none of this (so the hedgehog code is already fine). I don't even need the paging code. But it makes sense to put this on e.g. page 16 and use the same hedgehog setup as before (that is, forward everything else to Reaper, but page 16 we synthesise mousewheel and key combos).

That's the thinking that led me to this.