Jump to content

Transferring data from VBA to AutoIt


Recommended Posts

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
Link to comment
Share on other sites

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

Link to comment
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

Link to comment
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

Link to comment
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).

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...