' ' ' LIVINGACTOR INSTALL FOR IE LIBRARY VERSION 1.6.0.0 ' ' copyrights La Cantoche Production ' all rights reserved ' ' ' '------------------------------------------------ ' Global Stuff '------------------------------------------------ ' not used for now 'IE_Installer_Version = "2, 1, 0, 0" HighSecurity = False IE_Init() ///////////////////////////////////////////////////////////////////////////////////////// // Init Functions when loading ///////////////////////////////////////////////////////////////////////////////////////// '---------- Init LivingActor For IE ----------- Sub IE_Init() Dim IE_Plugin On Error Resume Next currentPluginVersion = 0 currentPluginVersion = document.LIVINGACTORPLUGIN.Version 'alert currentPluginVersion If (currentPluginVersion >= CInt(LA_PluginVersion)) Then Set LA_GenericPlugin = document.LIVINGACTORPLUGIN If(LA_GenericPlugin.ClientData("IsReloading") = "True") Then LA_ACTOR_URL = LA_GenericPlugin.ClientData("ActorURL") LA_UserDefined = LA_GenericPlugin.ClientData("UserValue") Call HandleEventPollMode() ActorLoading() End If Else document.LIVINGACTORPLUGIN.LoadActor "fake.liv" document.LIVINGACTORPLUGIN.Quit End If End Sub '---------- Init LivingActor For IE ----------- '---------- Check LivingActor For IE ----------- Function IE_CheckLivingActor() 'alert "IE_CheckLivingActor" IE_CheckLivingActor = false On Error Resume Next currentPluginVersion = 0 currentPluginVersion = LA_GenericPlugin.Version If (currentPluginVersion >= CInt(LA_PluginVersion)) Then IE_CheckLivingActor = true End If End Function '---------- Check LivingActor For IE ----------- '---------- Install LivingActor Version ----------- Sub IE_Install() If(HighSecurity = False) Then On Error Resume Next currentDownloadProgress = -1 currentDownloadProgress = document.IE_INSTALLER.DownloadProgress If (currentDownloadProgress = -1) Then Call LA_OnAuthenticodePopup() document.body.insertAdjacentHTML "BeforeEnd", " " IE_WaitForCabDownload End If Else ManageError(E_HIGH_SECURITY_OR_USER_SAY_NO) End If End Sub '---------- Install LivingActor Version ----------- '------------------------------------------------ ' Local Stuff '------------------------------------------------ '---------- Run Until installer Cab Downloaded ----------- Sub IE_WaitForCabDownload() On Error Resume Next InstallerReadyState = -1 InstallerReadyState = Document.IE_INSTALLER.readystate If (InstallerReadyState>=0 AND InstallerReadyState<4) Then window.setTimeout "IE_WaitForCabDownload",100,"VBScript" Else currentError = -1 currentError = document.IE_INSTALLER.Error If (currentError = -1) Then HighSecurity = True ManageError(E_HIGH_SECURITY_OR_USER_SAY_NO) Else document.IE_INSTALLER.Install IE_WaitForInstaller End If End If End Sub '---------- Run Until installer Cab Downloaded ----------- Sub IE_WaitForInstaller() On Error Resume Next currentError = E_INSTALL_ABORTED currentError = document.IE_INSTALLER.Error If(currentError = E_NO_ERROR) Then If(document.IE_INSTALLER.HasFinished) Then Set LA_GenericPlugin = CreateObject("ActiveX.CantocheLivingActor") If (IE_CheckLivingActor()) Then LA_GenericPlugin.ClientData("IsReloading") = "True" LA_GenericPlugin.ClientData("ActorURL") = LA_ACTOR_URL LA_GenericPlugin.ClientData("UserValue") = LA_UserDefined top.document.location.href = top.document.location Else ManageError(E_CANNOT_FIND_PLUGIN_VERSION_REQUESTED) End If Else window.setTimeout "IE_WaitForInstaller",200,"VBScript" End If Else ManageError(currentError) End If End Sub