Depending on how many times a key combination was pressed,
I would like to execute different commands.
I tried it with a test example, but it didn't work:
Code: Select all
MyNumber := 0
~^+F11::
MyNumber := MyNumber ++
Sleep 3000
if (MyNumber = 1) Run, Calc.exe
if (MyNumber = 2) Run, mspaint.exe
Calc.exe should be executed.
If it gets pressed a second time within 3000 ms,
Calc.exe should not be executed but mspaint.exe.
How must be the working code?
Since I got no syntax error when running the code, I guess it's a logical mistake.
Maybe MyNumber is always 0...
Regards