Jump to content
Macro Express Forums

Folder Activations may benefit from a delay


Recommended Posts

In some recent testing with ISS Kevin edified me that that what seems like a simple event of creating a file is not always a singular event in Windows. This can cause MEP to fire a quick running macro multiple times for what seems to me like what should be a single event. Because of this it might be worth doing a simple test to ensure this doesn’t cause a problem with your macro.

 

First off be aware that if a macro is running it cannot be run again while the macro is running, Even if it’s a different activation. Also the order to execute again is not queued.

 

In this case I was transmitting a small file via FTP and the receiving machine was running MEP with a folder activation and the macro ran pretty quick. With large files I’ve seen the file appear as zero bytes, inflate in chunks, and complete the write, maybe assigning attributes or something. Point being it was multiple events. In my case the file was small so adding a simple delay or a Wait for File to be ready 1 second made all the difference. Next time I plan on writing a simple quick macro that logs each execution of the macro to see if these events are causing multiple executions but I thought I would pass the idea along to others to be aware of.

 

I think in most case like a local file the point is moot because the local write events are so quick that your macro has not completed execution. So I think this only is a concern with something like a VPN or FTP transfer with a very fast acting macro. Normally ist shouldn’t be a concern.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...