On startup, it will ask you for the name/ip addy of your server or your favorite server. Everytime you start mIRC thereafter, it will ask if you would like to connect to that particular server. I thought it was pretty neat...
#aconyserv off
alias aconyserv {
if ($dialog(aconyserv)) { dialog -x aconyserv }
dialog -m aconyserv aconyserv
}
dialog aconyserv {
title "Auto Connect to Your Server"
size -1 -1 125 50
option dbu
}
on *:dialog:aconyserv:init:*: {
dcx Mark $dname aconyserv_cb
$blk
if (!%your.server) {
set %your.server $$?="Enter server IP Address:" }
$xdc 1 text 4 4 250 20 transparent
xdid -t $dname 1 0,1Would you like to connect to %your.server $+ ?
$xdc 2 button 25 68 82 26
xdid -t $dname 2 Yes
$xdc 3 button 144 68 82 26
xdid -t $dname 3 No
}
alias aconyserv_cb {
if ($2 == sclick) && ($3 == 2) {
server %your.server
dialog -x aconyserv
}
elseif ($2 == sclick) && ($3 == 3) {
dialog -x aconyserv
}
}
on 1:START: {
aconyserv
}
#aconyserv end
menu channel,status {
.Aconyserv
..On: .enable #aconyserv | echo -a AutoConnect2UrServer on
..Off: .disable #aconyserv | echo -a AutoConnect2UrServer off
}
Just a friendly suggestion to make these bits less redundant:
alias aconyserv {
if ($dialog(aconyserv)) { dialog -x aconyserv }
dialog -m aconyserv aconyserv
}
alias aconyserv {
dialog $iif($dialog(aconyserv),-v,-md) aconyserv aconyserv
}
alias aconyserv_cb {
if ($2 == sclick) && ($3 == 2) {
server %your.server
dialog -x aconyserv
}
elseif ($2 == sclick) && ($3 == 3) {
dialog -x aconyserv
}
}
alias aconyserv_cb {
if ($2 == sclick) {
if ($3 == 2) {
server %your.server
dialog -x aconyserv
}
elseif ($3 == 3) {
dialog -x aconyserv
}
}
}