PDA

View Full Version : Script not running



exa
05-20-2010, 05:06 AM
Hi,
I would like to run a script like this one:

Private Sub txtContract_Labor_KeyPress(KeyAscii)
Dim time

time = 0
If KeyAscii = "{LEFT}" Then
Do While time < 2
sleep 1000
KeyAscii = 0
SendKeys "a"
SendKeys "{NUMLOCK}"
time = time + 1
Loop
time = 0
End If
End Sub


The idea is that when I press left, right, up or down on the airmouse app, it's press for some more time on the computer
So I can turn and walk in a game

Rudi
08-03-2010, 08:08 PM
The code above is a subroutine which is designed to get its input from another bit of code.
You would need to write some more code to call it.

More importantly it would only work as a loop on Windows itself i.e sitting in the background waiting for a particular key to be pressed on the keyboard.
In Air Mouse you need to create a specific custom command, attach the code to it, and it gets executed when you click on the custom command.

What exact sequence of events are you trying to achieve?

Regards,

Rudi