|
From: creedon <icr...@us...> - 2006-02-16 01:26:51
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/winShell/data/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4592 Added Files: minimizeAll expandEnvironmentStrings getEnvironmentVariables createUrlShortcut msgBox mapNetworkDrive getRegistryValue createShortcut Log Message: apps.winShell from the Windows Frontier.root --- NEW FILE: getRegistryValue --- FrontierVcsFile:1:optx:system.verbs.apps.winShell.data.scripts.getRegistryValue Function Main (registryPath) Dim shell Set shell = CreateObject ("Wscript.Shell") Main = shell.RegRead (registryPath) End Function --- NEW FILE: createShortcut --- FrontierVcsFile:1:optx:system.verbs.apps.winShell.data.scripts.createShortcut Sub Main (path, targetPath) Dim shell Dim shortcut Set shell = CreateObject ("Wscript.Shell") Set shortcut = shell.CreateShortcut (path) shortcut.TargetPath = targetPath shortcut.Save End Sub --- NEW FILE: minimizeAll --- FrontierVcsFile:1:optx:system.verbs.apps.winShell.data.scripts.minimizeAll Sub Main Dim shell Set shell = CreateObject ("Shell.Application") shell.MinimizeAll End Sub --- NEW FILE: mapNetworkDrive --- FrontierVcsFile:1:optx:system.verbs.apps.winShell.data.scripts.mapNetworkDrive Function Main (driveLetter, share) ' Map a share to a drive letter. ' driveLetter should be of the form Z: ' share should be of the form \\Server\\share Dim network Set network = CreateObject ("Wscript.Network") network.MapNetworkDrive driveLetter, share Main = 1 ' Return true to Frontier End Function --- NEW FILE: expandEnvironmentStrings --- FrontierVcsFile:1:optx:system.verbs.apps.winShell.data.scripts.expandEnvironmentStrings Function Main (s) Dim shell Set shell = CreateObject ("WScript.Shell") Main = shell.ExpandEnvironmentStrings (s) End Function --- NEW FILE: createUrlShortcut --- FrontierVcsFile:1:optx:system.verbs.apps.winShell.data.scripts.createUrlShortcut Sub Main (filename, url) Dim shell Dim urlLink Set shell = CreateObject ("Wscript.Shell") Set urlLink = shell.CreateShortcut (filename) urlLink.TargetPath = url urlLink.Save End Sub --- NEW FILE: getEnvironmentVariables --- FrontierVcsFile:1:optx:system.verbs.apps.winShell.data.scripts.getEnvironmentVariables Function Main ' Get a tab-delimited list of all environment variables. ' Frontier will parse this list and turn it into a table. Dim shell, varName, varText Set shell = CreateObject ("Wscript.Shell") varText = "" ' Loop through the list of variables. For Each varName In shell.Environment ("SYSTEM") varText = varText + varName + vbTab Next Main = varText End Function --- NEW FILE: msgBox --- FrontierVcsFile:1:optx:system.verbs.apps.winShell.data.scripts.msgBox Function Main (message, buttonsNum, title) Main = MsgBox (message, buttonsNum, title) End Function |