*

Discussion in 'Programming General' started by Minted, Dec 2, 2017.

*
  1. Unread #1 - Dec 2, 2017 at 2:48 PM
  2. Minted
    Joined:
    Dec 1, 2017
    Posts:
    70
    Referrals:
    0
    Sythe Gold:
    22

    Minted Member

    *

    Or anybody fluent in the language?
     
    Last edited: Dec 2, 2017
  3. Unread #2 - Dec 2, 2017 at 3:00 PM
  4. GOAT
    Joined:
    Sep 27, 2015
    Posts:
    19,354
    Referrals:
    8
    Sythe Gold:
    200
    Discord Unique ID:
    232534753969045505
    Discord Username:
    goat7777
    Nitro Booster CoolHam Two Factor Authentication User Toast Wallet User

    GOAT <THE GOAT> DISCORD goat7777 UID 232534753969045505
    GOAT Donor

    *

    Haven't used it in a few years, but I know it pretty well. What did you need help with?
     
  5. Unread #3 - Dec 2, 2017 at 3:02 PM
  6. Minted
    Joined:
    Dec 1, 2017
    Posts:
    70
    Referrals:
    0
    Sythe Gold:
    22

    Minted Member

    *

    Oh awesome, I was thinking of contacting you, but I thought you only did payed stuff. Thanks so much for helping! I'll contact you :)
     
  7. Unread #4 - Dec 2, 2017 at 4:53 PM
  8. Minted
    Joined:
    Dec 1, 2017
    Posts:
    70
    Referrals:
    0
    Sythe Gold:
    22

    Minted Member

    *

    GOAT hasn't quite gotten round to looking at the code quite yet I don't think, he's probably busy.

    Here's my code (addressed to Villavu as I'm speaking in their chat):

    https://pastebin.com/V8Yn4tYx

    So, as I explain in the comments, the OSRS client (official) does not behave as any other application would, it does not obtain modality/doesn't get to be "in-focus" when interacting with it. This is a problem, as you will see if you run the code, when a user attempts to enter a string into the username or password entries, it doesn't register.

    For any beginners wanting to help, here's a good way of understanding the problem: open your internet browser (non-maximized), click onto the desktop and now try typing into the URL bar. You'll find that the text is not entered into the URL bar as the web browser is not in-focus.

    Now, this is no doubt some trickery from Jagex, as I've used this code in the past with other applications and it's worked just fine. Is there any way to ensure modality when interacting with the child program (the OSRS window)?

    Thanks in advance.
     
  9. Unread #5 - Dec 4, 2017 at 2:04 AM
  10. Blupig
    Joined:
    Nov 23, 2006
    Posts:
    7,145
    Referrals:
    16
    Sythe Gold:
    1,609
    Discord Unique ID:
    178533992981594112
    Valentine's Singing Competition Winner Member of the Month Winner MushyMuncher Gohan has AIDS Extreme Homosex World War 3 I'm LAAAAAAAME
    Off Topic Participant

    Blupig BEEF TOILET
    $5 USD Donor

    *

    im fukkin tired dude and going to bed but this looks like a job for
    pinvoke.net: setfocus (user32)
     
    ^ Minted likes this.
  11. Unread #6 - Dec 4, 2017 at 3:05 AM
  12. Minted
    Joined:
    Dec 1, 2017
    Posts:
    70
    Referrals:
    0
    Sythe Gold:
    22

    Minted Member

    *

    Unfortunately the job's probably not as simple as that, I already tried and it yielded the same results as if you were to click on the titlebar (so that it appears in focus), then if you were to click on the client (on one of the login fields, for example), out of focus.

    I've begun trying to implement some sort of method with SendMessage, SetForegroundWindow and GetForegroundWindow API's. However this might throw up the same problem.

    Off topic, but do you know of any ways to prevent the "Advertisement" error when loading 3 or more RuneScape client (happens in OSRS and the legacy RS3 client). I've had a review of the source for the legacy client, but I haven't managed to find a reference to anything about that error (yet). Do you know any solutions (apart from just opening them in quick succession).

    Thanks :)
     
  13. Unread #7 - Dec 5, 2017 at 12:00 AM
  14. Blupig
    Joined:
    Nov 23, 2006
    Posts:
    7,145
    Referrals:
    16
    Sythe Gold:
    1,609
    Discord Unique ID:
    178533992981594112
    Valentine's Singing Competition Winner Member of the Month Winner MushyMuncher Gohan has AIDS Extreme Homosex World War 3 I'm LAAAAAAAME
    Off Topic Participant

    Blupig BEEF TOILET
    $5 USD Donor

    *

    Don't know anything about RS anymore really so I can't help with that ad error, but have you tried using SetFocus on other hwnds? There are usually a few in every process
     
  15. Unread #8 - Dec 5, 2017 at 3:17 AM
  16. Minted
    Joined:
    Dec 1, 2017
    Posts:
    70
    Referrals:
    0
    Sythe Gold:
    22

    Minted Member

    *

    They're not explicit processes as such that I can simply get the handle for and set, they're canvases - JNI/JAWT; SunCanvas. I'm still finding a solution. :|
     
  17. Unread #9 - Dec 5, 2017 at 12:28 PM
  18. Blupig
    Joined:
    Nov 23, 2006
    Posts:
    7,145
    Referrals:
    16
    Sythe Gold:
    1,609
    Discord Unique ID:
    178533992981594112
    Valentine's Singing Competition Winner Member of the Month Winner MushyMuncher Gohan has AIDS Extreme Homosex World War 3 I'm LAAAAAAAME
    Off Topic Participant

    Blupig BEEF TOILET
    $5 USD Donor

    *

    FindWindowEx can get you child handles if you get the class name from Spy++

    pinvoke.net: FindWindowEx (user32)

    Follow the instructions in the comments
     
    ^ Minted likes this.
  19. Unread #10 - Dec 6, 2017 at 6:31 AM
  20. Minted
    Joined:
    Dec 1, 2017
    Posts:
    70
    Referrals:
    0
    Sythe Gold:
    22

    Minted Member

    *

    Thank you for the insight blupig ;)

    However, I've decided to try to create my own applet. It would do me some good to learn a bit of Java. This way I can bypass the un-bypassable "Unable to create advertisement" error - simply no solution for that when using the official client(s) except for just opening them in quick succession.

    Thanks for your help though.
     
    Last edited: Dec 6, 2017
< Need someone who is experienced with C# | Hacker. >

Users viewing this thread
1 guest


 
 
Adblock breaks this site