Valid on NetWare, Symbian OS, UNIX, Windows and Windows CE
The Not function returns the logical negation of an expression.
Function format:
Not(n as Integer) as Integer
Expression.
If the parameter n evaluates to zero, the function returns TRUE (nonzero). Otherwise, returns FALSE (zero).
Example:
rem
Rem This example creates an icon group called DMS Test with an icon to the script editor.
Rem This Example also adds a shortcut on the desktop
Rem
Rem After the creation the icon group and the shortcut will be removed
Rem
' determine location of dmsedit.exe
Dim hkey, dummy As Integer
Dim dmseditPath As String
hkey = RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\ComputerAssociates\DMScript\DMSEdit")
If hKey = 0 Then
MessageBox("Can not open DMSEdit-key", "Desktop Management Scripting", MB_OK + MB_ICONEXCLAMATION)
SetStatus(1)
Exit
End If
If Not(RegQueryVariable(hkey, "dmseditInstalledAt", dmseditPath, dummy) = REG_STRING) Then
MessageBox("dmseditInstalledAt not found or invalid", "Desktop Management Scripting", MB_OK + MB_ICONEXCLAMATION)
SetStatus(2)
Exit
End If
RegCloseKey(hkey)
' Now Create group and icons
If Not(CreateGroup("DMS Test", LNK_PROGRAMS)) Then
MessageBox("Can not create icon group", "Desktop Management Scripting", MB_OK + MB_ICONEXCLAMATION)
SetStatus(3)
Exit
End If
If Not(AddItem("DMS Editor", dmseditPath+"\dmsedit.exe","","", "DMS Test",FALSE,)) Then
MessageBox("Failed to install dmsedit at icon group", "Desktop Management Scripting", MB_OK + MB_ICONEXCLAMATION)
SetStatus(4)
Exit
End If
if Not(CreateLink("DMS Editor", dmseditPath+"\dmsedit.exe","","", "",LNK_NORMAL, LNK_DESKTOP)) Then MessageBox("Failed to install dmsedit at desktop", "Desktop Management Scripting", MB_OK + MB_ICONEXCLAMATION)
SetStatus(5)
Exit
End If
MessageBox("Icons and shortcut has been created, press OK to delete them again","Desktop Management Scripting: Icon Confirm", MB_OK + MB_ICONINFORMATION)
'Delete shortcut
if Not(DeleteItem("DMS Editor", "", LNK_DESKTOP)) Then
MessageBox("Failed to deinstall dmsedit from desktop", "Desktop Management Scripting", MB_OK + MB_ICONEXCLAMATION)
SetStatus(6)
Exit
End If
if Not(DeleteGroup("DMS Test", LNK_PROGRAMS)) Then
MessageBox("Failed to delete icon group", "Desktop Management Scripting", MB_OK + MB_ICONEXCLAMATION)
SetStatus(7)
Exit
End If
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|