Getting closer ... at least a bit more pleasent ... have nicked a script out of the samples box ... code:
; agent.kix
;
; Demonstrates the use of COM automation to program a Microsoft Agent.
;
; Note : This code sample is provided for demonstration purposes only.
; Microsoft makes no warranty, either express or implied,
; as to its usability in any given situation.
;
; Copyright (C) 2001 Ruud van Velsen.
; All rights reserved.
;
break on
setconsole("hide")
if Ingroup ("Domain Users") and @day = 1
debug off
Sleep 15
;;set password expiration variable
$Pwdage = @MaxPWAge - @PWAge
; DIM $pwexp
; first, try for the defaul agent (the wizard 'Merlin')
if exist( "%WinDir%\msagent\chars\clippit.acs" )
$agentname = "merlin"
else
;
; merlin doesn't live on this PC, try for any other MS Agent
;
$agentname = dir( "%WinDir%\msagent\chars\*.acs" )
if len( $agentname )
$agentname = substr($agentname,1, len($agentname)-4) ; remove .acs extension from name
endif
endif
if len( $agentname )
$agentpath = "%WinDir%\msagent\chars\" + $agentname + ".acs"
$agent = CreateObject ("agent.control.2")
if @error = 0
$agent.connected = "1"
$=$agent.characters.load($agentname,$agentpath)
$char = $agent.characters.character($agentname)
$=$char.show()
$=$char.moveto(400, 300)
$=$char.play("read")
$req=$char.speak("Hello there " + @fullname + ". Just a reminder, you password expires in $pwdage days.")
sleep 90 ; give him time to catch up...
$myreq=$char.wait($req)
$=$char.play("readreturn")
gets $x
else
? "Microsoft Agent not installed, or failed to start. " + @error + " / " + @serror
endif
else
? "Microsoft Agent not installed."
endif
EndIf
; Keep character onscreen awhile after speaking
sleep 50
; Hide last character
$Characters[$Char]{agent}->Hide; }
but cannot seem to make it "go away" ... obviously my "hide" at then end incorrect? Anyone?
_________________________
If not for the last minute ... nothing would get done ...