Jump to content

Using the AutoItX3Lib as reference in C# app


andypicch
 Share

Recommended Posts

I am trying to use the AutoIx3.dll. I referenced it as a COM object and tried Control Command first. Here is an example of what I did:

label1.Text = autoit.ControlCommand("Form1","","WindowsForms10.LISTBOX.app61","GetCurrentSelection","");

The return value is "1".

label1.Text = autoit.ControlCommand("Form1","","WindowsForms10.LISTBOX.app61","SelectString","ListItem2");

The selection doesn't change.

label1.Text = autoit.ControlCommand("Form1","","WindowsForms10.COMBOBOX.app61","ShowDropDown","");

("Form1","","WindowsForms10.COMBOBOX.app61","HideDropDown","");

these work, but...

("Form1","","WindowsForms10.COMBOBOX.app61","SelectString","C");

will not change the selection.

Anybody have any suggestions?

Link to comment
Share on other sites

  • 3 months later...

I am trying to use the AutoIx3.dll. I referenced it as a COM object and tried Control Command first. Here is an example of what I did:

label1.Text = autoit.ControlCommand("Form1","","WindowsForms10.LISTBOX.app61","GetCurrentSelection","");

The return value is "1".

label1.Text = autoit.ControlCommand("Form1","","WindowsForms10.LISTBOX.app61","SelectString","ListItem2");

The selection doesn't change.

label1.Text = autoit.ControlCommand("Form1","","WindowsForms10.COMBOBOX.app61","ShowDropDown","");

("Form1","","WindowsForms10.COMBOBOX.app61","HideDropDown","");

these work, but...

("Form1","","WindowsForms10.COMBOBOX.app61","SelectString","C");

will not change the selection.

Anybody have any suggestions?

Instead of using ControlCommand, have you tried using AU3_ControlListView??? I'm just guessing here, but the control you're trying to manipulate is a ListBox?

Edited by illumin
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...