sykes Posted May 13, 2005 Share Posted May 13, 2005 (edited) I saw this done in VBScript and just had to try to recreate it in AutoIt. Merlin lives in a different directory than the Office helpers, but should be present on all xp computers. The office helpers are only present if you have Microsoft Office installed. I have Office 2003 so you will have to change the path to match your office installation. Let me know what you think. Feel free to modify and change whatever you like. expandcollapse popup#include<guiconstants.au3> GuiCreate("MSAgent Viewer", 280, 100) GuiCtrlCreateLabel("Select Character", 15, 10, 125, 20) GuiCtrlCreateLabel("Select Animation", 150, 10, 125, 20) $combo_name = GuiCtrlCreateCombo("", 10, 35, 125, 20) GuiCtrlSetData($combo_name, "Merlin|Clippit|Dot|F1|Logo|Mnature|OffCat|Rocky") $combo_1 = GuiCtrlCreateCombo("", 145, 35, 125, 20) $btn_submit = GuiCtrlCreateButton("Submit", 80, 65, 125, 20) GuiSetState() While 1 $msg = GUIGetMsg() Select Case $msg = $combo_name $oAgentName = GuiCtrlRead($combo_name) If $oAgentName <> "Merlin" Then $oAgentPath = @ProgramFilesDir & "\Microsoft Office\Office11\" & _ $oAgentName & ".acs" Else $oAgentPath = @WindowsDir & "\Msagent\Chars\" & $oAgentName & ".acs" EndIf $oAgent = ObjCreate("Agent.Control.2") $oAgent.Connected = "True" $oAgent.Characters.Load($oAgentName, $oAgentPath) $oChar = $oAgent.Characters($oAgentName) For $name in $oChar.AnimationNames GuiCtrlSetData($combo_1, $name & "|") Next Case $msg = $btn_submit $anim = GuiCtrlRead($combo_1) $oChar.Show $oStatus = $oChar.Play($anim) While $oStatus.Status > 0 Sleep(100) WEnd $oChar.Hide EndSelect If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend This works with AutoIt Beta Version 3.1.1.28 Edited May 13, 2005 by sykes We have enough youth. How about a fountain of SMART? Link to comment Share on other sites More sharing options...
GaryFrost Posted May 13, 2005 Share Posted May 13, 2005 (edited) try out this line right after the $oChar.show $oChar.speak('\Chr="Whisper"\Hello\Chr="Normal"\ \pau=2000\I am ' & $oAgentName) $oChar.MoveTo(250,250) $oChar.Play("Wave") Edit: or the loop after the animate Edited May 13, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Mosquitos Posted May 25, 2005 Share Posted May 25, 2005 It don't work by me :"> Im having always this error... Sapiente vince, rex, noli vincere ferro! Link to comment Share on other sites More sharing options...
Gigglestick Posted August 18, 2005 Share Posted August 18, 2005 (edited) Has anyone seen custom characters? I'd love to see a Linux penguin character or My. Hanky from South Park.Edit: Found some at http://www.e-clips.com.au Edited August 18, 2005 by c0deWorm My UDFs: ExitCodes Link to comment Share on other sites More sharing options...
kpu Posted August 19, 2005 Share Posted August 19, 2005 It gives me an error on $oAgent = ObjCreate("Agent.Control.2) It shows that it doesn't have " after Control.2 Maybe I'm blind, but I don't see where it's missing in the quote. Thanks http://www.kpunderground.com Link to comment Share on other sites More sharing options...
GaryFrost Posted August 19, 2005 Share Posted August 19, 2005 $oAgent = ObjCreate("Agent.Control.2") SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
kpu Posted August 19, 2005 Share Posted August 19, 2005 $oAgent = ObjCreate("Agent.Control.2")<{POST_SNAPBACK}>I know where the quote was suppose to be.. , it just wasn't seeing it when I tried running it in ScTE. I installed the lastest version of AutoIT and it seemed to have corrected the problem. Thanks. http://www.kpunderground.com Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now