![]() |
![]() |
![]() |
|
X-Setup Pro PluginsNote for everybody who is visiting this page via a search engine like Google: If you are interested in using this plugin, because it contains a tweak you would like to have, it's easy as 1-2-3-4:
Plugin details
This is the HTML representation of the plugin Show/Hide Items (Version 1.02) which can be found in the following path(s) in X-Setup Pro classic:
The plugin can be executed on the following Windows versions (Operation Systems):
Description :
The plugin was created by Svyatoslav Holub
The plugin offers the following user-interface controls: Below is the code of this plugin written in "VBScript". Please note that this code can only be executed inside X-Setup Pro.
visibleMenuExt="HKCU\Software\Microsoft\Internet Explorer\MenuExt"
unvisibleMenuExt="HKCU\Software\Microsoft\Internet Explorer\MenuExt-"
dim visibleCount, unvisibleCount, visibleMenuExists, unvisibleMenuExists
dim doubleElements()
Sub Plugin_Initialize
'Clear listbox
elemNumber = visibleCount + unvisibleCount
For l = 1 to elemNumber
SetUIElement l, ""
Next
visibleCount = 0
unvisibleCount = 0
visibleMenuExists = RegPathExists(visibleMenuExt)
unvisibleMenuExists = RegPathExists(unvisibleMenuExt)
If visibleMenuExists = true Then
visibleCount=RegEnumPaths(visibleMenuExt)
If CBool (visibleCount) Then listAddNew visibleCount, 0, true
End If
If unvisibleMenuExists = true Then
unvisibleCount=RegEnumPaths(unvisibleMenuExt)
If CBool (unvisibleCount) Then listAddNew unvisibleCount, visibleCount, false
End If
If visibleCount + unvisibleCount = 0 Then
SetUIElement 1, GetTextString(1)
Disable
End If
End Sub
Sub Plugin_Apply(ElementIndex,ElementSubIndex)
'Nothing to do, if IE settings in Registry were meantime for example manual changed.
If RegistryChanged = true Then Exit Sub
'Delete double entries.
If unvisibleCount > 0 Then
doubleCount = RegEnumPaths(unvisibleMenuExt)
Redim doubleElements(doubleCount)
For z=1 to doubleCount
unvElement = RegEnumElement(z)
If RegPathExists(visibleMenuExt & "\" & unvElement) = true Then
'to prevent out of bounds error by delete
doubleElements(z-1) = unvElement
unvisibleCount = unvisibleCount - 1
End If
Next
For n=0 to UBound(doubleElements)
If doubleElements(n)<>"" Then deleteSubKey unvisibleMenuExt & "\" & doubleElements(n)
Next
End If
moveCounter = 0
For i=1 to visibleCount
If GetUIElementEx(i) = false Then
moveSubKey GetUIElement(i), visibleMenuExt, unvisibleMenuExt
moveCounter = moveCounter + 1
End If
Next
elemNumber = visibleCount + unvisibleCount
For i=visibleCount + 1 to elemNumber
If GetUIElementEx(i) = true Then
moveSubKey GetUIElement(i), unvisibleMenuExt, visibleMenuExt
moveCounter = moveCounter + 1
End If
Next
If moveCounter = 0 Then
MsgInformationTextString 2
Else
IndicateSettingChange
Plugin_Initialize
MsgInformationTextString 3
End If
End Sub
Sub Plugin_Terminate
End Sub
Sub listAddNew (elemCounter, listCounter, visibilityFlag)
dim offset
For i=1 to elemCounter
extText=RegEnumElement(i)
If visibilityFlag = false Then
'hide double entries
If RegPathExists(visibleMenuExt & "\" & extText) = true Then
offset = offset + 1
Else
j = i + listCounter - offset
SetUIElement j, extText
SetUIElementEx j, visibilityFlag
End If
Else
j = i + listCounter
SetUIElement j, extText
SetUIElementEx j, visibilityFlag
End If
Next
End Sub
Sub moveSubKey (Name, parentSourceKey, parentDestinationKey)
dim i, j
dim fullSourceKey, fullDestinationKey
dim pathsCount, valuesCount
dim defaultString, value, data, dataType
fullSourceKey = parentSourceKey & "\" & Name
fullDestinationKey = parentDestinationKey & "\" & Name
pathsCount = RegEnumPaths(fullSourceKey)
If pathsCount <> 0 Then
For j=1 to pathsCount
moveSubKey RegEnumElement(j), fullSourceKey, fullDestinationKey
Next
End If
defaultString = RegReadValue(fullSourceKey & "\@")
RegWriteValue fullDestinationKey & "\@", defaultString, 1
valuesCount = RegEnumValues(fullSourceKey)
For i=1 to valuesCount
value = RegEnumElement(i)
data = RegReadValue(fullSourceKey & "\" & value)
dataType = RegValueType(fullSourceKey & "\" & value)
RegWriteValue fullDestinationKey & "\" & value, data, dataType
RegDeleteValue fullSourceKey & "\" & value
Next
RegDeletePath fullSourceKey
End Sub
Sub deleteSubKey (fullName)
dim x, y
dim values, pathsCount
pathsCount = RegEnumPaths(fullName)
If pathsCount <> 0 Then
For x=1 to pathsCount
deleteSubKey fullName & "\" & RegEnumElement(x)
Next
End If
values = RegEnumValues(fullName)
For y=1 to values
valueName = RegEnumElement(y)
RegDeleteValue fullName & "\" & valueName
Next
RegDeletePath fullName
End Sub
'Check, if IE settings in Registry were meantime for example manual changed.
'If yes, plug-in restarts.
Function RegistryChanged
If visibleMenuExists <> RegPathExists(visibleMenuExt) Then
IndicateSettingChange
RestartMessage
RegistryChanged = true
Exit Function
ElseIf visibleMenuExists = true Then
If visibleCount <> RegEnumPaths(visibleMenuExt) Then
IndicateSettingChange
RestartMessage
RegistryChanged = true
Exit Function
End If
End If
If unvisibleMenuExists <> RegPathExists(unvisibleMenuExt) Then
RestartMessage
RegistryChanged = true
Exit Function
ElseIf unvisibleMenuExists = true Then
If unvisibleCount <> RegEnumPaths(unvisibleMenuExt) Then
RestartMessage
RegistryChanged = true
Exit Function
End If
End If
For i=1 to visibleCount
If RegPathExists(visibleMenuExt & "\" & GetUIElement(i)) = false Then
IndicateSettingChange
RestartMessage
RegistryChanged = true
Exit Function
End If
Next
elCount = visibleCount + unvisibleCount
For i=visibleCount + 1 to elCount
If RegPathExists(unvisibleMenuExt & "\" & GetUIElement(i)) = false Then
RestartMessage
RegistryChanged = true
Exit Function
End If
Next
RegistryChanged = false
End Function
Sub RestartMessage
Plugin_Initialize
MsgWarningTextString 4
End Sub
Comment by the author: Tested on Windows 98SE with Internet Explorer 6.0 You can get more detailed information about this plugin inside the application X-Setup Pro. Get the most popular tweaker software for free: |
|