daluu Posted December 31, 2014 Posted December 31, 2014 This is a repost from http://www.d3scene.com/forum/development/82572-tutorial-use-autoit-vb-net.html that I came across today. I don't think it is cross posted here already doing a search for .NET related stuff here. Please move to appropriate forum if posted to wrong one (e.g. ActiveX/COM Help and Support (AutoItX) or General Help and Support). If already duplicated here, please delete. Thought it deserves a copy here w/o having users to register over at the source forum to see it. I've yet to personally try the example though, plan to soon. Perhaps a good idea to later on provide the C# version of code snippet for comparison purposes. Original post info modified for clarity: In this tutorial you will learn how to use Autoit functions in VB.NET(and C#) Things you need : Microsoft Visual Basic.NET(or C#) 2010 Express (or any other versions) AutoitX Library which is in attachments Create a new (VB).NET project (e.g. Windows Forms Application) and add a button in your form Go to your project references and add AutoitX Library Now go to your form and add a button Go to codes section and fill in sample code below to create a button that will launch notepad.exe then enter text into it and finally close notepad as a demo. Now test your program, you will see the exciting result Q.Whats the point of using Autoit in VB.NET ? A.As you know Autoit is single threaded, but when you use it in another language like VB.NET you can use all .NET API's combine Autoit functions with Multi threading support,using microsoft visual form designer and ... (a lot of others!) Imports AutoItX3Lib Public Class MainForm Dim AutoitCommand As New AutoItX3 Private Sub StartButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StartButton.Click AutoitCommand.Run("notepad.exe") AutoitCommand.WinWait("Untitled - Notepad") AutoitCommand.Send("This text sent to notepad by autoit functions{ENTER}Have Fun") AutoitCommand.Sleep(1000) AutoitCommand.WinKill("Untitled - Notepad") End End Sub End Class AutoItX3_x86.rarAutoItX3_x64.rar kcvinu 1
JohnOne Posted January 5, 2015 Posted January 5, 2015 I'm not sure the claim that AutoItX is thread safe is correct. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
kcvinu Posted January 16, 2015 Posted January 16, 2015 Hi daluu, Although the code above is not working for me, but i was shocked because, this is what i wanted. Thanks a lot. I have tested lot of other functions. All are working. except this. May be my notepad is the problem. And i can only see a few autoit functions in vb.net. Where are the others ?. Please tell me that what should i do with AutoItX3_x86.rar file. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
kcvinu Posted January 16, 2015 Posted January 16, 2015 Hi daluu Please tell me how to tie up this AutoitX with Python. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
daluu Posted January 19, 2015 Author Posted January 19, 2015 kcvinu, have a look at these: http://stackoverflow.com/questions/3301561/calling-autoit-functions-in-python http://stackoverflow.com/questions/1065844/what-can-you-do-with-com-activex-in-python kcvinu 1
kcvinu Posted January 19, 2015 Posted January 19, 2015 Hi daluu, I am almost there, but i need ProgID or CLSID of autoitX3. How to find it Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
kcvinu Posted January 19, 2015 Posted January 19, 2015 Hi daluu, It worked. Thanks a lot. An artcle in that link says that every info about COM in python is in Oreilly's Python Programming on Win32 by Mark Hammond. I have that book. After reading that chapter, i can easily connect AutoIt COM in python. Thanks a lot. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
TheDcoder Posted June 21, 2015 Posted June 21, 2015 What am I seeing here , Using AutoItX COM Library in VB.NET instead of using VB.NET's own abilities ? EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
JohnOne Posted June 21, 2015 Posted June 21, 2015 Yes.Exactly.Same as using it in C++, or C# or any other number of languages. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
cyxstudio Posted December 23, 2017 Posted December 23, 2017 sorry if i bumped an old thread, but why does my anti virus flag this as a virus, it
TheDcoder Posted December 23, 2017 Posted December 23, 2017 (edited) AutoKMS is a program used to crack Windows... Not related to this thread I guess... Edited December 23, 2017 by TheDcoder EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
cyxstudio Posted December 24, 2017 Posted December 24, 2017 On 12/23/2017 at 2:32 PM, TheDcoder said: AutoKMS is a program used to crack Windows... Not related to this thread I guess... nope it flagged the download as virus download as in the autoit library dll. which is the file attached in original post.
TheDcoder Posted December 24, 2017 Posted December 24, 2017 AutoIt is known for false positives, but I don't think it would be flagged as AutoKMS, you can click on "Show Details" and look at the location of the file, can you confirm that it is indeed the library? EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
cyxstudio Posted December 24, 2017 Posted December 24, 2017 18 minutes ago, TheDcoder said: AutoIt is known for false positives, but I don't think it would be flagged as AutoKMS, you can click on "Show Details" and look at the location of the file, can you confirm that it is indeed the library? so theres nothing for me to be worried about? Yes it is the dll file attached in the main post triggered my anti virus My windows defender identified it as Trojan.Win32/spursint.F!cl Anyway i went to my autoit folder and found AutoItX3.dll under AutoitX, its pretty much the same thing am i right? I can import that as reference into my visual studio?
TheDcoder Posted December 24, 2017 Posted December 24, 2017 11 minutes ago, cyxstudio said: My windows defender identified it as Trojan.Win32/spursint.F!cl Well, it is different from the AutoKMS detection from your screenshot. EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
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