YoHoJo
2011-11-17 04:28:24
Procedure FKeyTab(Which:String);
Begin
Case Which Of
'inv':
Begin
// If Not GetCurrentTab=25 Then
Writeln(IntToStr(GetCurrentTab));
Begin
KeyDown(VK_F1);
Wait(100 + Random(100));
KeyUp(VK_F1);
End;
End;
'magic':
Begin
//If Not GetCurrentTab=28 Then
Writeln(IntToStr(GetCurrentTab));
Begin
KeyDown(VK_F4);
Wait(100+Random(100));
KeyUp(VK_F4);
End;
End;
End;
End; I call this procedure in my script, sometimes quite rapidly switching from one tab to another.
When using in smart it only works about 3ish times (at best, sometimes it just doesn't) before SMART (I assume) just doesn't press anymore(or it's not being registered by runescape because tabs aren't switching when it's called) and script logs out as failsafe.
Before I had the waits as 40+Random(40), increasing them seemed to help a bit, but not much.
Also my RS seems to lag (slightly) even when running a fresh SMART, maybe this has to do with it?
I know it's a SMART problem because I ran it in browser and it worked just fine.
Maybe SmartHoldKey/SmartReleaseKey have something to do with it? No clue.
If no solution is found I'll just have the procedure click key multiple times until it's registered by RS, but that's less than ideal :/.