Results 1 to 5 of 5

Thread: Client area within a target window?

  1. #1
    Join Date
    May 2012
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Client area within a target window?

    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

  2. #2
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    It depends what you want to do with it, but I'm assuming this will work for what you're trying to do:

    Simba Code:
    GetClientDimensions(w, h);

  3. #3
    Join Date
    May 2012
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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.

  4. #4
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    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.

  5. #5
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    There are a few window functions here: http://docs.villavu.com/simba/scriptref/window.html

    I 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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •