Well this took a while. @_@
It's a Microsoft Agent Browser where you can load/unload Agents to perform various commands including:
It might be easier to just look at the dialog rather than me explaining it.
What the stuff in each of the tabs can do:
Basically, you can control almost every possible command that the Agent can do.
If you aren't familiar with Agents, I suggest you should take a peek at the help file before rating or commenting on this snippet: /help agents
When testing this script, please make sure your OS is Windows...thank you.
I originally got this idea from Kyuuryu_Kijoutsu who submitted the first Microsoft Agent Dialog to Hawkee about three years ago.
I peeked at that about a week ago and I've been motivated to make a similar dialog but with more functionality (i.e. talking, moving, sizing, etc.), and now...here it is! :)
Here's a picture:
Enjoy! :D
dialog agent {
title "Microsoft Agent Browser"
size -1 -1 182 207
option dbu
tab "Agent Information", 4, 1 -2 181 219
text "Installed Agents:", 2, 32 15 43 7, tab 4
list 1, 25 25 56 52, tab 4 size
list 3, 102 25 56 52, tab 4 size
text "Loaded Agents:", 5, 110 15 41 7, tab 4
button "Load Agent", 8, 28 79 50 10, tab 4
button "Unload Agent", 9, 105 79 50 10, tab 4
text "Name:", 11, 17 105 17 8, tab 4
edit "", 12, 36 104 50 11, tab 4 read
text "File:", 13, 97 105 12 8, tab 4
box "Speech", 15, 19 119 67 35, tab 4
box "Starting Size", 10, 98 119 66 35, tab 4
text "Pitch:", 16, 29 128 16 8, tab 4
text "Width:", 17, 108 128 18 8, tab 4
text "Speed:", 18, 26 141 19 8, tab 4
edit "", 19, 51 127 27 11, tab 4 read
text "Height:", 21, 107 141 20 8, tab 4
edit "", 23, 131 140 27 11, tab 4 read
box "Settings", 24, 19 156 145 20, tab 4
check "Visible", 25, 30 163 28 12, tab 4
check "Effects", 27, 127 163 28 12, tab 4
box "Agent Information", 28, 13 95 158 86, tab 4
button "CLOSE! :D", 29, 51 184 81 20, tab 4
edit "", 14, 111 104 54 11, tab 4 read
edit "", 22, 131 127 27 11, tab 4 read
edit "", 20, 51 140 27 11, tab 4 read
check "Idle", 26, 81 163 28 12, tab 4
tab "Agent Positioning", 6
combo 31, 59 31 65 48, tab 6 size drop
box "Agent Selection", 30, 35 15 115 31, tab 6
edit "", 43, 35 63 27 11, tab 6 read
edit "", 44, 75 63 27 11, tab 6 read
button "Get Coordinates", 45, 109 62 45 13, tab 6
button "Move", 46, 70 95 37 13, tab 6
box "Move Agent", 49, 20 53 143 59, tab 6
text "Default Agent", 58, 76 23 35 8, tab 6
box "Point Agent", 52, 20 112 143 44, tab 6
edit "", 47, 35 122 27 11, tab 6 read
edit "", 48, 75 122 27 11, tab 6 read
button "Get Coordinates", 50, 109 121 45 13, tab 6
button "Point", 51, 70 138 37 13, tab 6
box "Size Agent", 57, 20 156 143 47, tab 6
edit "", 53, 35 168 27 11, tab 6
edit "", 54, 75 168 27 11, tab 6
button "Get Size", 55, 109 167 45 13, tab 6
button "Set Size", 56, 36 185 53 13, tab 6
button "Restore to Default", 59, 102 185 53 13, tab 6
radio "Slow", 60, 50 85 24 10, tab 6
text "Speeds:", 63, 78 78 22 8, tab 6
radio "Fast", 61, 77 85 24 10, tab 6
radio "Instant", 62, 103 85 29 10, tab 6
tab "Agent Speech", 7
combo 32, 59 31 65 50, tab 7 size drop
text "Use the following text to preview the voice.", 33, 37 62 106 8, tab 7
button "Preview Voice", 34, 120 73 37 12, tab 7
check "Think", 35, 117 108 46 10, tab 7
edit "", 36, 20 74 89 44, tab 7 multi autovs
list 38, 19 133 47 65, tab 7 size
text "Default Agent", 39, 76 23 35 8, tab 7
button "Play a sound file...", 40, 114 90 49 12, tab 7
box "Agent Selection", 41, 35 15 115 31, tab 7
box "Agent Text/Sound Preview", 42, 15 52 153 73, tab 7
box "List of Actions", 37, 15 125 56 78, tab 7
box "Balloon Options", 64, 76 163 92 40, tab 7
check "Enable/Disable", 65, 101 172 47 10, tab 7
check "Hide", 66, 83 186 22 10, tab 7
check "Size", 67, 114 186 21 10, tab 7
check "Pace", 68, 141 186 23 10, tab 7
box "Stop Agent Commands", 69, 76 125 92 35, tab 7
button "[]", 70, 84 135 30 20, tab 7
radio "All", 71, 134 134 17 10, tab 7
radio "Talk", 72, 119 145 21 10, tab 7
radio "Play", 73, 143 145 21 10, tab 7
tab "Info", 74
text "You can get the core components from:", 76, 44 56 98 9, tab 74
link "http://www.microsoft.com/msagent/downloads/user.aspx#core", 77, 14 65 156 8, tab 74
text "You can get additional Agents from:", 78, 48 76 88 8, tab 74
link "http://www.microsoft.com/msagent/downloads/user.aspx#character", 79, 9 84 168 8, tab 74
text "Please be careful what you download from untrusted sites:", 80, 20 112 143 8, tab 74
link "http://www.msagentring.org/chars.aspx", 81, 40 120 100 8, tab 74
box "Hawkee Snippet Link:", 75, 26 19 131 22, tab 74
link "http://www.hawkee.com/snippet/5708/", 82, 43 28 97 8, tab 74
box "Microsoft Links:", 83, 5 48 173 49, tab 74
text "My personal favorite: (Pikachu :D)", 84, 49 131 83 8, tab 74
link "http://www.msagentring.org/chars.aspx?char=pikachu", 85, 24 139 134 8, tab 74
box "Other Links:", 86, 5 104 173 48, tab 74
box "Contact Information:", 87, 5 159 173 39, tab 74
text "Made by: Kirby", 88, 19 171 37 8, tab 74
text "Assistant: Blitzjager", 89, 13 183 49 8, tab 74
link "irc://irc.quakenet.org/Taco", 90, 107 170 67 8, tab 74
text "Network:", 91, 79 170 23 8, tab 74
link "http://kirby.xqr2.net/", 92, 113 183 53 8, tab 74
text "Website:", 93, 79 184 23 8, tab 74
}
menu * {
Microsoft Agent Browser : agent
}
alias agent { if ($agent(0).char > 0) { dialog $iif($dialog(agent),-v,-m) agent agent } | else { echo -a You don't have any Agents installed! } }
on *:dialog:agent:*:*: {
if ($devent == init) && ($did == 0) {
var %agent 1, %agents $agent(0).char
while (%agent <= %agents) { did -a agent 1 $agent(%agent).char | inc %agent 1 }
var %agent 1, %agents $agent(0)
while (%agent <= %agents) { did -a agent 3,31,32 $agent(%agent) | inc %agent 1 }
did $iif($agent(0) = 0,-b,-e) agent 9,31,32
if (!$did(agent,3).sel) { did -b agent 12,14,19,20,22-23,25-27 }
if (!$did(agent,31).sel) { did -b agent 43-48,50-51,53-56,59-63 }
if (!$did(agent,32).sel) { did -b agent 34-36,38,40 }
did -c Agent 62,71
did -b Agent 65-68,70-73
}
if ($devent == sclick) {
if ($did == 3) {
if ($did(agent,3).sel) {
$iif(!$agent($did(3).sel).visible,.gshow $agent($did(3).sel)) | did -era $dname 12 $agent($did(3).sel) | did -era $dname 14 $agent($did(3).sel).fname | did -era $dname 19 $agent($did(3).sel).pitch | did -era $dname 20 $agent($did(3).sel).speed | did -era $dname 22 $agent($did(3).sel).ow | did -era $dname 23 $agent($did(3).sel).oh
did $iif($agent($did(3).sel).visible,-ec agent 25,-eu agent 25) | did $iif($agent($did(1).sel).idle,-ec agent 26,-eu agent 26) | did $iif($agent($did(3).sel).effects,-ec agent 27,-eu agent 27)
}
}
if ($did == 8) { if ($did(1).sel) { .gload $gettok($did(1).seltext,1,46) $did(1).seltext | $iif(!$agent($gettok($did(1).seltext,1,46)).visible,.gshow $agent($gettok($did(1).seltext,1,46))) | did -a agent 3,31,32 $gettok($did(1).seltext,1,46) | did -c agent 38 | did -b agent 34-36,38,40 | did $iif($agent(0) = 0,-b,-e) agent 9,31,32 } }
if ($did == 9) { if ($did(3).sel) { .gunload $did(3).seltext | did -d agent 3,31-32 $did(3).sel | did -r agent 12,14,19,20,22-23,36,38,43,44,47,48,53-54 | did -u agent 25-27,60-62,65-68,71-73 | did -c agent 38 | did -b agent 9,25-27,34-36,38,40,45-46,50-51,55-56,59,60-62,65-68,70-73 | did $iif($agent(0) = 0,-b,-e) agent 9,31-32 } }
if ($did == 25) {
if ($agent($did(3).sel).visible) { did -u agent 25 | .ghide $agent($did(3).sel) }
else { did -c agent 25 | .gshow $agent($did(3).sel) }
}
if ($did == 26) {
if ($agent($did(3).sel).idle) { did -u agent 26 | .gopts -i $agent($did(3).sel) off }
else { did -c agent 26 | .gopts -i $agent($did(3).sel) on }
}
if ($did == 27) {
if ($agent($did(3).sel).effects) { did -u agent 27 | .gopts -e $agent($did(3).sel) off }
else { did -c agent 27 | .gopts -e $agent($did(3).sel) on }
}
if ($did == 29) { dialog -x agent }
if ($did == 31) { did -e agent 43-45,47-48,50,53-55,60-63,53-54 }
if ($did == 32) {
.gtalk $agent($did(32).sel) You have selected Microsoft Agent $agent($did(32).sel) as mIRC's default voice.
var %action 1, %actions $agent($agent($did(32).sel), 0).anim | did -r agent 38 | did -e agent 36,38
while (%action <= %actions) { did -a agent 38 $agent($agent($did(32).sel), %action).anim | did -e agent 40 | inc %action 1 }
var %x $agent($did(agent,32).sel).balloon | did -c agent $+($iif(on isin %x,$+(65,$chr(44))),$iif(hide isin %x,$+(66,$chr(44))),$iif(size isin %x,$+(67,$chr(44),)),$iif(pace isin %x,$+(68,$chr(44)))) | did -e agent 65-68,70-73
}
if ($did == 34) {
var %x $did(agent,36).lines, %y 1
while (%y <= %x) { set %agent.text $addtok(%agent.text,$did(agent,36,%y),32) | inc %y }
did -r agent 36 | .gtalk $iif($did(35).state == 1,-k) $gettok($did(32),1,46) %agent.text | unset %agent.text
}
if ($did == 40) { if ($sfile(*.wav,Choose a sound file to play)) { did -r agent 36 | .gtalk -w $did(32) $nopath($v1) $?="Enter text for $agent($did(32)) to say with $nopath($v1) " } }
if ($did == 45) { window -dx @agent | window -dx @agent | did -e agent 46 | .gtalk $did(31) Double click where you would like me to move. }
if ($did == 46) { .gmove $did(31) $did(43) $did(44) $iif($did(60).state == 1,2000,$iif($did(61).state == 1,1,0)) | did -b agent 46 }
if ($did == 50) { window -dx @agent2 | window -dx @agent2 | did -e agent 51 | .gtalk $did(31) Double click where you would like me to point. }
if ($did == 51) { .gpoint $did(31) $did(47) $did(48) }
if ($did == 55) { var %a $?!="Resize the window to $+($did(31),'s) desired size and hit 'Enter'." | window -dC @agent3 1 1 128 128 }
if ($did == 56) { if ($did(53) isnum) && ($did(54) isnum) { did -b agent 56 | .gsize $did(31) $did(53) $did(54) | did -e agent 59 } }
if ($did == 59) { did -b agent 59 | .gsize $did(31) $agent($did(31)).ow $agent($did(31)).oh | did -e agent 56 }
if ($did == 65) { var %x $did(65).state | .gopts -b $did(32) $iif(%x == 1,on,off) | .gtalk $did(32) Balloons are now $iif(%x == 1,enabled.,disabled.) | if (%x == 0) { did -b agent 66,67,68 } | else { did -e agent 66,67,68 } }
if ($did == 66) { .gopts -b $did(32) on $iif($did(66).state == 1,hide,nohide) | .gtalk $did(32) Balloons will $iif($did(66).state == 1,now automatically hide.,no longer automatically hide.) }
if ($did == 67) { .gopts -b $did(32) on $iif($did(67).state == 1,size,nosize) | .gtalk $did(32) Balloons will $iif($did(67).state == 1,now,not) resize to fit text. }
if ($did == 68) { .gopts -b $did(32) on $iif($did(68).state == 1,pace,nopace) | .gtalk $did(32) Text $iif($did(68).state == 1,will now,will not) appear as spoken. }
if ($did == 70) { .gstop $did(32) $iif($did(72).state == 1,talk,$iif($did(73).state == 1,play)) }
if ($istok(77 79 81 82 85 90 92,$did,32)) { run $did($did) }
}
if ($devent == dclick) {
if ($did == 1) { if ($did(1).sel) { .gload $gettok($did(1).seltext,1,46) $did(1).seltext | $iif(!$agent($gettok($did(1).seltext,1,46)).visible,.gshow $agent($gettok($did(1).seltext,1,46))) | did -a agent 3,31-32 $gettok($did(1).seltext,1,46) | did -c agent 38 | did -b agent 34-36,38,40 | did $iif($agent(0) = 0,-b,-e) agent 9,31-32 } }
if ($did == 3) { if ($did(3).sel) { .gunload $did(3).seltext | did -d agent 3,31,32 $did(3).sel | did -r agent 12,14,19-20,22,23,36,38,43-44,47-48,53-54 | did -u agent 25-27,60-62,65-68,71-73 | did -c agent 38 | did -b agent 9,25-27,34-36,38,40,45-46,50-51,55-56,59,60-62,65-68,70-73 | did $iif($agent(0) = 0,-b,-e) agent 9,31-32 } }
if ($did == 38) { .gplay $did(32) $did(38).sel 5 }
}
if ($devent == edit) {
if ($did == 36) { did $iif($did(agent,36).text,-e,-b) agent 34,35 }
if ($did(53) isnum) && ($did(54) isnum) { did -e agent 56,59 }
}
}
menu @agent {
dclick: did -ra agent 43 $mouse.x | did -ra agent 44 $mouse.y | window -c @agent
}
menu @agent2 {
dclick: did -ra agent 47 $mouse.x | did -ra agent 48 $mouse.y | window -c @agent2
}
on *:keydown:@agent3:13: { did -ra agent 53 $window(@agent3).w | did -ra agent 54 $window(@agent3).w | did -e agent 56,59 | window -c @agent3 }
Korvin: Of course you do! But, of course, there is help: http://en.wikipedia.org/wiki/MS_Agent - Microsoft Agents (as dictated by Wikipedia.org)
Kirby: This is very awesome! I was always going to write one of these, just always got side-tracked. Nice job! 10/10 -- +1 like