Jump to content

Recommended Posts

Posted

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

Posted (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 by Spiff59
Posted

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...