Jump to content
Sign in to follow this  
corgano

Can you not wait for blocking function

Recommended Posts

corgano

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?


0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Share this post


Link to post
Share on other sites
MilesAhead

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
TheSaint

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.

Spoiler

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)

userbar.png

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  

×