preload

Load/unload GUI Repositories during run-time (QTP, VBScript)

Posted by Albert Gareev on Apr 15, 2008 | Categories: Source code

Load GUI Repositories


Set FSO = CreateObject("Scripting.FileSystemObject")

For GuiFile in GUICollection

'Check if file exists
  boolRC = FSO.FileExists(GuiFile)
  If Not boolRC Then
     'Error-handling, reporting
     Exit Function
  End If

'Check if GUI repository is already loaded
  intPos = RepositoriesCollection.Find(GuiFile)
  If intPos =  -1 Then
   RepositoriesCollection.Add GuiFile
  End If
Next

Set FSO = Nothing

Unload GUI Repositories


For GuiFile in GUICollection

'Check if GUI repository is really loaded
 intPos = RepositoriesCollection.Find(GuiFile)
  If intPos <> -1 Then
   RepositoriesCollection.Remove GuiFile
  End If
Next


Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported
This work by Albert Gareev is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported.