home *** CD-ROM | disk | FTP | other *** search
- "FILE"="Xteq Systems X-Setup Plugin 3.1"
- "TYPE"="8"
- "COUNT"="2"
- "UIPATH"="Test Plug-ins"
- "NAME"="Enum Test"
- "LANGUAGE"="VBScript"
- "TEXT 1"="Display"
- "TEXT 2"="Remove List"
- "DESCRIPTION 1"="This plug-in demonstrates how to use enumeration inside X-Setup and how to use the listbox-plug-in-type."
- "DESCRIPTION 2"="It enumartes all keys below "HKCU\Software" and displays them in a listbox."
- "DESCRIPTION 3"="If you click "Display" it displays the selected item and if you click "Remove List" the item is removed from the list."
- "DESCRIPTION 4"="No changes are made to your system by using this plug-in!"
- "AUTHOR"="Xteq Systems"
- "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
-
-
- sP="HKCU\Software"
- 'Called when the Plugin is started
- Sub Plugin_Initialize
- 'start enumeration
- iCount=RegEnumPaths(sp)
-
- 'perform a loop through all found items
- for l=1 to iCount
- 'get an item
- s=RegEnumElement(l)
-
- 'add it to the listbox
- Call SetUIElement(l,s)
- next
- End Sub
-
-
- Sub Plugin_CheckData(ElementIndex)
- End Sub
-
- Sub Plugin_Apply(ElementIndex,ElementSubIndex)
-
- if ElementIndex=1 then
- 'first button clicked -> display
-
- if ElementSubIndex>0 then
- 'get an item and display it
- s=GetUIElement(ElementSubIndex)
- MsgInformation s
-
- else
- 'user has not selected anything in the listbox
- MsgError "Please select an item!"
- end if
-
- else
- 'second button clicked -> remove
-
- if ElementSubIndex>0 then
- 'remove item by setting it to ""
- Call SetUIElement(ElementSubIndex,"")
-
- else
- 'user has not selected anything in the listbox
- MsgError "Please select an item!"
- end if
-
- end if
- End Sub
-
- Sub Plugin_Terminate
- End Sub
-
-
-
-