mIRC Home    About    Download    Register    News    Help

Print Thread
#28537 07/06/03 10:24 AM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
Ok, i have made a dialog in "Dialog Studio". But, how to get it to work? Like, when i press Ok.. it have to set new nick ect.

Code:
dialog config {
  title "The Reactor iRC Script"
  size -1 -1 135 101
  option dbu
  edit "", 1, 7 8 50 10, limit 9
  text "Nickname:", 2, 2 1 26 7
  text "Alternative Nickname:", 3, 2 20 54 7
  box "CService Account", 4, 62 2 65 74
  button "Ok", 5, 63 81 29 12, flat ok
  edit "", 6, 7 27 50 10, limit 9
  text "Away Nickname:", 7, 2 39 41 7
  edit "", 8, 8 46 50 10, limit 9
  text "Username:", 9, 65 32 27 7
  text "Password:", 10, 65 51 26 7
  edit "", 11, 71 40 50 10
  edit "", 12, 71 59 50 10, pass
  button "Cancel", 13, 97 81 29 12, flat cancel
  text "Real Name:", 14, 3 58 28 7
  edit "", 15, 8 65 50 10, limit 13
  text "User ID (identd):", 16, 3 77 41 7
  edit "", 17, 9 84 50 10, limit 10
  check "Auto Login", 18, 72 11 38 8
  check "Hidden Host", 19, 72 21 41 8
}

#28538 07/06/03 11:22 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
check what is the editbox ID which u type the nick there and put this
on *:dialog:config:sclick:5:{ nick $$did(ID) }
replace ID with his id

#28539 07/06/03 12:20 PM
Joined: Mar 2003
Posts: 272
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Mar 2003
Posts: 272
Glad to see i'm not the only one who minimizes the i in IRC!


- cF
Dedicated helper for rent.
#28540 08/06/03 09:34 AM
Joined: May 2003
Posts: 10
L
Pikka bird
Offline
Pikka bird
L
Joined: May 2003
Posts: 10
Ok..I'll post your dialog along with the code to change your nickname with it. It should help you get started. Although, I suggest taking off the limit in the Nickname edit box.

Code:
dialog config {
  title "The Reactor iRC Script"
  size -1 -1 135 101
  option dbu
  edit "", 1, 7 8 50 10, limit 9
  text "Nickname:", 2, 2 1 26 7
  text "Alternative Nickname:", 3, 2 20 54 7
  box "CService Account", 4, 62 2 65 74
  button "Ok", 5, 63 81 29 12, flat ok
  edit "", 6, 7 27 50 10, limit 9
  text "Away Nickname:", 7, 2 39 41 7
  edit "", 8, 8 46 50 10, limit 9
  text "Username:", 9, 65 32 27 7
  text "Password:", 10, 65 51 26 7
  edit "", 11, 71 40 50 10
  edit "", 12, 71 59 50 10, pass
  button "Cancel", 13, 97 81 29 12, flat cancel
  text "Real Name:", 14, 3 58 28 7
  edit "", 15, 8 65 50 10, limit 13
  text "User ID (identd):", 16, 3 77 41 7
  edit "", 17, 9 84 50 10, limit 10
  check "Auto Login", 18, 72 11 38 8
  check "Hidden Host", 19, 72 21 41 8
}
on *:dialog:config:sclick:5:{ /nick $did( $dname , 1 ).text }

 


sclick means Single Click. 5 is the value of the OK button. $did means to go check what is supplied next, $dname means dialog name, you can replace this with config if you wish. 1 is the value of the Nickname edit box. And of course, .text means what string of text is in the edit box.

#28541 08/06/03 12:21 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
I don't get this to work! What have I done wrong here? confused

Code:
on *:dialog:config:sclick:5:{
  nick $did( $config , 1 ).text 
  anick $did( $config , 6 ).text
  set %awaynick $did( $config , 8 ).text
  set %name $did( $config , 15 ).text
  set %user-id $did( $config , 17 ).text
}

#28542 08/06/03 05:27 PM
Joined: May 2003
Posts: 10
L
Pikka bird
Offline
Pikka bird
L
Joined: May 2003
Posts: 10
Take out the $ before config. Only put the $ before dname. Use either $dname or config. $ is part of an indentifier.

Code:
 on *:dialog:config:sclick:5:{
  nick $did( $dname , 1 ).text
  anick $did( $dname , 6 ).text
  set %awaynick $did( $dname , 8 ).text
  set %name $did( $dname , 15 ).text
  set %user-id $did( $dname , 17 ).text
}

Last edited by LeperMessiah; 08/06/03 05:27 PM.
#28543 09/06/03 03:33 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
i don't get this.. I have don't what you have told me.. but, when i press Ok, nothing happens!?

Code:
dialog config {
  title "Script Configuration"
  size -1 -1 132 99
  option dbu
  edit "", 1, 7 8 50 10, limit 9
  text "Nickname:", 2, 2 1 26 7
  text "Alternative Nickname:", 3, 2 20 54 7
  box "CService Account", 4, 62 2 65 74
  button "Ok", 5, 63 81 30 12, ok
  edit "", 6, 7 27 50 10, limit 9
  text "Away Nickname:", 7, 2 39 41 7
  edit "", 8, 8 46 50 10, limit 9
  text "Username:", 9, 65 33 27 7
  text "Password:", 10, 65 53 26 7
  edit "", 11, 71 40 50 10
  edit "", 12, 71 60 50 10, pass
  button "Cancel", 13, 97 81 30 12, cancel
  text "Real Name:", 14, 3 58 28 7
  edit "", 15, 8 65 50 10, limit 13
  text "User ID (identd):", 16, 3 77 41 7
  edit "", 17, 9 84 50 10, limit 10
  check "Auto Login", 18, 72 12 38 8
  check "Hidden Host", 19, 72 22 41 8
}


Code:
on *:dialog:config:sclick:5:{
  nick $did( config , 1 ).text
  anick $did( config , 6 ).text
  set %awaynick $did( config , 8 ).text
  set %name $did( config , 15 ).text
  set %user-id $did( config , 17 ).text
}

Last edited by Deep3D; 09/06/03 03:41 PM.
#28544 09/06/03 04:44 PM
Joined: May 2003
Posts: 10
L
Pikka bird
Offline
Pikka bird
L
Joined: May 2003
Posts: 10
It might be because the button who's ID is 5 is an OK button. Try make a seperate button for Exit, and make 5 a default button.

If this doesn't work..use $dname instead of config.

#28545 09/06/03 07:23 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
I don't get this bitch working..


Link Copied to Clipboard