Unzip with Bandizip

Hi!

I am new to this app and it's hard to me to understand how to create some basic things.
I need to unzip a selected archive with Bandizip, close Bandizip and delete the initial archive after extraction.

And also the opposite action: archive the selected file with Bandizip and close Bandizip.

Thanks in advance!

While it may sound boring, start with at least a skim of the manual. Have a look at the different triggers you can use to start your macro, the actions available, the tokens you can use in those actions, and get an idea of how all those things fit together.

Hopefully you've spotted the FinderSelection token, which you can use in an Open a File, Folder or Application action to open the Finder-selected zip in Bandizip. What happens then will depend on how Bandizip behaves -- if it auto-unzips the file to the same directory you don't need to do more for this step, otherwise you could drive Bandizip's interface using Select or Show a Menu Item actions. Then use Quit a Specific Application to Quit Bandizip. When you've finished you can use the Delete a File action, again with the FinderSelection token, to delete the old zip file.

Then you just need to decide how to trigger your action -- you could, for example, use an Hot Key trigger such as ⌃U.

You can use a similar process to write your zipping macro -- break it down into the steps you'd do manually then look for the actions to use and the tokens that provide "targets" for those actions.

Have a go and see how you get on. If you get stuck and can't find what you need in the manual then post your macro, as far as you've managed, and explain what your problem is.

2 Likes

Hey Rustam,

Welcome to the forum!  :sunglasses:

I've never heard of Bandizip, and they don't have a demo – so it's impossible for me to give definitive advise.

BetterZip which I do own is AppleScriptable and has several Automator actions.

I'm guessing that Bandizip has at least some Shortcuts support, and it if doesn't then shame on the developers.

So – if you want more help you're going to have to give us some more information about Bandizip's capabilities.

-Chris

1 Like

Hi!

Thanks for replies!

I think I need to explain the nature of an issue I need to solve:

I am trying to use Commander One as a file manager and don't go to Finder at all. The problem is many of right-click menus, quick actions and some services are simply not available in Commander One. I don't know why and developer didn't give exact answer.
So now I have to:

  1. Select file in Commander one
  2. Execute Show in Finder command
  3. Right click and choose Bandizip's Compress command
  4. Close Finder window
  5. Open Commander one

One of the problems is that KM can't operate right-click menu's command (at least I didn't find it) so I have created quite awkward macro looking like this:

Macro-Image

But it doesn't always work correctly.
Unfortunately, Bandizip doesn't support anything (Apple Script, Shortucts etc)

Can KM use Finder right click commands?

Yes - have a look at this example. Make sure your mouse pointer is over a file or folder in Finder and then trigger the macro; it will perform the right-click and then activate the share submenu.

Test Finder Right-Click Share.kmmacros (2.6 KB)

Click to see macro

Keyboard Maestro Export

The method is to have KM actually type the key combination "SH" in the contextual menu to get to the share submenu. You just need to keep typing!

Hope that helps.

1 Like

Works! Perfect! Now how to choose the specific command from the menu?

1 Like

Get KM to type the "Enter" key - just like you would do it using the keyboard.

Thanks! It's much easier now!

1 Like

Can KM move the mouse pointer to the selected file?

Which app is the file selected in?

Finder

OK. No, but KM knows which file(s) is(are) selected in the Finder.

Have a look at the KM tokens %FinderSelection% and %FinderSelections%. They are documented here: token:FinderSelection [Keyboard Maestro Wiki]. They contain the path to the file(s) selected in the Finder.

This may not be useful depending on exactly you want to do with the file(s).

I simply wanted to move the mouse pointer to the selected file before running your right click macro.

The only way I know how to do this is using KM Find Image On Screen action.

As an example, here's a bit of my Finder with a file selected. I would use the KM action to look for the highlighted area - basically the blue strip - and then move the mouse there

image

image

So here's my previous macro with it added in:
Test Finder Right-Click Share.kmmacros (9.3 KB)

Click to see macro

Keyboard Maestro Export

On your Mac you will have to get a screen grab of the highlighted area for yourself as it is highly unlikely my version will work for you.
1 Like