Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> RM Web Browser, Access website from your game
berka
post Aug 4 2009, 08:13 AM
Post #1


Level 8
Group Icon

Group: Revolutionary
Posts: 111
Type: Scripter
RM Skill: Advanced




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: copy it into the root of your project:
there

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

This post has been edited by berka: Aug 4 2009, 09:02 AM


__________________________
Go to the top of the page
 
+Quote Post
   
 
Start new topic
Replies
stripe103
post Aug 13 2011, 11:55 PM
Post #2


PHP ERROR: Couldn't get value from UInteger. Value too large
Group Icon

Group: Revolutionary
Posts: 740
Type: Mapper
RM Skill: Intermediate




I don't remember how it is with this script, but if there isn't any address bar, then it's up to the developer(s) to make sure the pages used is secure.
If there is an address bar, then it's just like any kind of browser, it's up to the user on what pages they visit.

This post has been edited by stripe103: Aug 14 2011, 12:15 AM


__________________________

By Axerax

The rest of my sig



Go to the top of the page
 
+Quote Post
   

Posts in this topic
- berka   RM Web Browser   Aug 4 2009, 08:13 AM
- - Speed@   You are the best french rgss2 scripter! This w...   Aug 4 2009, 08:35 AM
- - Speed@   OK, I tested it, i don't like how it blacks ou...   Aug 4 2009, 09:52 AM
- - JoRu   A little buggy (for example, if I call the script ...   Aug 4 2009, 10:45 AM
- - silvershadic   It opens up the webpage at the beginning of the ga...   Aug 4 2009, 11:10 AM
- - berka   Well, the last line of the script is a sample call...   Aug 4 2009, 11:38 AM
|- - silvershadic   QUOTE (berka @ Aug 4 2009, 12:38 PM) Well...   Aug 4 2009, 11:50 AM
- - berka   try that: CODENet.browser("http://thee...   Aug 4 2009, 11:56 AM
|- - silvershadic   QUOTE (berka @ Aug 4 2009, 12:56 PM) try ...   Aug 4 2009, 12:00 PM
- - Speed@   Hey berka, you should tweak the update method more...   Aug 5 2009, 01:36 AM
- - Herendil   Oh yes, this is very useful! I looked for a wa...   Aug 5 2009, 02:37 AM
- - AmIMeYet   Pretty nice Oh, and the dll's creator is cal...   Aug 5 2009, 03:47 AM
- - onidsouza   Great! It supports php, JavaScripts, RubyOnRai...   Aug 5 2009, 03:01 PM
- - sailorspx   is there anyway to make the internet part of this ...   Dec 24 2009, 04:21 PM
- - Xzygon   Lol, necroposter! As far as I can tell, no, t...   Dec 24 2009, 04:40 PM
- - sailorspx   i got the wrong number of arguments (0 of 1) popu...   Dec 30 2009, 04:34 PM
|- - Speed@   QUOTE (sailorspx @ Dec 30 2009, 05:34 PM)...   Dec 31 2009, 02:19 AM
- - sailorspx   if ya wanna see what im using, scroll up and look ...   Jan 4 2010, 04:43 PM
- - dokdo2005   Can I post your script on another site, "http...   Jan 5 2010, 06:31 AM
- - berka   @dokdo: Yes, you can. Thanks for asking ! @sai...   Jan 5 2010, 02:52 PM
- - dokdo2005   When I use your script in a event, the player outp...   Jan 9 2010, 05:58 AM
- - sailorspx   im trying call http://vampirepikapal.chatango.com   Jan 9 2010, 07:23 PM
- - jomarcenter   it can be use as an HTML file? ex. D:/program file...   Mar 14 2011, 05:19 AM
- - Shadyone   Totally awesome I'll be needing this in my ga...   Mar 14 2011, 05:53 AM
- - stripe103   I think it can. But the address may be such as jom...   Mar 14 2011, 10:21 AM
- - berka   Hi, The script is able to display every kind of h...   Mar 19 2011, 12:31 PM
- - Shadyone   Oh that's cool, thats berka   Mar 21 2011, 03:31 AM
- - dotsonface   Pretty good, but has no security software with it....   Aug 13 2011, 03:27 PM
- - joshuathen   thanks for script, iwill put credits for thi9s one   Jan 17 2012, 11:49 PM
- - Jay287   Hey, Sorry if this is a necropost but, line 19 gi...   May 4 2012, 02:42 PM
- - Night_Runner   Make sure to download the dll file (the link is di...   May 8 2012, 04:42 AM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th June 2013 - 07:50 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker