skylang Posted June 30, 2011 Share Posted June 30, 2011 (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 June 30, 2011 by skylang Link to comment Share on other sites More sharing options...
ProgAndy Posted June 30, 2011 Share Posted June 30, 2011 (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 June 30, 2011 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 More sharing options...
skylang Posted June 30, 2011 Author Share Posted June 30, 2011 Can you point me to info on how to do this? Link to comment Share on other sites More sharing options...
ProgAndy Posted June 30, 2011 Share Posted June 30, 2011 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 More sharing options...
skylang Posted June 30, 2011 Author Share Posted June 30, 2011 I downloaded and extracted the package but it doesn't seem to contain ROT_Aserver.au3 / ROT_rec.au3 Link to comment Share on other sites More sharing options...
ProgAndy Posted June 30, 2011 Share Posted June 30, 2011 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 More sharing options...
skylang Posted June 30, 2011 Author Share Posted June 30, 2011 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? Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted June 30, 2011 Share Posted June 30, 2011 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). .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
skylang Posted June 30, 2011 Author Share Posted June 30, 2011 Thanks, the more languages the better, since I'm not very good at any of them! Link to comment Share on other sites More sharing options...
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