Jump to content

autoit macros


Recommended Posts

Hi everyone, I am new to the autoit language and still exploring its potential uses.

sorry if this topic has already been discussed, on a search of the forums, i didnt find any answers.

I am trying to find a way to add a macro to the autoit program. I have looked in the Autoit help and it lists a bunch of macros using the '@macro' command but not how to add one.

The structure of the program I am writing is this:

1. have deployable .exe

2. user double clicks on the exe, initiating the GUI

3. user sets path for creation of new excel file (still working on this)

4. autoit creates a new excel and formats the sheet (working)

5. autoit runs a macro/vba program that imports data from another program

6. GUI closes and excel becomes active.

Being a deployable program, the idea is that the user wont have the excel sheet already, so a new one is created and being a new sheet it wont have the vba program (already working) as part of the workbook. the vba is a couple of hundred lines in its entirety and a complicated program in itself. given excels lack of security i would like the executition from autoit if possible. I think I am just missing a trick on how to create an autoit macro. Any advice or direction would be greatly appreciated.

Thank you.

-Phil

Link to comment
Share on other sites

;) Just use '&' for adding variables, constants and macros. See example below:

$VARIABLE = @ComputerName
msgbox(64, "Info", "The name of my computer is: " & $VARIABLE)

Take a nice look at how I used "" and & with a $VARIABLE which has value equal to macro @ComputerName

Edited by MKISH

----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Link to comment
Share on other sites

You cannot add a macro, they are built into, and native to autoit3.

EDIT:

$VARIABLE = @ComputerName
msgbox(64, "Info", "The name of my computer is: " & $VARIABLE)
or

msgbox(64, "Info", "The name of my computer is: " & @ComputerName)
Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Why not get AutoIt to do the import for you direct rather than have to master two scripting languages? Have you searched the AutoIt help file for 'excel' to see what functions are supported? Have you done the same thing in VBA as well?

What makes you think that the security on AutoIt is better then Excel?

A little more information on what you want to do may assist with us giving you some more ideas.

Edited by Confuzzled
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...