SRL Archive - S.M.A.R.T.

Smat KeyDown/Up or Lag or What?


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 :/.

KingKong

2011-11-17 04:51:04

Same thing happens to me, Keydown for function keys dont work properly :(

YoHoJo

2011-11-17 04:56:50

Hmm and is this also only on SMART with you? Without SMART they work just fine.
Odd thing is (from what I saw) it seemed to work for a few repetitions but not very many.

Hmm so it's not just me/lag must be a common problem, I bet the fix is something simple I hope, maybe a tweak in the SMART plugin or where ever SmartKey is coded.

KingKong

2011-11-17 04:59:55

From: YoHoJo
Hmm and is this also only on SMART with you? Without SMART they work just fine.
Odd thing is (from what I saw) it seemed to work for a few repetitions but not very many.


Yep, only with SMART, it works if used with normal client/browser. Same for me, it worked a couple of times, after that nothing.

Flight

2011-11-17 05:11:01

That makes me wonder if mouse keys are possible with Simba, just not with Smart. I'm gonna give it a try.

YoHoJo

2011-11-17 14:05:37

While Not GetCurrentTab=28 Do
Begin
KeyDown(VK_F4);
Wait(100+Random(100));
KeyUp(VK_F4);
Wait(1500+random(500));
End;

How does that seem as a temporary fix?
Think it would be odd/detectable to Jagex?

Home

2011-11-17 14:55:41

From: YoHoJo
While Not GetCurrentTab=28 Do
Begin
KeyDown(VK_F4);
Wait(100+Random(100));
KeyUp(VK_F4);
Wait(1500+random(500));
End;

How does that seem as a temporary fix?
Think it would be odd/detectable to Jagex?


This is what I do.

 for I := 0 to 2 do
TypeByte(115);

Works always.

~Home

YoHoJo

2011-11-17 16:32:11

Why twice?
Do you also have problems with smart sending keys/FKeys?
Does doing it twice solve it for you?

footballjds

2011-11-17 18:11:56

From: YoHoJo
Why twice?
Do you also have problems with smart sending keys/FKeys?
Does doing it twice solve it for you?


why 3 times?

0
1
2

YoHoJo

2011-11-17 18:13:33

yeah whatever 3 times.
Do multiple presses make it work properly on SMART home?
Seems fishy/detectable though.

Home

2011-11-19 08:34:18

From: YoHoJo
yeah whatever 3 times.
Do multiple presses make it work properly on SMART home?
Seems fishy/detectable though.


Yeah. Sorry for late response. It seems like it takes a while SMART to understand some commands :S


~Home

DeSnob

2011-11-19 08:38:21

I'm not sure if this relates, but on the computer I'm using, the constant use of MakeCompass is making it glitchy. It'll continue turning the compass for about 10 seconds before it stops at the right spot.

i luffs yeww

2011-11-19 10:13:41

From: DeSnob
I'm not sure if this relates, but on the computer I'm using, the constant use of MakeCompass is making it glitchy. It'll continue turning the compass for about 10 seconds before it stops at the right spot.


That has to do with how rs_getCompassAngleDegrees (or whatever) works. When the compass is facing certain ways, the colors are quite off (it's like the quality just goes away :p), and so it can't tell where the compass is facing or something of the sort. What would be better (probably) is to have a wider range in where it can face, or simply assume it will be right and then check (get the angle, hold down whatever arrow key for a certain amount of time, stop, and check).