Any other ways than using file reading functions?
I tested IsKeyDown and it don't work because I think it reads smart keypresses which is stupid...
Any other ways than using file reading functions?
I tested IsKeyDown and it don't work because I think it reads smart keypresses which is stupid...
IsFKeyDown, then ReadLn?
Both IsFKeyDown and IsKeyDown works perfectly, you just have to use it in the correct way. Have it in a loop with a short time interval always work - but finding that place in the script is the hard part. The best you can do is to have a form with a TEdit and TButton - so when you click the button it will TypeSend() the text in the box. More complex idea would be an IRC bot where you can do .type TextHere and the bot would type the text, but that requires more work and is not needed at all.
Try it yourself to belive
Simba Code:program MYID;
{$DEFINE SMART}
{$i srl\srl.scar}
{$i reflection\reflection.simba}
begin
SmartSetupEx(134, False, True, False);
SetTargetArray(SmartImageArray, 765,503);
Wait(3000);
repeat
while ((not IsFKeyDown(7)) and (not IsKeyDown(GetKeyCode('a')))) do wait(10);
WriteLn('Worked!');
Wait(1000);
until(false);
end.
^ Does not work for me aswellI works when not useing smart though, so would it be a bug in smart code not srl coding?
Originally Posted by DD on IRC
Hmm, SMART replaces IsKeyDown to SmartisKeyDown so that's the problem I think. Try making a form, that should work.
Why does SRL need to know if Smart is holding down a key...
I don't know anything about anything and barely read the thread and I'm on the toilet on my phone but would adding SetupSRL help?
Well, essentially it doesn't, I suppose. But way back in the day when I wrote the first Smart.scar I overrode all of the basic mouse/key events, and that was one of them. At that point in time, the only thing that was ever detected was whether the script had a key held (idk why, tbh) and no one ever wanted user input. It could be removed, or made optional with a define, but that is up to SRL, not me.
There are currently 1 users browsing this thread. (0 members and 1 guests)