Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

RM Web Browser

RM Web Browser
Version: 1.0
By: Berka


Introduction

Now, you're able to launch a web browser directly in the Rgss Player.

Features

  • Esc key quits the browser
  • The Maximize Window button is activated. You can resize your rgss player

Screenshots

Is it really usefull ?

Demo

None

Script
the dll is there: copy it in the root of your project

Code:
#===============================================================================

#                              RM Web Browser                             4/8/09

#-------------------------------------------------------------------------------

#  par Berka                        v 1.0                           rgss 1 & 2        

#-------------------------------------------------------------------------------

# Display a web browser in the rgss player.

#  - NEED the cwebpage.dll. It HAS TO be placed on the root of the project.

#  - Esc to close the browser, F5, Back keys

#  - Clic on the maximize button to resize the window

#  call: Net.browser("http://rpgmakervx.1fr1.net")

#===============================================================================

 

wdll="cwebpage.dll"

GPPS = Win32API.new('kernel32', 'GetPrivateProfileString', 'pppplp', 'l')

FW   = Win32API.new('user32',   'FindWindow',              'pp',     'i')

SWL  = Win32API.new('user32',   'SetWindowLong',           'lll',    'l')

GCR  = Win32API.new('user32',   'GetClientRect',           'lp',     'i')

GAKS = Win32API.new('user32',   'GetAsyncKeyState',        'i',      'i')

EBO  = Win32API.new(wdll,       'EmbedBrowserObject',      'l',      'i')

DHP  = Win32API.new(wdll,       'DisplayHTMLPage',         'lp',     'i')

RB   = Win32API.new(wdll,       'ResizeBrowser',           'lll',    'i')

UEBO = Win32API.new(wdll,       'UnEmbedBrowserObject',    'l',      'l')

DPA  = Win32API.new(wdll,       'DoPageAction',            'll',     'l')

def handle

  GPPS.call("Game","Title","",title="\0"*256,256,".//Game.ini")

  FW.call("RGSS Player",title.delete!("\0"))

end

 

SWL.call(handle,-16,0x10C70000|0x00080000)

 

def dimensions

  GCR.call(handle,rect=[0,0,0,0].pack('l4'))

  rect.unpack('l4')[2..3]

end

module Net

  def self.browser(url)

    EBO.call(handle)

    DHP.call(handle,url)

    RB.call(handle,*dimensions)

    loop do

      break if GAKS.call(0x1b)&0x01==1

      DPA.call(handle,0)if GAKS.call(0x08)&0x01==1

      DPA.call(handle,4)if GAKS.call(0x74)&0x01==1

      RB.call(handle,*dimensions)

    end

    UEBO.call(handle)

  end

end

Net.browser("http://rpgmakervx.1fr1.net")

Instructions

See comments in the script, please.

Compatibility

Does not work for RMXP: hangup bugs.

Credits and Thanks

Notepad++, for his hexadecimal browser.
The Dll's creator.

Terms and Conditions

Free for use... but DO NOT post my script everywhere whithout permission. Thanks !

best regards,

berka
 
Damn, you stole my idea! Oh well, I had no clue how to do this anyway...

Great work berka, keep scripting! :thumb:

EDIT: Tested! Works great(except for the awful slowness)!
 
Berka, did you make this dll yourself? If you coded it yourself then the fact that there is an adware with the same name is just a coincidence.
 
Nope. The dll's author is Jeff Glatt.
I think this dll is considered as a spyware since it has an internet interface.

@ ││█║▌│║▌║ ▌│║▌║ ▌││ thanks !

berka
 
I approve of this script. :smile:

I don't approve of necroposts when they are also spam. Please refrain from doing so in the future ~ Zeriab
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top