Jump to content
Macro Express Forums

Version 4.8.1.1: can't delete a file?


Recommended Posts

I realize that I'm running a very old version (I run a poor registered charity), but it works great and is one of my top two apps (the other is Ethervane Echo, which saves and restores the clipboard).

 

When I run the following macro to save my editing and show my edited website in Firefox, the macro fails to delete file "files-are-okay.txt" with no error message. All the other commands work perfectly.

 

Does this ring a bell with anyone? Is this a known bug, and what version was it fixed in?

 

Environment: HP laptop, Windows 10 Home

 

The macro:

 

<LOCK PLAYER Wait="FALSE"/>
<TEXT TYPE Action="0" Text="<ALT>fl"/>
<DELAY Flags="\x12" Time="1000"/>
<DELETE FILE/FILES Path="C:\\Web\\n1\\generated\\files-are-okay.txt" Progress="FALSE" Recurse="FALSE" Permanent="TRUE"/>
<DELAY Flags="\x12" Time="250"/>
<WINDOW ACTIVATE Title="Mozilla Firefox" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/>
<WAIT FOR WINDOW TITLE Title="Mozilla Firefox" Partial="TRUE" Wildcards="FALSE" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="10"/>
<TEXT TYPE Action="0" Text="<CONTROL>4"/>
<DELAY Flags="\x12" Time="500"/>
<TEXT TYPE Action="0" Text="<CONTROL><F5>" _COMMENT="Use <CONTROL><F5> to refresh browser fully."/>
<DELAY Flags="\x12" Time="500"/>
<TEXT TYPE Action="0" Text="<HOME>" _ENABLED="FALSE"/>
<UNLOCK PLAYER/>

 

Link to comment
Share on other sites

Try rebooting.

 

Can you delete it manually using the same account you are operating MEP in? I'll assume you are.

 

You could tr running MEP as an administrator.  

 

Next thing I would do is to see if an application has a lock on it using Process Explorer

 

You're saving a file into a non-user area as defined by Microsoft. Usually this isn't a problem but I wonder if you have any anti-virus software which is blocking MEP's delete action. Some of them are suspicious of processes like MEP because that's how viruses sometimes operate. I would try disabling all security software. 

Link to comment
Share on other sites

It might help to update to the latest version of Macro Express Pro 4. Download it here: Previous Versions

 

The revision history does not mention a change for deleting files but there are several other important fixes. Release Notes: Macro Express Pro v 4.9.0.1

 

Your Macro Express Pro 4 license allows you to update to Macro Express Pro v 4.9.0.1 without cost.

Link to comment
Share on other sites

You could also try adding a "Wait for File to be Ready" command in front of the Delete File/Files command:

Lock Player
Text Type (Simulate Keystrokes): <ALT>fl
Delay: 1000 milliseconds
Wait for File to be Ready: C:\Web\n1\generated\files-are-okay.txt
Delete File/Files: "C:\Web\n1\generated\files-are-okay.txt"
Delay: 250 milliseconds
Window Activate: Mozilla Firefox
Wait for Window Title: Mozilla Firefox
Text Type (Simulate Keystrokes): <CONTROL>4
Delay: 500 milliseconds
Text Type (Simulate Keystrokes): <CONTROL><F5> // Use <CONTROL><F5> to refresh browser fully.
Delay: 500 milliseconds
Unlock Player
Text Type (Simulate Keystrokes):  
<LOCK PLAYER Wait="FALSE"/>
<TEXT TYPE Action="0" Text="<ALT>fl"/>
<DELAY Flags="\x12" Time="1000"/>
<WAIT FOR FILE TO BE READY Filename="C:\\Web\\n1\\generated\\files-are-okay.txt" Time="1" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="15"/>
<DELETE FILE/FILES Path="C:\\Web\\n1\\generated\\files-are-okay.txt" Progress="FALSE" Recurse="FALSE" Permanent="TRUE"/>
<DELAY Flags="\x12" Time="250"/>
<WINDOW ACTIVATE Title="Mozilla Firefox" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/>
<WAIT FOR WINDOW TITLE Title="Mozilla Firefox" Partial="TRUE" Wildcards="FALSE" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="10"/>
<TEXT TYPE Action="0" Text="<CONTROL>4"/>
<DELAY Flags="\x12" Time="500"/>
<TEXT TYPE Action="0" Text="<CONTROL><F5>" _COMMENT="Use <CONTROL><F5> to refresh browser fully."/>
<DELAY Flags="\x12" Time="500"/>
<TEXT TYPE Action="0" Text="<HOME>" _ENABLED="FALSE"/>
<UNLOCK PLAYER/>
<TEXT TYPE Action="0" Text=" "/>

 

Link to comment
Share on other sites

Thank you so very much to everyone who replied. Your replies were almost all very excellent, and would have been helpful, except that I finally figured out that I had a programming error. I was continually creating the file during the macro. So even though M.E. was actually deleting the file, it kept appearing. I should have realized that Insight Software, being such amazing engineers, would have tested M.E. thoroughly. I should have had more trust.

 

Thanks again to all. I will try to delete this thread, if possible, to avoid confusion to others.

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...