Results 1 to 4 of 4

Thread: Selecting the client

  1. #1
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default Selecting the client

    hey all. jw, is there a way to select a client other than using the cross hairs? any procedures/functions?

  2. #2
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    List of client functions:
    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.
    
    procedure ActivateClient;
    Activate client window.
    
    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 SetDesktopAsClient;
    Sets the desktop (default window) as selected client.
    
    procedure SetTargetBitmap(bitmap: Integer);
    Sets bitmap as target for all color/bitmap searching functions. After calling SetTargetBitmap all functions won't be working with client but with specified bitmap.
    Example:
    SetTargetBitmap(flagstaff);
    if(FindColor(x, y, $000066, 0, 0, 3, 2))then
     ...
    The sample above will not search on client screen but in bitmap "flagstaff" instead.
    
    procedure GetClientDimensions(var Width, Height: Integer);
    Get client width and height.
    
    procedure CopyClientToBitmap(bitmap: Integer; xs, ys, xe, ye: Integer);
    Copy client screen part to bitmap specified.
    
    procedure SetTargetDc(Dc: HDC);
    Sets and external device context as target for SCAR's colorfinding functions.
    
    function GetTargetDC: HDC;
    Returns the DC of the currently selected window/bitmap.
    
    procedure ResetDc;
    Sets the device context of SCAR's selected window as target for SCAR's colorfinding functions.
    
    function GetBitmapDc(Bmp: Integer): HDC;
    Returns the device contect of the entered bitmap.
    Take a look at some of the Find and Set window functions there.

  3. #3
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    thank you... where did you find this?

  4. #4
    Join Date
    Sep 2009
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The SCAR manual. Open SCAR, press F1.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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