I misunderstood it, thanks for clarification. I'm good with it.fincs wrote:That's the necessary method to implement in order for for ctrlObj in gui to work. See NewEnum() and For-loop.
As with the ctrl.Move() I would propose then to combine them as ctrl.Choose(N, NisString := True). Then you have both posibilities but only a unique function.fincs wrote:No. In v2 strings and integers are always different types, so there'd be no need to add the * kludge. ctrl.Choose(1) and ctrl.Choose("1") are different things. However in command syntax, all parameters are strings; so I think it'd still be a good idea to have a separate ChooseString() method.toralf wrote:ctrl.Choose(N) and ctrl.ChooseString(N) could also be combined to ctrl.Choose(N|"String"), with the special case if string is a number, then a special char needs to be added, e.g. a space at the end of the number string or a * like ctrl.Choose(*NumberString).
Why not make them properties then? Similarly to ctrl.Focused, ctrl.Enabled, ctrl.Visible which can be actions and status depending if used in Set or Get. gui.Hide(), gui.Minimize(), gui.Maximize(), gui.Restore() are not different in that because they do not have parameters.fincs wrote:No, because these are actions to be performed on a Gui; not a property.toralf wrote:toralf wrote: I hope the same Set and Get mechanism applies to gui.Hide(), gui.Minimize(), gui.Maximize(), gui.Restore()
i forgot about that while working back and forth over the posts.fincs wrote:Yes there is: gui.Control[hwnd].
Since you did not comment on my suggestion to have a script object to iterate over the guis, I assume that that is outside of the inhancements of the GUI commands in v2 which you try to discuss here. The more I think about it that object could basically not only hold all the guis but most likely also all other script properties and methods, e.g. A_IsCompiled, A_AHKVersion and script.Sleep(), etc. I do not think that this is of any benefit any more. So please disregard my proposal. If someone needs to iterate over Guis, he can create an Assosiated Array with gui objects as values.