Jump to content

Command "AddString" in function ControlCommand get error


dd1978
 Share

Recommended Posts

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

Hi @dd1978,

first of all, I tried to read and understand the whole thread conversation 🧐 , but I still don't get it => what are you trying to achieve?
Do you want to automated a given software with AutoIt which is written in VB.net?

On 2/8/2023 at 9:48 PM, dd1978 said:

could I say that autoit do not work for windows forms app (.net framework) project

Partly. There are several possibilities which could have impact, but in generell AutoIt doesn't work (at least as far as I could inspect) with newer .NET Core versions.
In your case, older than .NET Framework 4.5, it should work.

Still, maybe AutoIt isn't the best choice to solve for your problem. I would like to give you a better approach 😇 , but I have to understand what are you trying to do?!
Thanks.

Best regards
Sven

Stay innovative!

Spoiler

🌍 Au3Forums

🎲 AutoIt (en) Cheat Sheet

📊 AutoIt limits/defaults

💎 Code Katas: [...] (comming soon)

🎭 Collection of GitHub users with AutoIt projects

🐞 False-Positives

🔮 Me on GitHub

💬 Opinion about new forum sub category

📑 UDF wiki list

✂ VSCode-AutoItSnippets

📑 WebDriver FAQs

👨‍🏫 WebDriver Tutorial (coming soon)

Link to comment
Share on other sites

hi @SOLVE-SMART

for using AutoIt, I want to achieve to help myself to do the daily work. I am a network manager and a staff in IT group in my company. I found AutoIt may make my job be easier. So I open the help file of AutoIt and make some test on code for being ready to use it into my daily work.

but when I test code on function ControlCommand I hit the wall.

of course I can skip, but as a script language released to all of the world, I think I at least can get reason why this function not work, or whether the mistake is from me or the script language.

Thanks 

Link to comment
Share on other sites

Thanks for your explanation @dd1978 🤝 .

I still can not help you further, because I don't understand your concrete problem in combination with .NET Framework (VB.net) <=> AutoIt <=> ControlCommand.
Maybe I have to read the whole Thread (discussion) again to understand. Not now (maybe later).

Best regards
Sven
 

Stay innovative!

Spoiler

🌍 Au3Forums

🎲 AutoIt (en) Cheat Sheet

📊 AutoIt limits/defaults

💎 Code Katas: [...] (comming soon)

🎭 Collection of GitHub users with AutoIt projects

🐞 False-Positives

🔮 Me on GitHub

💬 Opinion about new forum sub category

📑 UDF wiki list

✂ VSCode-AutoItSnippets

📑 WebDriver FAQs

👨‍🏫 WebDriver Tutorial (coming soon)

Link to comment
Share on other sites

Just taking a guess here; perhaps the AddString just isn't a valid method for .NET ListBox class. 

This article shows populating a .NET Listbox using the Add method of the ListBox.ObjectCollection class. 
https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.listbox.objectcollection.add?view=windowsdesktop-7.0

I'm not exactly sure if you can just add .Items to the control name, or if you can get a handle to it and use the handle instead of the control/class name, but that's what I would look into.  I'm not at a place where I can test...sorry.

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...