Jump to content
Sign in to follow this  
andypicch

Using the AutoItX3Lib as reference in C# app

Recommended Posts

andypicch

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?

Share this post


Link to post
Share on other sites
illumin

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

Share this post


Link to post
Share on other sites
Richard Robertson

no, because that would be the easy way, and this would be easier:

listBox1.SelectedItemIndex = 2;

comboBox1.ShowDropDown();

XD

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.