Hi there,
I just started learning to script in Simba using YoHoJo's video tutorials and some reference scripts.
However, I have come across a slightly annoying problem. The main thing is that the y-value of GetMousePos and MoveMouse is off with 22 pixels.
I used the following script to output the mouse positions with a 2sec-interval. I don't think the problem is in there, but I'll post it anyway:
Simba Code:
program Tester;
{$I SRL/SRL.Simba}
var x, y: integer;
begin
SetupSRL;
Repeat
GetMousePos(x, y);
SendKeys('(' + IntToStr(x) + ', ' + IntToStr(y) + ')', 10, 0);
TypeByte(VK_ENTER);
Wait(2000);
Until(false);
end.
(Don't worry, I did not execute it in Runescape)
Basically the script shows the position of the mouse every 2 seconds. If I move my mouse to the top left corner it should show (0, 0) right? Well, it doesn't, it shows (0, -22). In fact for every point it is misaligned by -22px. The built-in Simba coordviewer (on the bottom) shows it correctly (that one returns (0, 0)). I did another test using the MoveMouse-function, which happened to be misaligned with the same magnitude. So to move my mouse to the top left corner, I had to input the coords (0, -22) instead of the expected (0, 0). I haven't tried the colour finding function yet, but I assume those will be wrong as well.
Of course it's possible to take it into account in my scripts and work my way around it. But it's probably a problem on my side, and if I ever was to share it with others they would not be able to use my scripts as they don't have that problem. And also it's something annoying I want to get fixed.
I have Simba 0.99 installed with version 992. I followed YoHoJo's video installing guides. Everything is running on a 64-bit Win7 Home Premium.
I hope someone recognized my problem and can help me with it.
Thanks in advance!