Here's an example VBScript that is compatible with this plugin, (you will need to format the quotes differently if you want to use this code in GMS2):
Code:
ExecuteStatement('
Set Screen = CreateObject("InternetExplorer.Application")
Screen.FullScreen = True
Screen.TheaterMode = True
ScreenWidth = Screen.Width
ScreenHeight = Screen.Height
Screen.Quit
Set objShell = CreateObject("WScript.Shell")
Set objIE = CreateObject("InternetExplorer.Application")
Sub CheckEscKey
If objIE.document.parentWindow.event.keycode = 27 Then bEsc = True
End Sub
With objIE
.FullScreen = True
.TheaterMode = True
.MenuBar = False
.StatusBar = False
.ToolBar = False
.Resizable = False
.Width = 640
.Height = 480
.ClientToWindow .Width, .Height
.Left = (ScreenWidth / 2) - (.Width / 2)
.Top = (ScreenHeight / 2) - (.Height / 2)
.Navigate "http://www.yoyogames.com/"
.Visible = True
Set Processes = GetObject("winmgmts:").InstancesOf("Win32_Process")
intProcessId = ""
For Each Process In Processes
If StrComp(Process.Name, "iexplore.exe", vbTextCompare) = 0 Then
intProcessId = Process.ProcessId
Exit For
End If
Next
If Len(intProcessId) > 0 Then
objShell.AppActivate intProcessId
End If
If .FullScreen = True Or .TheaterMode = True Then
Do While bEsc = False And (err.number = 0)
Do While .Busy
Dim dteWait
dteWait = DateAdd("s", 0.000001, Now())
Do Until (Now() > dteWait)
Loop
Loop
Set .document.body.onkeypress = GetRef("CheckEscKey")
For i = 1 To 100
If (err.number <> 0) Or bEsc Then Exit Do
Next
Loop
.Visible = False
.Quit
End If
End With
', "VBScript");
This example is an Internet Explorer browser control object.
You may set .FullScreen and .TheaterMode, (which are basically the same thing), to False if you would rather have it run in windowed mode, just keep in mind it won't embed in the game window. In fullscreen it will run in a separate window as well, but it's less ugly because unless you hit Alt-Tab, it will look as if it's one window. Press Escape to close the browser. Feel free to adjust the .Width and .Height to resize the browser window, (for windowed mode), or edit anything else in this script, (if you know what you're doing, I mean). The only problem with fullscreen is your game window gets minimized. You will need to un-minimize it using a different extension such as my
Window Manipulation DLL.
Probably the most important thing to note here is that .Navigate should be the actual URL you want your browser to go to when it opens.
It's really cool what you can do with VBScript and JScript. You can even combine your VBScript and JScript with your GML!
More demos will come, stay tuned!
Samuel