Sign in to follow this  
Followers 0
skylang

Transferring data from VBA to AutoIt

9 posts in this topic

#1 ·  Posted (edited)

I'm trying to find a reasonable way to send data from a VBA macro in Word to an AutoIt script. Using the clipboard seems to have inconsistent results. I could write to a file but that seems a clumsy and slow method. The AutoIt script is running in the background waiting for data and it acts on it when the macro calls it. At the moment the script just monitors the clipboard but it gets confused when the clipboard is used for something else.

Edited by skylang

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You could create a COM-server in AutoIt and call it from VBA (using AutoItObject), or use WM_COPYDATA to send the data.

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

Can you point me to info on how to do this?

Share this post


Link to post
Share on other sites

My signature contains a link to AutoItObject. The download contains an example in ROT_Aserver.au3 / ROT_rec.au3


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

I downloaded and extracted the package but it doesn't seem to contain ROT_Aserver.au3 / ROT_rec.au3

Share this post


Link to post
Share on other sites

Ok, then it is only in SVN: http://svn.origo.ethz.ch/wsvn/autoitobject/trunk/


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

Got it, thanks. I think I can follow it - I'll experiment over the weekend. I gather for what I'm doing I will need to find out how to create the server in VBA?

Share this post


Link to post
Share on other sites

Got it, thanks. I think I can follow it - I'll experiment over the weekend. I gather for what I'm doing I will need to find out how to create the server in VBA?

I think you switched things around now. You wanted to send data to AutoIt, so ProgAndy suggested you create a server in AutoIt for VBA to talk to.

In the Access AutoIt thread people made some examples on it with a couple of languages... You may want to take a look (but note that it's not the same server-script).

Share this post


Link to post
Share on other sites

Thanks, the more languages the better, since I'm not very good at any of them!

Share this post


Link to post
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
Sign in to follow this  
Followers 0