|
Joined: Aug 2003
Posts: 136
Vogon poet
|
OP
Vogon poet
Joined: Aug 2003
Posts: 136 |
Im writing a script that gets your info, Your ip your current server what port etc etc the rough script is dialog first { title "Your System Info" size -1 -1 300 300 button "OK",1, 80 250 120 25, OK text "Your Ip Is",2, 1 1 100 25 edit "Ip Here",3, 1 15 100 20 text "Current Server",4, 1 33 100 25 edit "Current Server",5, 1 45 100 20 } Now I looked in help and could find out how to make it so I could set a button to get the values I have an alias set to run it /systems { did -r first 3 did -a first 3 $ip did -r first 5 did -a first 5 $server } But what would I do to have a button run the alias? or have a script run it as soon as the dialog runs, I was later planning on adding check boxes to let the user chose what info to play into the active window.
|
|
|
|
Joined: Dec 2002
Posts: 3,015
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,015 |
on *:DIALOG:first:init:0:{
systems
} should make it run /systems when the dialog is opened.
|
|
|
|
Joined: Aug 2003
Posts: 136
Vogon poet
|
OP
Vogon poet
Joined: Aug 2003
Posts: 136 |
Well I went ahead and tried and I got it kinda so far now I was wondering how do I recognize that a check box is checked dialog first { title "Your System Info" size -1 -1 300 300 button "OK",1, 1 275 120 25, OK button "List",6, 180 275 120 25, Default button "Play",13, 123 275 55 25, Default text "Your Ip Is",2, 1 1 100 25 edit "Ip Here",3, 1 15 100 20 check "Send To Current Window",14, 100 15 150 25,left text "Current Server",4, 1 33 100 25 edit "Current Server",5, 1 45 100 20 check "Send To Current Window",15, 100 45 150 25,left text "Server Ip",7, 1 63 100 25 edit "Server Ip",8, 1 75 100 20 check "Send To Current Window",16, 100 75 150 25,left text "Server Port",9, 1 93 100 25 edit "Server Port",10, 1 105 100 20 check "Send To Current Window",17, 100 105 150 25,left text "Online Time",11, 1 123 100 25 edit "Online Time",12, 1 135 100 20 check "Send To Current Window",18, 100 135 150 25,left } on 1:dialog:first:sclick:6: { did -r first 3 did -a first 3 $ip did -r first 5 did -a first 5 $server did -r first 8 did -a first 8 $serverip did -r first 10 did -a first 10 $port did -r first 12 did -a first 12 $uptime(mirc, 2) } Is what I have I was wanting to check what is to be displayed and then click list to have it play out to the active window.
|
|
|
|
Joined: Dec 2002
Posts: 3,015
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,015 |
|
|
|
|
Joined: Mar 2003
Posts: 1,256
Hoopy frood
|
Hoopy frood
Joined: Mar 2003
Posts: 1,256 |
Also two pointers when working with dialogs:
to load your settings, you could do on *:DIALOG:first:init:0:{ systems } as suggested and then create an alias called that. Simpler might be to actually do your stuff between those brackets.
Also, you use did -r first 3 did -a first 3 $ip As with any alias, you can combine flags, so doing did -ra first 3 $ip would save you a lot of space.
|
|
|
|
KoRn18
|
KoRn18
|
This HAS been tested and it works, using $iif 
dialog first {
title "Your System Info"
size -1 -1 300 300
button "OK",1, 1 275 120 25, OK
button "List",6, 180 275 120 25, Default
button "Play",13, 123 275 55 25, Default
text "Your Ip Is",2, 1 1 100 25
edit "Ip Here",3, 1 15 100 20
check "Send To Current Window",14, 100 15 150 25,left
text "Current Server",4, 1 33 100 25
edit "Current Server",5, 1 45 100 20
check "Send To Current Window",15, 100 45 150 25,left
text "Server Ip",7, 1 63 100 25
edit "Server Ip",8, 1 75 100 20
check "Send To Current Window",16, 100 75 150 25,left
text "Server Port",9, 1 93 100 25
edit "Server Port",10, 1 105 100 20
check "Send To Current Window",17, 100 105 150 25,left
text "Online Time",11, 1 123 100 25
edit "Online Time",12, 1 135 100 20
check "Send To Current Window",18, 100 135 150 25,left
}
on *:dialog:first:sclick:6: {
did -ra first 3 $ip
did -ra first 5 $server
did -ra first 8 $serverip
did -ra first 10 $port
did -ra first 12 $uptime(mirc, 2)
}
on *:dialog:first:sclick:13: {
/msg $active $iif($did(first,14).state == 1,[IP: $ip $+ ], ) $iif($did(first,15).state == 1,[Current Server: $server $+ ], ) $iif($did(first,16).state == 1,[Server IP: $serverip $+ ], ) $iif($did(first,17).state == 1,[Server Port: $port $+ ], ) $iif($did(first,18).state == 1,[Online Time: $uptime(mirc,2) $+ ], )
}
|
|
|
|
Joined: Aug 2003
Posts: 136
Vogon poet
|
OP
Vogon poet
Joined: Aug 2003
Posts: 136 |
Ive combined all that and Im including this into a larger dialog, I was wondering I have a dialog with a nick list and control buttons like OP deop what not, I got the list listed in the listbox i wanted and I can pull the name from the list but when I pull it it is @nick or %nick +nick, how would I get rid if the mode so I could use it to kick the nick since @nick isnt a nick
|
|
|
|
Joined: Dec 2002
Posts: 1,518
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,518 |
|
|
|
|
Joined: Aug 2003
Posts: 136
Vogon poet
|
OP
Vogon poet
Joined: Aug 2003
Posts: 136 |
Thanks I peeked at ur code I found in another post and kinda figured it out
|
|
|
|
|