Asset - Extension Microsoft Script Control

S

Sam (Deleted User)

Guest



anim0.gif anim1.gif anim2.gif anim3.gif anim4.gif

This extension is [strictly] Windows-only.


This extension is 100% free, open source, and public domain.

Execute VBScript and JScript, (using Microsoft Script Control).

You may execute the code you write within the GMStudio IDE.

You may also execute the code from a given *.VBS or *.JS file.

For more information, see the VBScript and JScript docs here.

The DLL's full source code included.

IMPORTANT NOTE:
In order to use the scripts in the "ActiveX" resource group, you will need to build the game as an installer - this is required. You will also need to replace the contents of your project's default NSIS Windows installer script, with the contents of the "ActiveXInstaller.nsi" installer script, in the included files. If you do not intend to use these functions, you will not need to build your game as an installer, or replace the contents of the default Windows installer script. When testing a game with these functions, you will need to have the required ActiveX controls installed. The easiest way to do that is to install using the "Installer.exe" file.

Please contact me if you have any questions.

Download Now for GameMaker Studio 1.4 and 2
 
Last edited by a moderator:
S

Sam (Deleted User)

Guest
Here's an example VBScript that is compatible with this extension:
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
 
Last edited by a moderator:
S

Sam (Deleted User)

Guest
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
For anyone who wants to see this example in action, you may download the demo executable, (along with the *.VBS file equivalent), here.
 
Last edited by a moderator:
S

Sam (Deleted User)

Guest
Now free for a limited time! (Will edit this post when the 100%-off sale ends).

Edit: Sale is over.
 
Last edited by a moderator:
S

Sam (Deleted User)

Guest
Added 3 new functions.

The most useful one in particular is EvaluateExpression(Expression, Subroutine, Language).

  • Expression defines the return value of EvaluateExpression, based on the given expression code. The return value of EvaluateExpression currently must be a real number. Allowing this function to return a string instead I am hoping to support in the future, that way you retrieve text from input boxes, "browse for folder" dialogs, etc.
  • Subroutine is much like "Statement" in the ExecuteStatement function, only the variables and functions defined in this code can be used in the Expression parameter. The subroutine is executed before and appended above your expression code. This parameter is optional, meaning if you don't need it you can simply write an empty string.
  • Language is the same as it is in the ExecuteStatement function - the language you intend to use for the code you write in the other arguments of the function call. Can either be "VBScript" or "JScript". As usual, do not confuse VBScript with regular VB / VB.NET code or JScript with regular JavaScript you would use in a web browser.

Here's an example usage:
Code:
return_value = EvaluateExpression('MyFunction = "text for no reason..."', '

    Function MyFunction
 
        MyFunction = InputBox("Enter text for no reason...", "This is a VBScript InputBox!", "text for no reason...")
 
    End Function

', "VBScript");

if (return_value == EvaluateExpression('True', '', "VBScript")) {

    ExecuteStatement('
 
        MsgBox "You entered text for no reason...", vbOkOnly + vbInformation, "This is a VBScript MsgBox!"
 
    ', "VBScript");

} else {

    ExecuteStatement('
 
        MsgBox "You did not enter text for no reason...", vbOkOnly + vbInformation, "This is a VBScript MsgBox!"
 
    ', "VBScript");

}
 
Last edited by a moderator:
S

Sam (Deleted User)

Guest
I feel like this asset is taking a little longer to get noticed compared to my other ones.

I have a few ideas why that is, but I'm not sure which one is most applicable:

- Do most people on here not know what VBScript and JScript are capable of?
- Am I not advertising this properly? Should I provide more demos?
- Is this just not that very needed of a feature?

Honest question, I'm curious why this asset isn't getting noticed.
 
Last edited by a moderator:
S

Sam (Deleted User)

Guest
Version 1.6.0 Released!
EvaluateExpression() now returns a string instead of a real.
If you want a real return value, convert the value with real().

The below example will open the default Windows "Browse For Folder" dialog, echoing the selected directory:
Code:
get_open_dirname = EvaluateExpression('get_open_dirname', '

    Function get_open_dirname()

        Set objShell = CreateObject("Shell.Application")
        Set objDir = objShell.BrowseForFolder(0, "Select a Folder", 0, 0)
 
        If (objDir Is Nothing) Then
 
            get_open_dirname = Empty
 
        Else
 
            get_open_dirname = objDir.Self.Path
 
        End If
 
    End Function

', "VBScript");

if (get_open_dirname != "") {

    show_message(get_open_dirname);
 
}
 
Last edited by a moderator:
S

Sam (Deleted User)

Guest
Version 1.8.0 Released!
Added function GetSitehWnd().

This function is essentially the same thing as window_handle(), only it is casted to a type that can be recognized by VBScript, and, (in theory), be used to make most Legacy GM DLL's compatible with GMStudio, (currently untested, but I will try that with a few Legacy GM DLL's eventually). Here's an example:
Code:
// GetSitehWnd gets the handle the main game window, returned as a real.
// This function is useful for VBScripts and JScripts that need an hWnd.
// You will need to convert it to a string when using it in your script.

get_open_dirname = EvaluateExpression('get_open_dirname', '

    Function get_open_dirname()
     
        Set objShell = CreateObject("Shell.Application")
        Set objDir = objShell.BrowseForFolder(' + string(GetSitehWnd()) + ', "Select a Folder", 0, 0)
     
        If (objDir Is Nothing) Then
     
            get_open_dirname = Empty
         
        Else
     
            get_open_dirname = objDir.Self.Path
         
        End If
     
    End Function

', "VBScript");

if (get_open_dirname != "") {

    show_message(get_open_dirname);
 
}
This snippet will behave differently from my last one, due to using GetSitehWnd() for the first parameter of the BrowseForFolder method. Instead of the parent window being the Desktop, (which is what the value of zero represents), it will be the main game window. This means the "Browse For Folder" dialog will keep focus, and cannot be overlapped by the main game window. If you would've used zero for that parameter instead, and you clicked on the game window, it would then overlap the "Browse For Folder" dialog, which is a pain if you click there by accident, especially when in "fake" full-screen mode.
 
Last edited by a moderator:
S

Sam (Deleted User)

Guest
Here's my first JavaScript demo! :D

Microsoft Script Control does not have built-in support for these JavaScript methods:


However, you can add them by injecting the VBScript equivalent into your JavaScript:
Code:
myValue = EvaluateExpression('myFunction()', '

    function alert(message)
    {
        message = message || "";
 
        var objScrCtrl = new ActiveXObject("ScriptControl");
        var caption = "' + window_get_caption() +'";
 
        objScrCtrl.SitehWnd = ' + string(GetSitehWnd()) + ';
        objScrCtrl.Language = "VBScript";
 
        objScrCtrl.ExecuteStatement("MsgBox \"" + message + "\", vbOkOnly + vbExclamation, \"" + caption + "\"");
    }
 
    function confirm(message)
    {
        message = message || "";
 
        var objScrCtrl = new ActiveXObject("ScriptControl");
        var caption = "' + window_get_caption() +'";
 
        objScrCtrl.SitehWnd = ' + string(GetSitehWnd()) + ';
        objScrCtrl.Language = "VBScript";
 
        var expression = objScrCtrl.Eval("MsgBox(\"" + message + "\", vbOkCancel + vbQuestion, \"" + caption + "\")");
 
        return (expression == objScrCtrl.Eval("vbOk"));
    }

    function prompt(text, defaultText)
    {
        text = text || "";
        defaultText = defaultText || "";
 
        var objScrCtrl = new ActiveXObject("ScriptControl");
        var caption = "' + window_get_caption() +'";
 
        objScrCtrl.SitehWnd = ' + string(GetSitehWnd()) + ';
        objScrCtrl.Language = "VBScript";
 
        return objScrCtrl.Eval("InputBox(\"" + text + "\", \"" + caption + "\", \"" + defaultText + "\")");
    }
 
    function myFunction(/* enter args here if needed */)
    {
        // enter function contents here
    }

', "JScript");

// You may use show_message(str) to see the output value of your function:
show_message(myValue);
Rename "myFunction" and edit it's contents to quickly have yourself a working template with those 3 methods added. Works exactly like in Internet Explorer except 1 tiny difference in with the prompt() method - IE's prompt is a little horizontally wider and vertically thinner. Also, with mine, the Cancel and X buttons do not return null. Instead, they return an empty string - this can be fixed by using Visual Basic's StrPtr function, but sadly that is not available in VBScript.

Edit:

I made an ActiveX DLL which has functions that can be called from VBScript and JScript - it gives you an even more improved InputBox, (InputBoxEx), and a JavaScript prompt, (PromptEx), both of which can detect whether the Cancel or X button was pressed. In case of VBScript, you may use a StrPtr wrapper function, (StrPtrEx), on an InputBoxEx call, then you check if it equals zero. If zero, either Cancel or the X button was clicked. In case of JScript, you use a PromptEx call like you do in the JScript you would use for web development - check if it returns null. If null is returned, Cancel or the X button was clicked.

(Both InputBoxEx and PromptEx do *not* have that ugly Windows default application icon in the title bar, unlike VBScript's default InputBox!)

The ActiveX DLL is built using VB5, and can be built from the source code using both VB5 and VB6. I don't own VB6 anymore so sadly this means you will need to install the VB5 runtime to use the DLL in your game. You will also need to register it using regsvr32 in command prompt. After that, you are good to go! I will release the ActiveX DLL along with the VB5 source code, usable code snippets and a demo executable once I can bump this topic in 48 hours.
 
Last edited by a moderator:
S

Sam (Deleted User)

Guest
To reiterate from my previous post:
I made an ActiveX DLL which has functions that can be called from VBScript and JScript - it gives you an even more improved InputBox, (InputBoxEx), and a JavaScript prompt, (PromptEx), both of which can detect whether the Cancel or X button was pressed. In case of VBScript, you may use a StrPtr wrapper function, (StrPtrEx), on an InputBoxEx call, then you check if it equals zero. If zero, either Cancel or the X button was clicked. In case of JScript, you use a PromptEx call like you do in the JScript you would use for web development - check if it returns null. If null is returned, Cancel or the X button was clicked.

(Both InputBoxEx and PromptEx do *not* have that ugly Windows default application icon in the title bar, unlike VBScript's default InputBox!)

The ActiveX DLL is built using VB5, and can be built from the source code using both VB5 and VB6. I don't own VB6 anymore so sadly this means you will need to install the VB5 runtime to use the DLL in your game. You will also need to register it using regsvr32 in command prompt. After that, you are good to go! I will release the ActiveX DLL along with the VB5 source code, usable code snippets and a demo executable once I can bump this topic in 48 hours.
Now I'm releasing all that stuff I said I would.

Here's the demo executables, along with the source code to the Visual Basic 5 DLL:
https://www.dropbox.com/s/xibjezl75wunz5n/Custom ActiveX DLL Example.zip?dl=0

The demo executables will install the VB5 runtime and ActiveX DLL for you. :)
If you want to uninstall the DLL, you will have to do it manually in run command:
Code:
regsvr32 /u DialogExDLL.dll
As for uninstalling the VB5 runtime - I'm not sure how to do that, because it doesn't show up in the program manager. It's super small though, (969 KB), so it shouldn't matter that much. Plus, it will allow you to run and use all other VB5-built apps and controls, not just this one. You may compile the ActiveX DLL's source code with VB6 if you don't want to have to install a runtime for your game to run. (You will still need to register / install the ActiveX DLL either way).

Here's the demo executable's associated GML, VBScript, and JScript:
Code:
ExecuteStatement('

    Function WaitForCompletion(ExecutableName)
 
        strComputer = "."
        Set oWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

        Set colEvents = oWMI.ExecNotificationQuery _
            ("SELECT * FROM __InstanceDeletionEvent WITHIN 5 " _
            & "WHERE TargetInstance ISA ""Win32_Process"" " _
            & "AND TargetInstance.Name = """ + ExecutableName + """")

        Set oEvent = colEvents.NextEvent
 
    End Function

    MyQuestion = MsgBox("This program requires to have a 32-bit ActiveX DLL installed in order to run. You will need to install the Microsoft Visual Basic 5 runtime for the DLL to register. This will need administrative privileges, and only has to be installed once. Would you like to install these files now?", vbYesNo + vbQuestion, "' + window_get_caption() + '")

    If MyQuestion = vbYes Then
 
        Set objShell = CreateObject("Shell.Application")
        objShell.ShellExecute "' + working_directory + 'msvbvm50.exe", , , "runas", 1
        WaitForCompletion("msvbvm50.exe")

        Set objShell = CreateObject("Shell.Application")
        objShell.ShellExecute "regsvr32.exe", "' + working_directory + 'DialogExDLL.dll", , "runas", 1
        WaitForCompletion("regsvr32.exe")
 
    End If
 
    MsgBox "Demo has started! You will now see two input dialog boxes that can detect whether the Cancel button was pressed. This is not possible with pure VBScript or JScript, therefore I decided to write an ActiveX DLL in Visual Basic 5, which can be called from both languages. Feel free to use the DLL and/or the VB5 source code in your own projects.", vbOkOnly + vbInformation, "' + window_get_caption() + '"

', "VBScript")

MyMsg = EvaluateExpression('MyMsg', '

    Set DialogEx = CreateObject("DialogExDLL.DialogExCLS")
    MyInput = DialogEx.InputBoxEx("InputBox() Cancel button detection example...", "' + window_get_caption() + '", "VBScript CreateObject() function example...")
 
    If (DialogEx.StrPtrEx(MyInput) = 0) Then
        MyMsg = "You clicked either Cancel or the X button!"
    Else
        MyMsg = "You did not click Cancel nor the X button!"
    End If

', "VBScript");

show_message(MyMsg);

MyMsg = EvaluateExpression('MyMsg', '

    var DialogEx = new ActiveXObject("DialogExDLL.DialogExCLS");
    var MyInput = DialogEx.PromptEx("Prompt() Cancel button detection example...", "JScript ActiveXObject() function example...");
 
    if (MyInput == null)
        var MyMsg = "You clicked either Cancel or the X button!";
    else
        var MyMsg = "You did not click Cancel nor the X button!";

', "JScript");

show_message(MyMsg);
You will need the ActiveX DLL, (DialogExDLL.dll), and the VB5 runtime installer, (msvbvm50.exe), in your included files for the above code to run. Or, you can remove the ExecuteStatement() function call, which would install that stuff automatically, and instead install the ActiveX DLL and the VB5 runtime using a setup script, (this will require to build your game as an installer, which if you don't want to do that, you can leave the code in there that installs that stuff through within the game itself). Installing these files requires administrative privileges. More demos to come! (Including a way to embed a Windows Media Player control to embed videos and an Internet Browser control in your game window to embed webpages, and so much more!) That's all for now. :D
 
Last edited by a moderator:
S

Sam (Deleted User)

Guest
I've decided to rename the extension from "Execute Statement" to "Microsoft Script Control" to make it more obvious in the title what it is and what it can do. It is basically just a DLL that allows you to use Microsoft Script Control in your System32 folder (a file called "msscript.ocx"). I wanted to make the title as generic as possible while still stating the technology that is being used. If anyone is aware of any legal reasons why I can't use the same title as the technology it uses, please let me know, and I'll be happy to change it again to something else. :)
 
Last edited by a moderator:
S

Sam (Deleted User)

Guest
Version 2.6.0 Released!
Added a lot of new functions.

New functions included:


  • SplashShowVideo(UrlOrFilePath, LoopPlayback)*
  • SplashShowWeb(UrlOrFilePath, HideScrollbars)*
  • ShowMessage(Message)**
  • ShowQuestion(Message)**
  • GetString(Text, DefaultText)**
  • GetOpenDirname(Title, RootFolder)**
  • GetOpenPathname(Title, RootFolder)**

*See the "IMPORTANT NOTE" in the OP for more information on using the splash functions.

**These functions were already possible before this update, I just made it easier to use them by writing the functions for you in VBScript and JScript, which can be written and called from ExecuteStatement() and EvaluateExpression().


Function documentation:

  • SplashShowVideo() shows a given video from a UrlOrFilePath with a Windows Media Player 7 control, and the video either loops or plays until it reaches the end depending on the Boolean value of LoopPlayback. True for looping, otherwise false. You can close or skip the video by either pressing the Escape Key, or clicking the Close Button on the window's title bar.
  • SplashShowWeb() - Shows a webpage or website from a given UrlOrFilePath using an Internet Explorer 7-based control. You may optionally hide the scrollbars with HideScrollbars, a Boolean or Integer value. True for hiding them both, false for hiding neither, 3 for hiding just the horizontal scrollbar, or 4 for hiding just the vertical scrollbar. You may close the Web Browser and return to your game either by pressing the Escape Key or clicking the Close Button on the window's title bar.
  • ShowMessage(). The difference between show_message() and ShowMessage() - ShowMessage() is the same as an IE-based JavaScript alert(), meaning there is an "!" icon in the message box.
  • ShowQuestion(). The difference between show_question() and ShowQuestion() - ShowQuestion() is similar to an IE-based confirm(), meaning there is a "?" icon in the message box. However, unlike a confirm() message, the buttons are "Yes" and "No", instead of "Ok" and "Cancel".
  • GetString(). The difference between get_string() and GetString() - GetString() has a "Cancel" button, and it returns an empty string, (""), when clicked.
  • GetOpenDirname() and GetOpenPathname(). The difference between GetOpenDirname() and GetOpenPathname() - they both do open an Open Folder Dialog, which returns the selected folder string when "Ok" is clicked, and an empty string, (""), when "Cancel" is clicked. Both are exactly the same except GetOpenPathname() includes the last slash, thus it returns the full path name when "Ok" is clicked. GetOpenDirname() excludes the last slash, therefore it returns the full directory name when "Ok" is clicked. Both functions have a Title and a RootFolder parameter. Title is the text to be displayed above the folder selector, usually you will want this to say something like "Select a Folder". Note: this is not the title bar text, it is a text label inside the dialog. RootFolder is the path or directory of which to include in the Open Folder Dialog, so all of its subfolders will be selectable, but anything outside of this location will not be selectable. Use zero instead of a string if you do not want to limit what folders can be selected.

Edit:

Since it isn't documented in this thread, I figured I'd mention what was added in Version 2.0.0.

Version 2.0.0 Released!
Added function ExecuteShellEx().

New function included:

  • ExecuteShellEx() - Executes a program, opens a file, or runs a command. This is different from the ExecuteShell() function in my Execute Shell extension is several ways. 1) it can open files in the default program because you don't need to specify what program to open them with. This is how Execute Shell for Linux works as well. 2) Unlike Execute Shell for Windows, ExecuteShellEx and Execute Shell for Linux both have a working "wait" parameter. The only way I could figure out a way to get the wait parameter to work on Windows was by using VBScript and/or JScript to do it, using my Microsoft Script Control extension. There is a third argument however, and it allows you to execute the shell silently, meaning you can run batch files, and other stuff you may want to be hidden, to run invisibly. Note: never run a program, file, or command hidden, unless you know for a fact from testing that it will close by itself automatically, otherwise it will continuously run in the background and you will have to close it in the "Processes" tab of the Windows Task Manager. ExecuteShellEx can be used to replace Execute Shell for Windows, as it has no bugs and is more functional, just like Execute Shell for Linux. Although, keep in mind, Execute Shell for Linux has no "Run Hidden" parameter, so keep that in mind for true cross platform development.
 
Last edited by a moderator:
S

Sam (Deleted User)

Guest
Installer.png

If you want to distribute a game of yours that uses the splash functions, as a single executable or zip file, (as apposed to an installer), you may now do so. But you still need to have the runtime files installed. So, I created a simple, one-click install and one-click uninstall program. First, download this zip archive:

https://www.dropbox.com/sh/0vupd8cwtdhn82a/AADeB5cKuOKz6iSMG6NQ38Iva?dl=0

Then add the exe inside that zip to your project's distribution, and instruct the users who downloads your game in an online description or readme text file that they need to run this program first. It runs as administrator automatically, but if you are on a nonadministrative account, you may need to log in as an admin account to run the installer. Other than that, it could not be any easier to use, especially if your game's audience will mainly be admin users. :D

Edit:

Wanted to point out, this is my 666th post. lol.

lol.png
 
Last edited by a moderator:
S

Sam (Deleted User)

Guest
Version 3.0.0 Released!
  • Added Install.exe for easy installation
  • Fixed several bugs with DialogEx.dll
  • Added several new useful functions
I'm really curious why this isn't being downloaded / bought more.
Is the major turn-off having to learn new programming languages?
Or is it the fact some of the functions require building an installer?
 
S

Sam (Deleted User)

Guest
Added this new video tutorial to the OP (and the asset page):

 
S

Sam (Deleted User)

Guest
Because I wanted people to be able to make and sell their own versions and arrangements of this extension, it is now 100% free, open source, and public doman. If you want to use this extension to create and sell your own ActiveX-based extensions, i.e. like described in my tutorial, obviously, you may do that as well. :D
 
S

Sam (Deleted User)

Guest
Version 3.2.0 Released!
  • Added function ProgIDExists() to check ActiveX installs.
  • InputBoxEx now returns zero when input is cancelled.
  • PromptEx now returns zero when input is cancelled.
ProgIDExists() is useful for checking whether an ActiveX ProgID exists in your registry, so you can throw customizable errors asking the user to reinstall the application if any dependencies are not currently registered. Since GameMaker can differentiate between zero as a real and zero as a string, you can now check whether input was cancelled with InputBoxEx() and PromptEx(). :D
 
S

Sam (Deleted User)

Guest
Added part 2 of the "ActiveX Extension Creation" tutorial series to the OP and the asset page, also can be seen below:


I'm really hoping I stumble across someone who actually wants/needs this extension at some point. lol
 
S

Sam (Deleted User)

Guest
To remind everyone, this extension brings back splash_show_video() and splash_show_web(). Compatible with GMS 1.4 and 2. The only problem is that you need to build your game as an installer, using the provided installer script in the included files, "ActiveXInstaller.nsi". You can press the escape key or click the close button to close/skip the video/webpage control. The splash video supports all formats supported by Windows Media Player 7, and you have the option to loop the video, just like the original splash_show_video() function. As for the splash_show_web() function implementation, currently has no timeout parameter like the original function, but I can add it for compatibility purposes, if anyone needs it. :) I'm investigating a means to do this without needing to build an installer for your game.
 
Last edited by a moderator:
Top