mIRC Home    About    Download    Register    News    Help

Print Thread
#128598 27/08/05 07:09 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
dialog undernet {
title "Undernet CService"
size -1 -1 236 166
option pixels notheme
edit "%cservice.username", 1, 66 47 100 20, autohs
edit "%cservice.password", 2, 66 69 100 20, pass autohs
text "Username:", 3, 10 49 52 14
text "Password:", 4, 12 71 50 14
icon 5, 7 7 223 34, data\cservice.jpg, 0
check "Hidden Host", 6, 69 92 82 17
check "Auto Login", 7, 69 111 82 17
button "OK", 8, 66 134 65 25, ok
button "Cancel", 9, 137 134 65 25, cancel
}

How to use var?

Last edited by Deep3D; 27/08/05 08:18 PM.
#128599 27/08/05 08:58 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
to use Identifiers and I think vars you do not use the "quote marks"

if you need to make aliases that return the var and use the $identifier for those aliases

#128600 27/08/05 09:01 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
oh, how.. I don't understand how to get that to work..

#128601 27/08/05 09:19 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
Code:
dialog undernet {
title "Undernet CService"
size -1 -1 236 166
option pixels notheme
edit $dialog.user , 1, 66 47 100 20, autohs
edit $dialog.pass , 2, 66 69 100 20, pass autohs
text "Username:", 3, 10 49 52 14
text "Password:", 4, 12 71 50 14
icon 5, 7 7 223 34, data\cservice.jpg, 0
check "Hidden Host", 6, 69 92 82 17
check "Auto Login", 7, 69 111 82 17
button "OK", 8, 66 134 65 25, ok
button "Cancel", 9, 137 134 65 25, cancel
} 
alias dialog.user return %cservice.username
alias dialog.pass return %cservice.password

#128602 27/08/05 09:35 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Actually... dont use quotes around your var to make it work smile

dialog undernet {
title "Undernet CService"
size -1 -1 236 166
option pixels notheme
edit %cservice.username, 1, 66 47 100 20, autohs
edit %cservice.password, 2, 66 69 100 20, pass autohs
text "Username:", 3, 10 49 52 14
text "Password:", 4, 12 71 50 14
icon 5, 7 7 223 34, data\cservice.jpg, 0
check "Hidden Host", 6, 69 92 82 17
check "Auto Login", 7, 69 111 82 17
button "OK", 8, 66 134 65 25, ok
button "Cancel", 9, 137 134 65 25, cancel
}


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
#128603 27/08/05 09:40 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
that was what I thought, but it has been a while since I used vars in the dialog table so I wasn't sure

#128604 28/08/05 02:08 AM
Joined: Aug 2004
Posts: 423
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
this is from the help file :

Quote:

Variables
If you specify a %variable name in a dialog item definition, the %variable will be set with the contents of that item when the dialog is closed.

edit "", 2, 10 10 100 20, autohs %result



you could also do something like :

on *:dialog:undernet:edit:*: {
if ($did == 1) { .set %cservice.username $did(undernet,1).text }
if ($did == 2) { .set %cservice.password $did(undernet,2).text }
}

#128605 28/08/05 10:31 AM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
Thanks all!! smile

One more thing! The check box... How to have that Enabled if
%cservice.hidden.host on and set %cservice.account on


dialog undernet {
title "Undernet CService"
size -1 -1 236 166
option pixels notheme
edit %cservice.username, 1, 66 47 100 20, autohs
edit $decode(%cservice.password), 2, 66 69 100 20, pass autohs
text "Username:", 3, 10 49 52 14
text "Password:", 4, 12 71 50 14
icon 5, 7 7 223 34, data\cservice.jpg, 0
check "Hidden Host", 6, 69 92 82 17
check "Auto Login", 7, 69 111 82 17
button "OK", 8, 66 134 65 25, ok
button "Cancel", 9, 137 134 65 25, cancel
}

#128606 28/08/05 10:59 AM
Joined: Jul 2005
Posts: 25
U
Ameglian cow
Offline
Ameglian cow
U
Joined: Jul 2005
Posts: 25
Quote:
Thanks all!! smile

One more thing! The check box... How to have that Enabled if
%cservice.hidden.host on and set %cservice.account on


dialog undernet {
title "Undernet CService"
size -1 -1 236 166
option pixels notheme
edit %cservice.username, 1, 66 47 100 20, autohs
edit $decode(%cservice.password), 2, 66 69 100 20, pass autohs
text "Username:", 3, 10 49 52 14
text "Password:", 4, 12 71 50 14
icon 5, 7 7 223 34, data\cservice.jpg, 0
check "Hidden Host", 6, 69 92 82 17
check "Auto Login", 7, 69 111 82 17
button "OK", 8, 66 134 65 25, ok
button "Cancel", 9, 137 134 65 25, cancel
}


on *:dialog:undernet:init:*:{
if (%cservice.hidden.host == on) did -c $dname 6
if (%cservice.account == on) did -c $dname 7
}

#128607 28/08/05 11:18 AM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
Thanks mate! grin

#128608 28/08/05 11:57 AM
Joined: Jul 2005
Posts: 25
U
Ameglian cow
Offline
Ameglian cow
U
Joined: Jul 2005
Posts: 25
not at all. wink

#128609 28/08/05 05:38 PM
Joined: Jun 2005
Posts: 44
B
BNX Offline
Ameglian cow
Offline
Ameglian cow
B
Joined: Jun 2005
Posts: 44
[edit] nvm :tongue:

Last edited by BNX; 28/08/05 05:42 PM.

Link Copied to Clipboard