aisc Posted April 23, 2010 Posted April 23, 2010 Looking for a way to have a script kick off a macro (that part I've got done via automating excel menus)... but then, the macro takes a long time to run... when it's done, can it pass a message back to the script, so the script can execute some other actions? Really, there's no easy way to tell, from the GUI that it's done. Is there a programmatic (autoit) way? Thanks, aisc
l3ill Posted April 23, 2010 Posted April 23, 2010 I have something similar setup as a Function. After the function is complete it returns to the While loop of the script until the next function is called. Hope this info helps... My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
Spiff59 Posted April 23, 2010 Posted April 23, 2010 (edited) There are likely a dozen ways you might go about that. Setting an environment variable, writing a flat file, making a registry entry, an .ini file... Maybe you could write a registry entry with the value "working", then call the macro and go into a loop that continues as long as that registry entry exists. Then add a DeleteSettings command at the end of the excel macro to delete the registry entry, which would cause your au3 script to exit the loop and continue execution. Or, write an empty text file "working.txt", call the macro and have the macro delete the file when finished. Again, you'd loop in your au3 script until FileExists() returned a false. Edited April 23, 2010 by Spiff59
aisc Posted April 23, 2010 Author Posted April 23, 2010 There are likely a dozen ways you might go about that.Setting an environment variable, writing a flat file, making a registry entry...Maybe you could write a registry entry with the value "working", then call the macro and go into a loop that continues as long as that registry entry exists. Then add a DeleteSettings command at the end of the excel macro to delete the registry entry, which would cause you au3 script to exit the loop and continue execution?Good suggestions. I guess there's no way to do it with Ole Automation or whatever.Thanks,aisc
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