dd1978 Posted February 7, 2023 Author Share Posted February 7, 2023 my test code is exactly same with yours shown. but it does nothing and I only get error when tried on .net form project the same code partially works on MFC project. Link to comment Share on other sites More sharing options...
ioa747 Posted February 7, 2023 Share Posted February 7, 2023 (edited) <image> Edited April 2, 2023 by ioa747 del image I know that I know nothing Link to comment Share on other sites More sharing options...
dd1978 Posted February 7, 2023 Author Share Posted February 7, 2023 I would try importing settings later. I have to take a relax and be ready to go to work thanks Link to comment Share on other sites More sharing options...
dd1978 Posted February 8, 2023 Author Share Posted February 8, 2023 just now I have imported vs config file from you post. I restart VS and clear solution then build the .net win form project, there is still the old issues. no change happened. Link to comment Share on other sites More sharing options...
dd1978 Posted February 8, 2023 Author Share Posted February 8, 2023 Is there any way to get detailed error information. currently I only know that the error is happened by macro @error Link to comment Share on other sites More sharing options...
ioa747 Posted February 8, 2023 Share Posted February 8, 2023 I do not know I know that I know nothing Link to comment Share on other sites More sharing options...
dd1978 Posted February 8, 2023 Author Share Posted February 8, 2023 Could you compile your win form project by .Net 4.5 to see what would happen? Link to comment Share on other sites More sharing options...
ioa747 Posted February 8, 2023 Share Posted February 8, 2023 (edited) when i make WindowsApp not working (regardless .Net version) <image> Edited April 2, 2023 by ioa747 del image I know that I know nothing Link to comment Share on other sites More sharing options...
ioa747 Posted February 8, 2023 Share Posted February 8, 2023 (edited) when i make WinFormsApp then working <image> Edited April 2, 2023 by ioa747 I know that I know nothing Link to comment Share on other sites More sharing options...
ioa747 Posted February 8, 2023 Share Posted February 8, 2023 (edited) 1 working 2 not working Edited April 2, 2023 by ioa747 UpDate I know that I know nothing Link to comment Share on other sites More sharing options...
dd1978 Posted February 8, 2023 Author Share Posted February 8, 2023 what is different between two types of project? By my inspection, they are all Windows Forms App and one is with .Net Framework but another not in my environment, I only found (2), that failed with Link to comment Share on other sites More sharing options...
ioa747 Posted February 8, 2023 Share Posted February 8, 2023 I do not know I know that I know nothing Link to comment Share on other sites More sharing options...
ioa747 Posted February 8, 2023 Share Posted February 8, 2023 (edited) https://www.interviewbit.com/blog/net-core-vs-net-framework/ https://learn.microsoft.com/en-us/dotnet/core/install/ https://learn.microsoft.com/en-us/dotnet/core/install/windows?tabs=net70#install-with-visual-studio i hope you find something. Edited February 8, 2023 by ioa747 I know that I know nothing Link to comment Share on other sites More sharing options...
dd1978 Posted February 8, 2023 Author Share Posted February 8, 2023 could I say that autoit do not work for windows forms app (.net framework) project Link to comment Share on other sites More sharing options...
SOLVE-SMART Posted February 10, 2023 Share Posted February 10, 2023 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 More sharing options...
dd1978 Posted February 14, 2023 Author Share Posted February 14, 2023 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 More sharing options...
SOLVE-SMART Posted February 14, 2023 Share Posted February 14, 2023 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 More sharing options...
dd1978 Posted February 15, 2023 Author Share Posted February 15, 2023 (edited) a problem that is easy to be understood: using AutoIt, I cannot add new lines into list box in .net win form written by myself. to add new lines, I tried autoit function ControlCommand but get error. @SOLVE-SMART Edited February 15, 2023 by dd1978 Link to comment Share on other sites More sharing options...
spudw2k Posted February 16, 2023 Share Posted February 16, 2023 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. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
dd1978 Posted February 16, 2023 Author Share Posted February 16, 2023 AddString is a command in function ControlCommand defined in AutoIt, it is not a API of windows that is called in VS IDE. I have tested a code for other functions of AutoIt successfully, either using handle or class name. thanks @spudw2k Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now