Sythe.Org Forums     Register     FAQ     Members List     Calendar     Mark Forums Read    
 
Sythe.Org Forums  
   Runescape Gold

Sythe.org — A Virtual Goods Trading Hub

Make real cash! buying and selling in-game items.

We have a no-scam policy.

You can make thousands playing your favourite games here at Sythe.org.

Just sign up an account and follow the rules!


Take me to

Runescape Markets

Other Game Markets

Support Center

Register an Account

Close
My RS Loader
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 09-29-2011, 11:17 AM
Terrankiller's Avatar
Ex-Administrator
Ex-Administrator Visual Basic Programmers
 
Join Date: May 2005
Location: California
Posts: 1,262
Send a message via MSN to Terrankiller Send a message via Skype™ to Terrankiller
Default My RS Loader

This is my RS Loader for all of you client and bot developers out there. I have included an example on how to use the function. This is an improved version of the "Get RS Applet Handle" example located here: (http://sythe.org/showthread.php?t=1242029). Instead of being lazy and using a loop we use API to enumerate the child window handles into an array. We then get the class names of the window handles to identify which handle in the array is the RS applet. You all can thank me later .

Oh and btw, post 1000.

http://siegetank.net/downloads/sources/RSLoader.zip

__________________
E PLURIBUS UNUM



Spam Forum: Where boys become men.


Last edited by Terrankiller : 09-29-2011 at 11:20 AM.
Reply With Quote
  #2  
Old 09-29-2011, 11:18 AM
Good Game. Good FUCKING game.
Competition Winner $50 USD Donor New
 
Join Date: Jan 2008
Location: le monkie ranker pls -.-
Posts: 1,515
Send a message via ICQ to Deathsnova Send a message via AIM to Deathsnova Send a message via MSN to Deathsnova Send a message via Yahoo to Deathsnova Send a message via Skype™ to Deathsnova
Default Re: My RS Loader

Wow amazing, great job working on it!
It loads RS perfectly for me!
Thanks again!
Reply With Quote
  #3  
Old 10-01-2011, 04:57 PM
Terrankiller's Avatar
Ex-Administrator
Ex-Administrator Visual Basic Programmers
 
Join Date: May 2005
Location: California
Posts: 1,262
Send a message via MSN to Terrankiller Send a message via Skype™ to Terrankiller
Default Re: My RS Loader

Some people have asked questions about why the scale is off when they load the RS Applet. I did that for my client as an example. Here is how you should implement it if you don't want scale issues:

Loader Module:

Code:
    Public Function GetRS(ByVal WB As WebBrowser) As IntPtr

        Dim sClass As New System.Text.StringBuilder("", 256)

        Dim WndList() As IntPtr = GetChildWindows(WB.Handle)

        For i = 0 To UBound(WndList)

            GetClassName(WndList(i), sClass, 256)

            If sClass.ToString = "SunAwtFrame" Then

                'Found the RS Applet
                Return WndList(i)
                Exit Function

            End If

        Next

        Return -1

    End Function
Form Code:

Code:
    Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim rWND As System.Drawing.Rectangle
        Dim wb As New WebBrowser

        Controls.Add(wb)
        wb.Navigate("http://www.runescape.com/game.ws?j=1")

        Do Until wb.ReadyState = 4

            Application.DoEvents()

        Loop

        RSApplet = GetRS(wb)

        If RSApplet = -1 Then

            MsgBox("Could not load RS, you fail")

        Else

            RSlist = GetChildWindows(RSApplet)
            GetWindowRect(RSApplet, rWND)
            SetParent(RSApplet, Me.Handle)
            MoveWindow(RSApplet, 0, 0, rWND.Width, rWND.Height, True)

        End If

        Controls.Remove(wb)

    End Sub
__________________
E PLURIBUS UNUM



Spam Forum: Where boys become men.


Last edited by Terrankiller : 10-01-2011 at 07:30 PM.
Reply With Quote
Reply



Cheap RS Gold Store  Runescape Gold

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

All times are GMT +1. The time now is 08:34 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.1