Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias Serv {
- if ($dialog(serv)) { dialog -x serv }
- dialog -m serv serv
- if ($window(@server)) { window -c @server }
- window -aihznhw0 @server 1 1 0 0
- xdock -m $window(@server).hwnd +b
- }
- dialog serv {
- title "Servers"
- size -1 -1 500 255
- option pixel
- }
- on *:DIALOG:serv:init:*:{
- dcx Mark serv callback_serv
- xdialog -b $dname +ty
- xdialog -g $dname +it images\toolbar.jpg
- xdialog -c $dname 2 listview 5 5 490 220 report singlesel fullrow nolabelwrap tooltip tabstop grid transparent showsel
- xdid -t $dname 2 +l 0 120 Server Name $chr(9) +l 0 120 Server Address $chr(9) +l 0 39 Type $chr(9) +l 0 120 Account $chr(9) +l 0 85 Auto Connect
- list.serv
- xdialog -c $dname 1 button 5 225 75 25 | xdid -t $dname 1 Add Server
- xdialog -c $dname 3 button 85 225 75 25 | xdid -t $dname 3 Update
- xdialog -c $dname 4 button 165 225 75 25 | xdid -t $dname 4 Remove
- xdialog -c $dname 5 button 340 225 75 25 | xdid -t $dname 5 Connect to all
- xdialog -c $dname 6 button 420 225 75 25 | xdid -t $dname 6 Join Selected
- }
- alias callback_serv {
- if ($2 == rclick && $3 == 2) {
- ;y offset varies based upon menu size
- var %y $calc($mouse.cy - $window(-2).y + 50), %x $calc($mouse.cx - $window(-2).x - 20)
- dll dlls\rcyf.dll popup $window(@server).hwnd %x %y
- }
- return
- }
- alias list.serv {
- var %f settings\Servers.ini, %x 1, %a Servers
- while (%x <= $ini(%f, %a, 0)) {
- var %et $ini(%f, %a, %x), %i $readini(%f,%a, %et)
- ;echo -a %x %et $gettok($readini(%f,%a, %et), 1-, 32)
- xdid -a serv 2 + 0 0 0 0 0 0 -1 -1 %et $chr(9) + 0 0 -1 -1 $gettok(%i, 1, 32) $chr(9) + 0 0 -1 -1 $gettok(%i, 2, 32) $chr(9) + 0 0 -1 -1 $gettok(%i, 3 $replace(4,4,*), 32) $chr(9) + 0 0 -1 -1 $gettok(%i, 5-, 32)
- inc %x
- } }
- alias xtext { return $xdid(serv,2).seltext }
- menu @server {
- $$xtext
- Edit sever: echo -a $xdid(serv,2,2).seltext
- testing: echo -a lol
- testing: echo -a lol
- testing: echo -a lol
- testing: echo -a lol
- testing: echo -a lol
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement