|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
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.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
oh, how.. I don't understand how to get that to work..
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
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
|
|
|
|
Joined: Aug 2005
Posts: 1,052
Hoopy frood
|
Hoopy frood
Joined: Aug 2005
Posts: 1,052 |
Actually... dont use quotes around your var to make it work  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 }
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Aug 2004
Posts: 423
Fjord artisan
|
Fjord artisan
Joined: Aug 2004
Posts: 423 |
this is from the help file : 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 } }
|
|
|
|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
Thanks all!!  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 }
|
|
|
|
Joined: Jul 2005
Posts: 25
Ameglian cow
|
Ameglian cow
Joined: Jul 2005
Posts: 25 |
Thanks all!!  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 }
|
|
|
|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
Thanks mate! 
|
|
|
|
Joined: Jul 2005
Posts: 25
Ameglian cow
|
Ameglian cow
Joined: Jul 2005
Posts: 25 |
not at all. 
|
|
|
|
Joined: Jun 2005
Posts: 44
Ameglian cow
|
Ameglian cow
Joined: Jun 2005
Posts: 44 |
[edit] nvm :tongue:
Last edited by BNX; 28/08/05 05:42 PM.
|
|
|
|
|