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
ScriptThe 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