mIRC Home    About    Download    Register    News    Help

Print Thread
#10072 07/02/03 06:51 AM
Joined: Feb 2003
Posts: 10
T
Pikka bird
OP Offline
Pikka bird
T
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

#10073 07/02/03 07:01 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Quote:
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 smile

Quote:
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?

#10074 07/02/03 11:37 AM
Joined: Jan 2003
Posts: 94
S
Babel fish
Offline
Babel fish
S
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:
Code:
alias blah {
  if ($1 == joe) set %var joe
  if ($1 == supercalafragilisticxbealadoius) set %var $ifmatch
  dialog $iif($dialog(name),-vie,-md) name name
}


-
E-Mail: mirc_sabby@hotmail.com
Network: irc.enterthegame.com
Channel: #Helpdesk
#10075 07/02/03 11:40 AM
Joined: Feb 2003
Posts: 10
T
Pikka bird
OP Offline
Pikka bird
T
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

#10076 08/02/03 05:28 PM
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
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!
#10077 10/02/03 08:35 PM
Joined: Feb 2003
Posts: 10
T
Pikka bird
OP Offline
Pikka bird
T
Joined: Feb 2003
Posts: 10
try that, see what happens, you get a invalid dialog error,

#10078 11/02/03 03:01 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
It works fine here. smile

#10079 11/02/03 08:22 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
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 }

#10080 11/02/03 08:52 PM
Joined: Feb 2003
Posts: 10
T
Pikka bird
OP Offline
Pikka bird
T
Joined: Feb 2003
Posts: 10
No thats even more consuming that my original post of

$iif(%option.state == on,runon,runoff)

#10081 11/02/03 08:58 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
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).


Link Copied to Clipboard