Results 1 to 13 of 13

Thread: SetAutoingDefaults (loses focus).

  1. #1
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default SetAutoingDefaults (loses focus).

    When you are in SetAutoingDefaults will put Runescape in SafeMode.. However when it does this, runescape gets a new handle.. And thus the focus will be lost. (Not with SMART).

    There isn't really a way to fix this problem, other than asking the user to target the Runescape client again.

    (No FindWindowBySize isn't a cool solution).

    Any other thoughts about this?
    Verrekte Koekwous

  2. #2
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Quote Originally Posted by mastaraymond View Post
    When you are in SetAutoingDefaults will put Runescape in SafeMode.. However when it does this, runescape gets a new handle.. And thus the focus will be lost. (Not with SMART).

    There isn't really a way to fix this problem, other than asking the user to target the Runescape client again.

    (No FindWindowBySize isn't a cool solution).

    Any other thoughts about this?
    Cant the window be identified by the title?
    There used to be something meaningful here.

  3. #3
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Frement View Post
    Cant the window be identified by the title?
    Well the problem is one might have multiple Runescape's open.. In that case it is likely that it will find the wrong window..
    Verrekte Koekwous

  4. #4
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Quote Originally Posted by mastaraymond View Post
    Well the problem is one might have multiple Runescape's open.. In that case it is likely that it will find the wrong window..
    Before SetAutoingDefaults it would get all handles, after it it would get them again, and the one that has changed would be set as the new handle.
    There used to be something meaningful here.

  5. #5
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Frement View Post
    Before SetAutoingDefaults it would get all handles, after it it would get them again, and the one that has changed would be set as the new handle.
    Now that would be a solution indeed. I'm not sure if scar/simba is capable of doing that though.
    Verrekte Koekwous

  6. #6
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    How about a plugin? I could try one with C++.
    There used to be something meaningful here.

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

    Default

    I think asking to user to select the new one isn't such a bad idea at all.



    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)

  8. #8
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Me and IceFire tried a bunch of stuff in this thread a few days ago..
    http://www.villavu.com/forum/showthread.php?t=54827

  9. #9
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Quote Originally Posted by NCDS View Post
    Me and IceFire tried a bunch of stuff in this thread a few days ago..
    http://www.villavu.com/forum/showthread.php?t=54827
    Did you find a working solution?
    There used to be something meaningful here.

  10. #10
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    No, me nor IceFire could come up with a solution.

  11. #11
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    If we find the webclient window which has RuneScape title. Its the matter of finding the right child window, right?
    There used to be something meaningful here.

  12. #12
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Frement View Post
    If we find the webclient window which has RuneScape title. Its the matter of finding the right child window, right?
    Well, you just need to retrieve a list of all the windows available in Windows and then loop through them to find a possible runescape client..
    Verrekte Koekwous

  13. #13
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Quote Originally Posted by mastaraymond View Post
    Well, you just need to retrieve a list of all the windows available in Windows and then loop through them to find a possible runescape client..
    I think the class is SunAwtCanvas, but the problem is that there might be many. I dunno if it really matters.

    E: Im gonna try to find it with the main handle.
    E2: Ok, so we are going to have a small problem here. As Different browsers are used, they have different child window names / classes. Like in mozilla it could go like this:
    Code:
    +-MozillaUIWindowClass
    |--> MozillaWindowClass
    |---> MozillaWindowClass
    |----> MozillaWindowClass
    |-----> MozillaContentWindowClass
    |------> MozillaWindowClass 
    |-------> MozillaWindowClass
    |--------> MozillaWindowClass
    |---------> SunAwtFrame
    |----------> SunAwtCanvas
    |-----------> SunAwtCanvas
    |------------> SunAwtCanvas
    +-------------> SunAwtCanvas
    E3: Ok so i did a little snippet to show you how they go in opera.


    E4: And i tested the same with FireFox


    E5: So far i've got the big canvas.

    E6: Got the right canvas, now only some final adjustments


    E7: I ran into another problem, in Mozilla FireFox the Canvas' form differently compared to Opera.
    Well I could make it detect what kind of browser it is. IE & FF has the same method, only Opera differs.

    Any opinions / suggestions?

    E8: Tested to work with: Opera, Chrome, FireFox, Internet Explorer

    E9: Here is a plugin, but the problem is that it gives runtime errors, access violation.

    http://pastebin.com/f492fb9f3

    Works fine in my test app, but in scar does not return the handle to the main window.
    SCAR Code:
    begin
    Writeln( IntToStr( FindWindowByTitle( 'RuneScape -' ) ) );
    end.
    Last edited by Frement; 02-14-2010 at 09:54 PM.
    There used to be something meaningful here.

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
  •