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

Check if user has clicked?


Dynamite

2012-12-12 14:42:53

Is there a way to check if the user has clicked in a certain area/point on smart?

-Boom

Brandon

2012-12-12 15:22:16

GetRealMouse Pos? I thought I saw a function like that.. Else you're going to have to just capture the mouseclick in a function and export it by editing Smart. Shouldn't be too hard.

Uhh you can also make a plugin to do that. Why do you need such functionality if you don't mind me asking?

Olly

2012-12-12 15:26:39

From: Brandon
GetRealMouse Pos? I thought I saw a function like that.. Else you're going to have to just capture the mouseclick in a function and export it by editing Smart. Shouldn't be too hard.

Uhh you can also make a plugin to do that. Why do you need such functionality if you don't mind me asking?


Maybe something like you did with forms while running? but just clicking an area on smart will perform an action?

euphemism

2012-12-12 20:09:42

From: Brandon
GetRealMouse Pos?


Yeah, that's what I used when I made a pseudo-on-SMART form for my include before making an actual form tool. It works okay in some instances, in others it will return a completely wrong point- seems dependent on the OS.

Dynamite

2012-12-13 09:25:40

Where can i find the docs for Realmouse functions.
I am trying to make a interactive report

Brandon

2012-12-13 09:34:57

http://villavu.com/forum/showthread.php?t=65657

That's the first Interactive Report I know of directly on Smart.

GetRealMousePos doesn't exactly work all the time so I'd suggest using an extension or plugin :l



{$DEFINE SMART}
{$I SRL/SRL.Simba}

var
X, Y: Integer;

begin
SetupSRL;

GetRealMousePos(X, Y);

writeln(X);
writeln(Y);
end.

Prints (the wrong coordinates):

[Banana]
Compiled successfully in 1326 ms.
SRL Compiled in 0 msec
Paired with SMART[4500]
32380
32390
Successfully executed.
[/Banana]

Now, if you drag the crosshair to your desktop screen such that it selects 1366x768 box. It prints:

[Banana]
Compiled successfully in 1139 ms.
SRL Compiled in 0 msec
Paired with SMART[4500]
710
-17
Successfully executed.
[/Banana]