This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fileSystem = new ActiveXObject("Scripting.FileSystemObject"); | |
filesystem.FolderExists(folderName)) | |
folder = filesystem.CreateFolder(folderName); | |
filesystem.CopyFolder(sourcoldername, targetfoldername); | |
file = filesystem.CreateTextFile(filename, true, false); | |
file.WriteLine("<HTML>"); | |
file.Close(); | |
------------------------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getFileContent(/*String!*/ filename) { | |
var file=fileSystem.OpenTextFile(filename,/*ForReading*/ 1, /*DoNotCreate*/false) ; | |
var text=file.ReadAll() ; | |
file.Close() ; | |
return text ; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Execution through Shell.Application | |
var shell = new ActiveXObject("Shell.Application") ; | |
shell.ShellExecute("cmd arg1 arg2 ...") | |
//--- Execution through WScript | |
var shell = new ActiveXObject("WScript.Shell"); | |
// Execute the command | |
ws.run( "notepad.exe foo.txt") ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var shell = new ActiveXObject("WScript.Shell") ; | |
var exec = shell.Exec("C:\\cmd arg1 arg2 arg3") | |
while (! exec.StdOut.AtEndOfStream) { | |
strLine = objExecObject.StdOut.ReadLine() | |
Wscript.Echo "out: " & strLine | |
Loop | |
Do Until objExecObject.StdErr.AtEndOfStream | |
strLine = objExecObject.StdErr.ReadLine() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<H1>This page shows how PHP can connect to StarUML</H1> | |
<?php | |
$comapplication = "StarUML.StarUMLApplication" ; | |
$staruml = new COM($comapplication) or die ("can open COM object : $elem") ; | |
echo "COM object $comapplication created<br>" ; | |
/* shows the application */ | |
$staruml->Visible = 1 ; | |
$projectManager = $staruml->ProjectManager ; | |
// open a project for instance | |
$projectManager->OpenProject("C:\\metamodels\\featuremodel.uml"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
See http://www.w3schools.com/jsref/jsref_obj_string.asp | |
length | |
Returns the length of a string | |
charAt() | |
Returns the character at the specified index | |
charCodeAt() | |
Returns the Unicode of the character at the specified index | |
concat() | |
Joins two or more strings, and returns a copy of the joined strings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See an example in the StarUML translator for excel | |
// (StarUML\modules\staruml-generator\translators\excel\ExcelTranslator.js) | |
var excel = new ActiveXObject("Excel.Application"); | |
excel.visible = true ; | |
excelWorkbook = excel.Workbooks.Open(excelfile); | |
// xlNormal = -4143 (&HFFFFEFD1) | |
// ... | |
excelWorkbook.SaveAs(outputFilename, -4143, "", "", false, false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Here comes some code that initialize some global variables | |
// This code is an excerpt of StarUML translators | |
//////////////////////////////////////////////// | |
// createFile : | |
// | |
function createFile(path) { | |
notify('Creating file '+ path + '...'); | |
return fileObject.CreateTextFile(path, true, false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// These functions allow to get a list of elements according to the | |
// REPEAT feature of staruml templates | |
// This piece of code comes from the StarUML translators | |
//////////////////////////////////////////////// | |
// getAllRecursiveElements : | |
// | |
function getAllRecursiveElements(isDeep, rootElem, filterType) { | |
// 1.get elem's type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Const kOpenTermChar = "{" | |
Const kCloseTermChar = "}" | |
Const kExternalTermChar = "^" | |
Const kQuotingChar = """" | |
Const kNewTermIdPrefix = "-" | |
Const kTermIdDelimiter = "#" | |
OlderNewer