mIRC Home    About    Download    Register    News    Help

Print Thread
#6602 15/01/03 01:36 AM
Joined: Jan 2003
Posts: 94
S
Sabby Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jan 2003
Posts: 94
Is there a way i can call for an id in a dialog, and it returns what it is; text, box, edit, tab, list, combo etc.?


-
E-Mail: mirc_sabby@hotmail.com
Network: irc.enterthegame.com
Channel: #Helpdesk
#6603 15/01/03 01:42 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
No.

#6604 15/01/03 01:59 AM
Joined: Jan 2003
Posts: 94
S
Sabby Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jan 2003
Posts: 94
they should make one


-
E-Mail: mirc_sabby@hotmail.com
Network: irc.enterthegame.com
Channel: #Helpdesk
#6605 15/01/03 02:03 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
What for? You can tell what type of control it is because you set the ID of a control when you add it to a dialog, and $did returns the ID associated with an on DIALOG event...it would just be a different way of getting the same info, IMO adding new features and repairing old bugs is more important than adding a different way of doing something that can already be done..

#6606 15/01/03 02:26 AM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
What would you use the function for?

#6607 15/01/03 03:46 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
It's not the most necessary thing in the world, but I've needed it once (I don't remember when/where exactly). Generally, I think we should be able to get information like the type of control, its x y w h etc. This could be done by adding extra properties to $did (.type , .x, .y etc) or adding a new dialog identifier, one that would return info about a dialog table (fex, $dtable(name/N[,N]) with various properties). This, combined with $dialog().table, would enable us to get all this info, and more. If it's gonna be one of them, I prefer $dtable(), but it wouldn't hurt to have both. And $dtable cannot be scripted around efficiently.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#6608 16/01/03 08:59 PM
Joined: Jan 2003
Posts: 94
S
Sabby Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jan 2003
Posts: 94
I was thinking of creating an alias to do something like this:

; Syntax:
; /didc [-a] DialogName [Id-Id] Type Commands
; -a would be all id's in dialog
; in Commands <id> = id, <dlg> = dialog
alias didc {
var %all = $iif(-a == $1,t),%d = $iif(%all,$2,$1)
if ($4 == $null) || (!$regex($3,text|edit|button|radio|box|scroll|list|combo|icon|link|tab)) { echo -a * /didc: Error | return }
var %i = $iif(%all,1,$gettok($2,1,45))
while ($iif(%all, [ $did(%d,%i) ], [ $replace($2,-,<) ] )) {
if ($did(%d,%i)[b].type
== $3) $eval($replace($4-,<id>,%i,<dlg>,%d))
inc %i
}
}
[/b]

something like that, havent tested it just typed it up now.

so people could perform commands on certain types of dialog editboxes and stuff without having to input every single id, (which would save time in large dialogs, such as ones with treeviews)


-
E-Mail: mirc_sabby@hotmail.com
Network: irc.enterthegame.com
Channel: #Helpdesk

Link Copied to Clipboard