Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Can anyone help with a VBscript & MSAgent question?

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,24628
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Can anyone help with a VBscript & MSAgent question?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Can anyone help with a VBscript & MSAgent question? - 8/9/2005 2:53:09 PM   
  dannyrb

 

Posts: 1
Score: 0
Joined: 8/9/2005
Status: offline
Using MSAgent & VBScript
I want to turn Peedy into a link to a program I use a lot by sending Alt + T as a
keystroke when I left click on him one time.
Until I left click on him to launch the program he can be playing around the
screen and then continue playing after the program
is lauched untill I right click to hide him.
I know how to make him show and play. I just need a kickstart with the part
above.
I have been looking at:
sendkeys &
Sub AgentControl_Click(ByVal CharacterID, ByVal Button, ByVal Shift, ByVal X,
ByVal Y)
End Sub
In all the documentation I've downloaded I can't seem to find a decent
explanation of the click method. I need an example
of how to make this work. Can anyone Help Please. And yes I'm a newbie with
MS Agent.
Here is what I have but it doesn't see the mouse click:

'To change The character,change the strAgentName
strAgentName = "Peedy"
strAgentPath = "c:\windows\msagent\chars\" & strAgentName & ".acs"
Set objAgent = CreateObject("Agent.Control.2")
objAgent.Connected = TRUE
objAgent.Characters.Load strAgentName, strAgentPath
Set objCharacter = objAgent.Characters.Character(strAgentName)
objCharacter.Show
    'The above seven lines can be used as a template for all msagent charactors

Sub AgentControl_Click (ByVal CharacterID, ByVal Button, ByVal Shift, ByVal X, ByVal Y)

'-- If the user clicks the character with button 1 (left mouse button),
'-- make him say something amusing
    WScript.Sleep 20000
    If Button = 1 Then
    objCharacter.speak "No. It says the right mouse button!|Ha! Try your other right!"
    end if
    If Button = 2 Then
    'The right mouse button
    objCharacter.Stop
    objCharacter.Play "Surprised"
    objCharacter.Speak "Hey, that tickles!|Be careful with that pointer!"
   

    End If

End Sub
objCharacter.Speak "I don't feel good"
Do While objCharacter.Visible = True
Wscript.Sleep 250   
Loop

< Message edited by dannyrb -- 8/9/2005 4:29:32 PM >
 
 
Post #: 1
 
 RE: Can anyone help with a VBscript & MSAgent question? - 8/9/2005 10:56:20 PM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
It has been a while since I played around with MSagent, but if I remember correctly there is an app called MASH.  Not sure of the site but do a google search for mash MSagent and you should find it.

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to dannyrb)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Can anyone help with a VBscript & MSAgent question? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts