Here's the script in full:
Code: Select all
if starting:
diagnostics.debug("hello world")
speech.say("penis")
lastx = 0
def print_lastx():
lastx = mouse.deltaX
diagnostics.debug(lastx)
if mouse.deltaX != lastx:
print_lastx()
Firstly, because the function assigns a new value to lastx, and the var is also used outside of the function, the var needs to be global. To do that, I tried using
Code: Select all
lastx = nil
Secondly, does freePIE have a more elegant, or better way to check if the value of mouse.deltaX has changed?
Something along the lines of
Code: Select all
if changed(mouse.deltaX):
Thanks to you!