|
Joined: Feb 2003
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Feb 2003
Posts: 10 |
The ability to use %vars in dialog items is excellent, thanks for adding it!< However, something that would be 150x more use full than that is to also have the dialog loaded with the value of %var if any when the dialog is loaded
And how about something like the .state prop but that returns on/off for checkboxes, radio button, etc
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
The ability to use %vars in dialog items is excellent, thanks for adding it!< However, something that would be 150x more use full than that is to also have the dialog loaded with the value of %var if any when the dialog is loaded Hope someone else can understand that, I can't And how about something like the .state prop but that returns on/off for checkboxes, radio button, etc $did([color:green]dialogname, ID).state[/color] returns 1 if a checkbox/radio is checked, and 0 if it isn't $did([color:green]dialogname, ID).enabled[/color] returns $true if an ID is enabled, returns $false if it isn't. What would this new one do?
|
|
|
|
Joined: Jan 2003
Posts: 94
Babel fish
|
Babel fish
Joined: Jan 2003
Posts: 94 |
im guess you mean changing the variables so the dialog will load with a new format, just make an alias:
alias blah {
if ($1 == joe) set %var joe
if ($1 == supercalafragilisticxbealadoius) set %var $ifmatch
dialog $iif($dialog(name),-vie,-md) name name
}
|
|
|
|
Joined: Feb 2003
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Feb 2003
Posts: 10 |
for the %var thing, if you specify a dialog item like this: edit "" 4,100 100 70 17,%time.allowed
when you close the dialog the valud of $did(dialog,4) is stored to %time.allowed
What Im suggesting is that the value of %time.allowed be inserted into the "text", so instead of doing edit "Blah"....... you could do edit "" 4,100 100 70 17,%time.allowed instead of a script : on 1:DIALOG:commands:init:0:did -a commands 4 %time.allowed
and on the second suggestion, instead of doing on 1:DIALOG:commands:sclick:3:%option.howdy = $iif($did($dname,$did).state,on,off) for compairing as on/off rather than 1/0 we could do something like this on 1:DIALOG:commands:sclick:3:%option.howdy = $did($dname,$did).onoff which would return on if checked, off if not
|
|
|
|
Joined: Jan 2003
Posts: 1,063
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 1,063 |
why not just use
edit %time.allowed 4,100 100 70 17,%time.allowed
If it ain't broken, don't fix it!
|
|
|
|
Joined: Feb 2003
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Feb 2003
Posts: 10 |
try that, see what happens, you get a invalid dialog error,
|
|
|
|
Joined: Dec 2002
Posts: 699
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 699 |
It works fine here.
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
It works fine, he just missed a ,
edit %time.allowed, 4,100 100 70 17, %time.allowed
Your second idea is just a different way of returning the same information, which is pointless (not to mention if there were 2+ ways of getting all data in mIRC the exe would get bigger and bigger), especially since 1/0 are more useful in IF statements than on/off. e.g. if ( $did($dname,$did).state ) { dostuff } if ( $did($dname,$did).onoff == on ) { dostuff }
|
|
|
|
Joined: Feb 2003
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Feb 2003
Posts: 10 |
No thats even more consuming that my original post of
$iif(%option.state == on,runon,runoff)
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
$iif(%option.state,runon,runoff) If %option.state was 0 it would return runoff If %option.state was 1 it would return runon If %option.state was on it would return runon If %option.state was off it would return runon
Therefore 1 and 0 are more useful than on and off.
Your suggestion is still just another way of getting the same information, and so is a waste of time for Khaled to add while he could be fixing bugs and adding much more useful features (current example: UTF-8 support).
|
|
|
|
|