mIRC Home    About    Download    Register    News    Help

Print Thread
#44001 25/08/03 04:30 AM
Joined: Aug 2003
Posts: 136
Vogon poet
OP Offline
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.


In Virginia, chickens cannot lay eggs before 8:00 a.m., and must be done before 4:00 p.m.
#44002 25/08/03 04:45 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Code:
on *:DIALOG:first:init:0:{
  systems
}

should make it run /systems when the dialog is opened.

#44003 25/08/03 05:35 AM
Joined: Aug 2003
Posts: 136
Vogon poet
OP Offline
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.


In Virginia, chickens cannot lay eggs before 8:00 a.m., and must be done before 4:00 p.m.
#44004 25/08/03 05:39 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
$did(dname,id).state

#44005 25/08/03 05:42 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
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.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#44006 25/08/03 10:26 AM
Joined: Aug 2003
Posts: 148
K
Vogon poet
Offline
Vogon poet
K
Joined: Aug 2003
Posts: 148
This HAS been tested and it works, using $iif wink
Code:
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) $+ ], )
}


_________
may death strike you.
#44007 25/08/03 11:34 AM
Joined: Aug 2003
Posts: 136
Vogon poet
OP Offline
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


In Virginia, chickens cannot lay eggs before 8:00 a.m., and must be done before 4:00 p.m.
#44008 25/08/03 09:09 PM
Joined: Dec 2002
Posts: 1,527
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
$remove


D3m0nnet.com
#44009 26/08/03 05:07 AM
Joined: Aug 2003
Posts: 136
Vogon poet
OP Offline
Vogon poet
Joined: Aug 2003
Posts: 136
Thanks I peeked at ur code I found in another post and kinda figured it out


In Virginia, chickens cannot lay eggs before 8:00 a.m., and must be done before 4:00 p.m.

Link Copied to Clipboard