Show/Hide Toolbars

EmEditor Help

Navigation: EmEditor Help > Macro Reference > Tutorial

EmEditor Macro Reference: Creates Object

Scroll Prev Top Next More
EmEditor Home - EmEditor Help - EmEditor Macro Reference - Tutorial

Creates Object

This section introduces convenient ways of using other Objects available in Windows. To use Objects, use the ActiveXObject Object in JavaScript or CreateObject function in VBScript.

The following example uses WScript.Shell Object to display the current directory.

[JavaScript]

WshShell = new ActiveXObject( "WScript.Shell" );

alert( WshShell.CurrentDirectory );

[VBScript]

Set WshShell = CreateObject( "WScript.Shell" )

alert WshShell.CurrentDirectory

References

g Microsoft MSDN Library: ActiveXObject Object (JavaScript)

g Microsoft MSDN Library: CreateObject Function (VBScript)

Copyright © 2003-2016 by Emurasoft, Inc.