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

script Spoiler
  1. #===============================================================================
  2. #                              RM Web Browser                             4/8/09
  3. #-------------------------------------------------------------------------------
  4. #  par Berka                        v 1.0                           rgss 1 & 2        
  5. #-------------------------------------------------------------------------------
  6. # Display a web browser in the rgss player.
  7. #  - NEED the cwebpage.dll. It HAS TO be placed on the root of the project.
  8. #  - Esc to close the browser, F5, Back keys
  9. #  - Clic on the maximize button to resize the window
  10. #  call: Net.browser("http://rpgmakervx.1fr1.net")
  11. #===============================================================================
  12.  
  13. wdll="cwebpage.dll"
  14. GPPS = Win32API.new('kernel32', 'GetPrivateProfileString', 'pppplp', 'l')
  15. FW   = Win32API.new('user32',   'FindWindow',              'pp',     'i')
  16. SWL  = Win32API.new('user32',   'SetWindowLong',           'lll',    'l')
  17. GCR  = Win32API.new('user32',   'GetClientRect',           'lp',     'i')
  18. GAKS = Win32API.new('user32',   'GetAsyncKeyState',        'i',      'i')
  19. EBO  = Win32API.new(wdll,       'EmbedBrowserObject',      'l',      'i')
  20. DHP  = Win32API.new(wdll,       'DisplayHTMLPage',         'lp',     'i')
  21. RB   = Win32API.new(wdll,       'ResizeBrowser',           'lll',    'i')
  22. UEBO = Win32API.new(wdll,       'UnEmbedBrowserObject',    'l',      'l')
  23. DPA  = Win32API.new(wdll,       'DoPageAction',            'll',     'l')
  24. def handle
  25.   GPPS.call("Game","Title","",title="\0"*256,256,".//Game.ini")
  26.   FW.call("RGSS Player",title.delete!("\0"))
  27. end
  28.  
  29. SWL.call(handle,-16,0x10C70000|0x00080000)
  30.  
  31. def dimensions
  32.   GCR.call(handle,rect=[0,0,0,0].pack('l4'))
  33.   rect.unpack('l4')[2..3]
  34. end
  35. module Net
  36.   def self.browser(url)
  37.     EBO.call(handle)
  38.     DHP.call(handle,url)
  39.     RB.call(handle,*dimensions)
  40.     loop do
  41.       break if GAKS.call(0x1b)&0x01==1
  42.       DPA.call(handle,0)if GAKS.call(0x08)&0x01==1
  43.       DPA.call(handle,4)if GAKS.call(0x74)&0x01==1
  44.       RB.call(handle,*dimensions)
  45.     end
  46.     UEBO.call(handle)
  47.   end
  48. end
  49. Net.browser("http://rpgmakervx.1fr1.net")
Expand to see the code.


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)!
Looks interesting, but... The dll needed for the script to run seems to be a spyware/adware. Since your link is broken, I tried looking for it over the net and found this:
http://www.fbmsoftware.com/spyware-net/ ... _dll/3259/
http://www.threatexpert.com/files/cwebpage.dll.html

I can give more links but it would be redundant.
Thanks Dargor.
This is quite strange, the dll is okay for me... What antivirus are you using ?

berka
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.
Quote:
Avira AntiVir 7.1.5.73 7.6.0.59 TR/Dropper.Gen
Avast 090804-1 4.8.1229 Win32:Spyware-gen [Trj]

From your file@ http://www.mediafire.com/download.php?0z1kzzlzwdm not others found on the net, I fixed your url.
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 don't have the file, I just run a quick search on google and found that. It's probably a coincidence.
Well the results I posted are from the file that berka posted.
I approve of this script. 🙂

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

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=66614