Results 1 to 20 of 20

Thread: How could I...

  1. #1
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default How could I...

    1) Make a script get the dimensions of the whole screen when its been targeted on the RuneScape client ?

    2) Make the script detect which window you are on (task bar on windows XP) and change that, then change back ?

  2. #2
    Join Date
    Jul 2008
    Location
    England
    Posts
    763
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    1. Use GetClientDimensions

    2. Not sure.
    lol

  3. #3
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Quickmarch View Post
    1. Use GetClientDimensions

    2. Not sure.
    For the WHOLE SCREEN ? or just the client itself?

  4. #4
    Join Date
    Jul 2008
    Location
    England
    Posts
    763
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Dr D. Dervish View Post
    For the WHOLE SCREEN ? or just the client itself?
    Oh, sorry, i thought you just meant the client.
    lol

  5. #5
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Dr D. Dervish View Post
    For the WHOLE SCREEN ? or just the client itself?
    Testing it would take you about 2 mins..

    2) Can't be done in Scar(90% sure)

  6. #6
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by N1ke! View Post
    Testing it would take you about 2 mins..

    2) Can't be done in Scar(90% sure)
    It could, I've thought about getting the color of a selected window and the one of the non-selected ones..

    Yet I do not know how to proceed...

    Keep posting please.

  7. #7
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    h := GetClientWindowHandle;
      ResetDc;
      GetClientDimensions(x, y);
      SetClientWindowHandle(h);
    For first point;

    Second point, is there a colour change based on currently selected/active window? ResetDC reverts clients to desktop, so may be possible to look for the different colour along the bottom (0, y - 50, x, y for area or something more accurate). From that, store them and then find a non-blank one (window there colour rather than a no window colour?) and then switch back after clicking.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  8. #8
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    My TaskBar :



    The Darker one is the selected window...

  9. #9
    Join Date
    Dec 2006
    Location
    Canada, BC
    Posts
    728
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i would find a TPA of the darker selected bars colors, and then get the middle of it (for the box where it surches just use the color picker to find on your screen the size of your task bar)
    Lance. Da. Pants.

  10. #10
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by Dr D. Dervish View Post
    For the WHOLE SCREEN ? or just the client itself?
    SetDesktopAsBackground; GetClientDimensions.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  11. #11
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    For the question number 2 you would have to use API calls to get the windows and processes opened like the task manager does.
    Last edited by Cazax; 06-01-2009 at 07:14 AM.


  12. #12
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    SetDesktopAsBackground; GetClientDimensions.
    Surely you mean Client, right?

  13. #13
    Join Date
    May 2008
    Location
    Canada
    Posts
    665
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Well, for 2. you can always do it the old fashioned way. detecting the color bitmap of the darker taskbar that represent it is currently being used by you. then detect text. long and inefficient script thou.

    Or

    Just get the icons of the 2 window images + taskbar color to switch between the two. That works for most things, and bitmap needs to be modified each time.
    Both will use the mouse.

  14. #14
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Or make the script Alt Tab and keep cycling through until you find the icon you want .

  15. #15
    Join Date
    May 2008
    Location
    Canada
    Posts
    665
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by Da 0wner View Post
    Or make the script Alt Tab and keep cycling through until you find the icon you want .
    wow, I didnt know that that was a command. xD.

  16. #16
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Noob, how do you not know about alt-tab O_O.

  17. #17
    Join Date
    May 2008
    Location
    Canada
    Posts
    665
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    well, usually just a move and click was fast enuf for me. So, I never bothered learning shortcuts like that =D.

  18. #18
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    SetDesktopAsBackground; GetClientDimensions.
    How can I get back to the Client afterwards ?

    Thanks for all your answers.

    I will do it the old fashioned way for the window changing I believe.

  19. #19
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Do mixter()'s method and store the handle to a variable (LongWord) I think, then set the client as that handle.

  20. #20
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by Da 0wner View Post
    Surely you mean Client, right?
    Yea.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

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
  •