Inconsistent Results with Antivirus Scan Macro

Usually when I download a file (especially an office document, like Word, Excel, PowerPoint) I do a quick scan with Avast to reduce the likelihood that there's anything nasty within it. This works especially well for installers that may include OpenCandy. So I developed this macro, which worked fine until I installed TextWrangler. Now sometimes the file is scanned with Avast as desired, and other times the file (regardless of extension) is opened with TextWrangler. The two are next to each other in the Services menu, but the command is spelled out clearly in the macro. Any ideas?

Here is the macro:

Here is the menu in question:

That’s weird, but the Services menu is dynamically generated, so I suppose it is possible it is changing while being selected and somewhere along the lines the selection is getting confused.

Why is it that you are using the hot key Control-Shift-1 and the item has the command key Control-Shift-1 as well?

Are you selecting it from the status menu? If so, why not remove the hot key trigger and use the Type a Keystroke action to type Control-Shift-1 to select the menu?

I seem to get better results when I choose to run the macro from the status menu, but I’ve kept the hot key trigger there as well. To make it more likely to work, I tweaked the mac-native shortcut for that menu to be the same trigger (I know it’s redundant, but I thought it might help). I don’t think it’s interfering, since the problem existed before I made that change to the native shortcuts.

I’ll keep testing with the method you suggested. I hadn’t thought of using a menu to trigger a hotkey.

I got the same inconsistent results from fsecure. I decided to switch to Avast along with Malwarebytes as together they provide 360 protection. I would also recommend here to see the comparison between them here https://www.reviewsed.com/malwarebytes-vs-avast/ and thats how you will analyze why the combination of both is beneficial for security purpose.