Jump to content
Sign in to follow this  
atzoref

How can I work with C# controls?

Recommended Posts

atzoref

Hi,

How can I work with Controls of C# GUI?

Until now I have been worked only with VB GUIs.

Thanks

  • Like 1

Share this post


Link to post
Share on other sites
AlmarM

So. Little. Information.


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites
Melba23

atzoref,

No-one has answered because the question has no meaning. Controls are controls, regardless of the language used to create them, and as long as they have been created via the standard Windows API you interact with them in the same way by using whatever property you can find and that works. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
atzoref

But if I use the "AutoIt v3 Window Info"

and not get details like VB appication,

what is it means? so I can interact with that?

Share this post


Link to post
Share on other sites
Melba23

atzoref,

If you get no information via the Window Info tool than the controls may not have been created via the standard Windows API - this is a very common occurence, even with MS's own products. In that case you are severely limited in how you can interact with the controls. ;)

What app are you trying to automate? :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
atzoref

Can you give me an example of a script which interacts with C# Gui which created via standard Windows API?

Thanks

Share this post


Link to post
Share on other sites
Melba23

atzoref,

There are many examples in the Help file of AutoIt interacting with external GUIs - look at the Control* functions for instance. :oops:

But as I said before, the language in which the app is written is not important - what is important is the manner in which the controls are created. If they are created via the standard API then AutoIt can use the standard AI calls to interact with them - if not, then it can be very difficult to do anything at all other than use simple (and inefficient) MouseClicks on them. :bye:

But you said earlier that you could not get any information about the controls via the Window Info tool, so how are you going to get the required identity parameters to use in the Control* functions? Once again - what app are you trying to automate? Please post the results that the Window Info tool gives you regarding the main window - then we can see what we are dealing with. :doh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
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
Sign in to follow this  

×