Jump to content
Macro Express Forums

How to handle "file in use error" popup


jamesd1

Recommended Posts

I have a macro that periodically checks for new downloaded videos in as certain directory and then processes them and moves them to a new directory. It works fine except that occasionally the macro runs at the same time that a video is currently downloading and when it tires to move the unfinished download that, of course, doesn't work and popups up a "file in use error" window. Pressing tab and return skips the moving of the vid so the macro continues processing, which is what I want. But I'm not sure how to build a function into the macro that recognizes this pop-up when it occurs so it can automatically skip the in-use video with a Tab Return key combo.

Link to comment
Share on other sites

I understand the concept, but how and where do I insert the If File Ready logic and Wait for File Ready into a macro that is trying to move all of the video files in a directory from one place to another? Typically, it will have perhaps moved three files and on coming to the 4th files that is not ready I would get the error.

Link to comment
Share on other sites

Is there another method to use that would detect the pop-up error window so I could just Macro Express keystrokes to skip/dismiss the pop-up any time it occurred? I can't look inside Macro Express to see how to identify the window because Macro Express is running when the error occurs and so I can't call it up to see how to identify the pop-up.

Link to comment
Share on other sites

I'm only vaguely familiar with use of variables in Macro Express; cook-book stumbled through the process two times years ago.

Use of variables is key to powerful macros.

 

What variable goes in the T1 and how do I define it?

The variables T1 through T99 are string variables. The Repeat with Folder command will put the name of a file in T1 each time it loops. It will loop once for each file in the specified folder. If you have questions, try it.

Link to comment
Share on other sites

  • 4 weeks later...

Macro Express Pro supports error trapping, but I'm not sure that will be the best way to script this. I think you are good to go with Macro Express 3. But the time has come for you to get a handle on variables. And possibly the "repeat with folder" command.

 

It's worth the effort to get comfortable with variables. A nice learning project is to assign a variable to a value, modify the value, and then display it. Maybe something like this, in pseudo-code:

 

T1 = "Hello my name is ME"

Modify T1: Replace every " " (space) in T1 with "" (nothing)

Message Box T1

 

Result:

 

HellomynameisME

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...
×
×
  • Create New...