|
Joined: Jan 2003
Posts: 94
Babel fish
|
OP
Babel fish
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.?
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
|
|
|
|
Joined: Jan 2003
Posts: 94
Babel fish
|
OP
Babel fish
Joined: Jan 2003
Posts: 94 |
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
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..
|
|
|
|
Joined: Dec 2002
Posts: 2,985
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,985 |
What would you use the function for?
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Jan 2003
Posts: 94
Babel fish
|
OP
Babel fish
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)
|
|
|
|
|