Jump to content

Recommended Posts

Posted

Hi everyone. I dont know how to import AutoIt scripts to a standard Visual Basic program (in visual basic 2010), and I really need to learn how to do this in order to get my stuff done. If anyone could try to help me, i need to design a multi-step gui and it would be so much easier on VB, but i need the scripting functions as well. to cut out the junk --- how do i get an AutoIt script inside of a VB2010 program?

Posted

Why do you think creating/handling a GUI is much easier in VB? What have you tried so far in AutoIt? Koda?

I think AutoIt is as good in GUI creation/handling as in the rest of the scripting functionality you want to do with AutoIt.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

okay, so I have tried creating the GUI in AutoIt and it does work, with the options i want it to have, but I am much more familiar with VB and the

script i was given to work with was already written in AutoIt so I wanted to keep that going. I dont know what Koda is so i have not tried anything

with that. but for me personally VB would be easier. i love autoIt for the scripting but trying to figure out how to create an installation wizard

using AutoIt is getting very stressful because i dont know the language that well

Posted

You cannot directly include a script via AutoItX (either COM or direct DLL API). You should read the AutoItX help file to familiarize yourself with the COM / DLL interfaces and the available functions.

Posted

Koda is the graphical GUI designer for AutoIt. You create the GUI by moving the controls to the positions you need. Then Koda creates the AutoIt code for you.

Press Alt+m in SciTE and you will see what I mean.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

@water, are you sure it's Alt+m? because it just gives me that little ding noise.. im using AutoIt v3, maybe its a different hotkey?

@wraithdu, and if that is the case, is it even possible to add an AutoIt script to VB?

Posted

That's my point, no you cannot just 'add a script' to any other language. AutoItX provides COM and DLL API access to a subset of AutoIt's core functions, but you need to use these as you would any other 3rd party library. It does not have a facility to just import or run an actual AutoIt script.

Posted

If you click the "Tools" tab in SciTE and the entry "Koda (Forms Designer)" is missing then you didn't install the full SciTE package.

Go to this page and download "AutoIt Script Editor. (Customised version of SciTE with lots of additional coding tools for AutoIt)".

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

right, so if i want to import the library using the COM capabilities of VB2010, how would i go about doing that? because i did

Add a reference...

COM...

AutoItX3 1.0 Type Library

OK

and then it went to the RECENT tab of the Add Reference window on VB... what do i do from here?

Posted

Maybe thread helps?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Im sorry, quite honestly it did not help at all.. i just need some step by step instructions... and honestly, i dont know where i can find the dll or autoitv3, or the COM stuff...

Posted

i got the library imported to VB, i dont especially like the feel of Koda... but now in VB i have

Namespace AutoItX3Lib
Class dll
Mouseclick("primary",455,300,1,75)
sleep(500)
MouseClick("primary",455,343,1,75)
sleep(500)
End Class
End Namespace

but thats in VB not au3... its saying its expecting a declaration...? and im guessing from there i just call it to the actual program?

Posted

In the directory where you installed AutoIt is a subdirectory named "AutoItX". There you'll find an AutoItX.chm file which should give you further information or even examples.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

thats good an all, but i follow the cmd instructions, and its saying that its registered as AutoitX3.Control.. and my VB is only finding the AutoItX3Lib.dll.... this is the first time ive done language blends and im having a very difficult time with this. thank you for all of your help so far also

Posted

i do know vb, that was just copy paste from an AutoIt because i had no clue what i was doing and i was just trying random things to see if i was doing it right.. that was just the dll.vb which i have never used or seen on vb because i have never tried to mix languages... all i want to do is design a wzard using VB.. and then just call an AutoIt function for the very last button of the GUI..... so there is only one projected instance of AutoIt3 in my entire solution

Posted

well can i create an autoIt that runs a VB script? i mean i can get it to run an application, so whats so different about it running a solution?

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
×
×
  • Create New...