Jump to content

Seperate ControlCommand()


Jon
 Share

Recommended Posts

  • Administrators

I am thinking about splitting ControlCommand into seperate functions (and maybe leaving ControlCommand alone for compatibility).

ControlListView started me thinking.

ControlListBox, ControlComboBox, ControlEdit and so on, then these functions could possibly be tweaked to work better (maybe with more non MS controls). For example, when the "GetCurrentSelection" command runs it checks the controlname to see if it contains the word "list" or "combo" to decide which to do (if there is no match it fails). There is always a chance that if we had just sent the message to the control anyway it would have worked.

Or we could even trap the messages that work with MS Word/New apps and get those to work. This would be easier if the various classes of controls were seperated out (ControlCommand is a bit of a mess as it has to support so many things).

Link to comment
Share on other sites

A related question: What about commands that can be used by both AutoIt GUIs and normal windows? Consider three cases:

1) "ControlGetPos" works for both. (In fact, there isn't any GUI-specific function....)

2) We have both "GUICtrlSetPos" and "ControlMove" but we only "need" the latter

3) GUICtrlSetStyle only works for GUIs but could be extended to work on any window

So do we want separate functions for AutoItGui and normal windows or combined functions?

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

  • Administrators

A related question:  What about commands that can be used by both AutoIt GUIs and normal windows?  Consider three cases:

1)  "ControlGetPos" works for both. (In fact, there isn't any GUI-specific function....)

2)  We have both "GUICtrlSetPos" and "ControlMove" but we only "need" the latter

3)  GUICtrlSetStyle only works for GUIs but could be extended to work on any window

So do we want separate functions for AutoItGui and normal windows or combined functions?

The gui versions are usually "cleaner" as they just need a single ID rather than the whole title/text/control. The Control... functions usually have to jump through lots of hoops to work - like creating shared memory buffers and hacking processes, whereas the GUI stuff is much more simple. I'd like to "share" as much internal code between the two things but it's pretty tricky.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...