Results 1 to 7 of 7

Thread: How do you make your script auto-focus on the RS Window?

  1. #1
    Join Date
    Jul 2007
    Location
    America
    Posts
    421
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default How do you make your script auto-focus on the RS Window?

    Are forms somehow needed for this? Sorry if it's a really newbish question (it probably is), but is there any easy way to make your script automatically switch over to your RS window? Maybe a random mouse click into the rs window... i'll try that. Help would be greatly appreciated.

    I keep on answering my own topics Well, sort of.

    I tried doing a random click on RS before, and that didn't work because I messed up the script. I'll try it with WORKING coordinates this time, lol.
    I dunno, those asians are pretty difficult to out-auto, legend has it they don't need sleep or food...~tim0suprem0
    Activity is on the decline - school's got me
    Check out my tutorial[s] on Color Finding!||Procedures and Functions!

  2. #2
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You could basically use anyone of these:
    Code:
    Client control functions
    
    procedure FindWindow(Title: string);
    Finds Client window with specified title. Character case of Title must match that in window title exactly.
    
    function FindWindowTitlePart(Title: string; CaseSensitive: Boolean): Boolean;
    Finds window that contains text specified by Title parameter in window caption.
    
    function FindWindowBySize(Width, Height: Integer): Boolean;
    Finds window with specified size.
    
    
    function GetClientWindowHandle: Integer;
    Get Windows handle value of active client window.
    
    procedure SetClientWindowHandle(H: Integer);
    Set active client window to handle H.
    Example:
    H:= GetClientWindowHandle;
    //specify another client window
    FindWindow('Debug Image');
    ...
    //return to previous client
    SetClientWindowHandle(H);
    
    procedure GetClientDimensions(var Width, Height: Integer);
    Get client width and height.
    I would go with FindWindowBySize..

  3. #3
    Join Date
    Jul 2007
    Location
    America
    Posts
    421
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh, thanks alot! I'll write these down

    I dunno, those asians are pretty difficult to out-auto, legend has it they don't need sleep or food...~tim0suprem0
    Activity is on the decline - school's got me
    Check out my tutorial[s] on Color Finding!||Procedures and Functions!

  4. #4
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    In SRL there's a procedure called FindRS, it finds and activates RS
    Hup Holland Hup!

  5. #5
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by nielsie95 View Post
    In SRL there's a procedure called FindRS, it finds and activates RS
    Didn't know about that one. That would probably your best bet actually kikwit.

  6. #6
    Join Date
    Jul 2007
    Location
    America
    Posts
    421
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol, that does make sense. I guess that's what SRL is for.

    Thanks chris and nielsie!
    I dunno, those asians are pretty difficult to out-auto, legend has it they don't need sleep or food...~tim0suprem0
    Activity is on the decline - school's got me
    Check out my tutorial[s] on Color Finding!||Procedures and Functions!

  7. #7
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No problem, i try to help..

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to make an Auto Login Script
    By Naum in forum OSR Advanced Scripting Tutorials
    Replies: 85
    Last Post: 12-24-2011, 07:53 PM
  2. Replies: 4
    Last Post: 02-06-2009, 04:18 AM
  3. Client window loses focus
    By NosePicker in forum OSR Help
    Replies: 7
    Last Post: 04-02-2008, 12:50 PM
  4. focus on runescape window
    By jir0n in forum OSR Help
    Replies: 2
    Last Post: 12-24-2007, 06:43 PM
  5. Clicking works, but seems to lose window focus?
    By IronTeapot in forum OSR Help
    Replies: 0
    Last Post: 10-13-2006, 01:49 AM

Posting Permissions

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