Jump to content
Sign in to follow this  

Can you not wait for blocking function

Recommended Posts


I'm doing some automation using Acrobat and Excel I have a function I wrote for Excel that takes a bit of time to run, and I have to $oJSpdf.saveas($ImgFolder,"com.adobe.acrobat.jpeg") in acrobat. The .saveas method is a blocking function, which usually pauses the script until it has finished executing

If I could start the Acrobat javascript.doc.saveas function and while that's running run the Excel function I wrote, It would save a good minute on the script. The saveas function in acrobat doesn't support this, so I was wondering

Is there some way to run a blocking function and return before it finishes?


Share this post

Link to post
Share on other sites

Generally my suggestion would be to split the job into 2 scripts.  Call the second script to do the file save and indicate when it's done perhaps using a windows message.  RegisterWindowsMessage is quite easy to use.

Share this post

Link to post
Share on other sites

You could also probably get away with using the Adlib functions and/or even rely on a dynamic value in an ini file.

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.


What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)


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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.