Karpov
2012-06-07 17:51:52
Hello.
Quick question please, if I use the SetTarget(Proc: TSysProc) function to select a client window, is there then a further command that I can use to select a target area within the window for Simba to operate on?
For example, if I use Simba's 'Select a client' button on the Runescape client, it correctly identifies the 'work area' rather than the entire window.
Thanks very much :)
Runaway
2012-06-07 17:55:25
It depends what you want to do with it, but I'm assuming this will work for what you're trying to do:
GetClientDimensions(w, h);
Karpov
2012-06-08 08:42:44
I've got a custom script that uses SMART and I was curious to see how much modification was required to make it operate on the RuneScape client instead. It took me less than 30 seconds to get this working by commenting out {$DEFINE SMART} and using Simba's 'Select a client' tool on the main game area within the RuneScape client window. This has the same dimensions as the SMART window (765, 503) so my script had no problems adjusting to it.
However, I can't figure out how to select the game area using scripting. If I try FindAndSetTarget('RuneScape', true) followed by GetClientDimensions(x, y), this targets the whole RuneScape client window and gives me the dimensions for it. I thought there might be another command that would allow me to set the client to a sub-area of the target window, just like Simba's tool can.
Shouldn't require any modification, drag the cross-hair in Simba onto your runescape client before you run your script and it will register that as your window (provided {$DEFINE SMART} is commented out).
This also works for if you are writing/editing the script, select the client window then when you pick colours and such it will return the colour along with the co-ordinates in relation to your game client.
Runaway
2012-06-08 10:57:57
There are a few window functions here:
http://docs.villavu.com/simba/scriptref/window.htmlI don't think it's really relevant though? You'll never need to switch targets if you're just scripting for runescape, and if you are doing it for something else you can either set that as the target or set the whole desktop as the target.