I Want to Trigger a Macro in One of These Two Situations

Please I want to trigger a macro in one of these two situations:

  1. Trigger macro every time i upload something in Firefox.

  2. Trigger macro when i upload image to site call shutterstock.com using Firefox.

You did say "when I upload an image to a site" which means you are consciously triggering the upload manually, so why not trigger the upload by manually triggering a KM macro instead? I think then it's an easy problem to solve. Getting KM to be "triggered" by something it knows little about is not easy (but not impossible). For example when you upload a file from Firefox to a website, does a file get created anywhere in the Firefox folder? If so, we may be able to get KM to trigger on the change in that folder, because KM does have a trigger for a folder change. Can you check into whether FF can be configured to make a folder change when you upload a file?

P.S. I avoid FF like the plague since I can't figure out how to get rid of the page full of ads that occur on each New Tab. So I consider FF to be adware. The only reason I tried it was because it had a really easy mechanism to download a video from Youtube.

@Greg_Hough,

Since FireFox does NOT support either AppleScript or JavaScript in Browser, and KM does NOT have any Actions/Tokens that deal with FF, it is likely that building a robust macro that you want is very difficult, if not impossible.

If you will switch to Safari, Google Chrome, or one of the Chromium-based browsers, then most likely it can be done. Please let us know your decision.

Even if you do switch, we need much more info about your workflow to be helpful.
Please read:
Tip: How Do I Get The Best Answer in the Shortest Time?

No I am sorry.

I use a very impotent plugin that exists only on Firefox.

My work flow is that i upload photo to shutterstock.com, and I need to know when it finishes uploading by sound.

Hey Greg,

What plug-in?

Not possible for Keyboard Maestro.

If you want to make a movie showing us the process and upload it to YouTube, we might be able to offer better suggestions.

-Chris

1 Like

Chris, you are ten times smarter than me with KM, but nothing is IM-possible. I have myself solved a similar problem once by triggering on sound. It took me a long time to get that working. Basically I obtained a piece of software (Audio Hijack Pro) that triggers on sound volume. I was able to get that program to "create a file" whenever sound coming out of my speakers exceeded a certain decibel threshold. Then I think I had KM trigger when a file was created in its audio storage folder.

And voila, I had a KM action that triggered on sound volume.

Of course, that doesn't seem like the right solution for this user. If the user explains all his requirements I'm sure someone can find a simple solution. The problem is most users think they are on the right path to a solution when in many cases they are on the wrong path, and until the exact problem and requirements are explained, answers given will be poor answers.

1 Like

Hey @Sleepy,

Thanks for the catch – I meant not possible for Keyboard Maestro and have amended my post.

I believe I've recommended talking to Rogue Amoeba about this problem before on the forum, as they have the most knowledge of anyone I know when it comes to working with audio-streams on the Mac.

I'll be very surprised (and interested) if it's possible to trap for a specific sound though.

Audio Hijack Pro is now known simply as Audio Hijack and runs $59.00 (U.S.)

-Chris

Thanks for those clarifications. I don't think you can trigger on specific sounds in that app (that would be a nice upgrade) but I think you can trigger on specific volume from specific applications. The sound measurements can be specified per application, which is pretty cool. So for example you could say "if Firefox creates a sound over 50 decibels then create a new file."

In my opinion sound volume and other details like sound pitch would be very interesting triggers for KM to support directly. Audio input is an actual hardware interface and deserves treatment from KM. I would use it if KM supported audio input triggers. But I'd settle for better support with SiriKit, hint hint. I envy some of you who have access to KM betas.

No I don't need to detect a specific sound.

I need KM to make an alarm sound (an alarm sound THAT's built-in to KM)
when an upload finishes in Firefox.

Greg, I'm not sure what you mean now. I asked you some questions earlier that you didn't respond to. May I ask them again?

You did say "when I upload an image to a site" which means you are consciously triggering the upload manually, so why not trigger the upload by manually triggering a KM macro instead? I think then it's an easy problem to solve. ... when you upload a file from Firefox to a website, does a file get created anywhere in the Firefox folder? If so, we may be able to get KM to trigger on the change in that folder, because KM does have a trigger for a folder change. Can you check into whether FF can be configured to make a folder change when you upload a file?

Ah, so.

How are you going to detect when the upload is finished?

-Chris

Just yesterday I helped someone who wanted to use KM to solve a problem with Chrome, and when he explained the problem better he realized he didn't need KM at all, because Chrome could do it on its own. That may be the case here, since we don't know what the problem is yet. We asked him what plugin he's using. We asked him whether his browser triggers a file creation when the upload is completed. He hasn't responded. If he won't explain the problem in more detail, we're kinda stuck. We want to help.

the plugin name is
"Firefox Multi-Account Containers"

Okay, I watched the video advertisement for that add-on. It's just a tab organizer. You are right that that add-on is only available for FF, but there are at least two admins for Chrome (and even one for Opera) that does something similar. If you switched admins to the Chrome add-on (sessionbox.io) then the problem might be far simpler and better for you because KM has some Chrome support.

Even so, I think I can come up with a solution for you for FF, if you don't want to switch to Chrome. But I need to ask you a question first. How exactly does the uploading process appear on the screen? Does the uploading occur while the user sits and waits and watches, or does it occur in the background invisibly. I need to know exactly how it looks on-screen to be able to provide you with a solution since my solution will be based on screen images. Until you provide the name of the website and more details about how the upload works, I can't start. My solution requires that there be visual hints on screen when the upload is completed. Until I see the screen that is displayed for the upload process, I can't write any code.