Yep, tried lowering the delay, I'll try increasing the OS keyboard delay, it's probably the cause.
edit:
Win Vista -> Control Panel -> Keyboard Properties
Repeat delay: Long
Repeat rate: Slow
keyboardSetDelay() - following values were tested
1000 - Same
100 - Same
10 - Same
1 - Key presses were still twice but no longer in order (considering it's 1ms I'm not surprised
).
Code: Select all
keyboardHold(key.VK_ENTER);
rest(10);
keyboardRelease(key.VK_ENTER);
rest(10);
tried that with rest of 10 and 100, still no change.
edit: A bit more testing, every call to keyboardHold() is exactly two key presses, not one. I glanced over the CPP code, I'm using fullscreen mode, if that helps.
Here is my test script (test.lua):
Code: Select all
function return_user()
keyboardPress(key.VK_ENTER);
rest(100);
--keyboardPress(key.VK_BACK);
--rest(100);
--keyboardPress(key.VK_BACK);
--rest(100);
-- displays "ffoooo"
keyboardHold(key.VK_F);
rest(1000);
keyboardRelease(key.VK_F);
rest(1000);
keyboardHold(key.VK_O);
rest(1000);
keyboardRelease(key.VK_O);
rest(1000);
keyboardHold(key.VK_O);
rest(1000);
keyboardRelease(key.VK_O);
rest(1000);
--keyboardSetDelay(100);
--keyboardType("foobar");
--yrest(10000);
end
function close()
closeProcess(proc);
detach();
end
function init()
proc = openProcess( findProcessByExe("Game.exe") );
win = findWindow("Shaiya");
hdc = openDC(win);
attach(win);
end
-------------------------------------------------
-- FUNCTION MAIN
-------------------------------------------------
function main()
init();
return_user();
close();
end
startMacro(main);
Have you tested keyboardPress()/keyboardType() for shaiya, on your machine?
Could it be an issue with shaiya's message pump? or the Micromacro code?
edit: I tried to run it on Notepad, and the text was correct, it must be an issue with Shaiya's message pump, has anyone got any idea how to get around this?