Problems With Macro Icons in Keyboard Maestro Version 9.1

After updating to version 9.1 I am no longer able to put icons from images in macros. On both Sierra and Catalina.

2 Likes

I have the same problems under macOS Catalina and macOS Big Sur @peternlewis

It is no longer possible to insert external image files, whether using Darg & Drop or Copy & Paste.
Copy & Paste is possible for images already contained in the editor.

4 Likes

Ah yes. Just tried and same for me. I can copy and paste existing icons within Keyboard Maestro but not copy and paste or drag any new icons in. (Using KM 9.1 in Bug Sur.)

1 Like

Using 10.11.6 (El Capitan), copy/pasting an image (a png and a jpg) from Preview to be a macro icon worked but drag and drop from the Finder did not.

1 Like

Ok, it works in Sierra too.

On both Catalina and Big Sur, I can screen capture an area and then paste it in without issues.

So perhaps it depends on the image you are copying.

Yes, drag & drop is no longer supported (at least at this time).

1 Like

I am able to copy and image (like in a web browser), and then paste into the Macro icon image well. Running Keyboard Maestro 9.1 on macOS 10.14.6 (Mojave).

Hi all

Can someone explain how to actually use the copy/paste method to change a macro icon? I can't seem to understand how to do so from finder. the only thing that seems to work is copy/paste from a webpage..I assumed we can also copy paste from a local image right?

best

Z

Yes, I've just double-checked and pasting from the clipboard does work and as @peternlewis says, drag and drop no longer works. Hopefully drag and drop will be re-enabled at some point as drag and drop was the way I was doing it.

Before I could just drag a .png file from the Finder into the Macro's Image Well. Now the .png has to be opened (for example in Preview) and then ⌘A to select all of it, then ⌘C to copy it, before ⌘V to paste into the Image Well of the Macro.

Actually, just thinking it would be pretty simple to make a Keyboard Maestro Macro to automate these steps... :slight_smile:

1 Like

As in my previous post but in exact steps:
Open the image file in Preview
⌘A to select all of it
⌘C to copy it
Click on the current Icon of the Macro you want to change
⌘V to paste in the new Icon

Before, the .png could be dragged from the Finder directly into the Macro but as of now this is not working.

2 Likes

When I copy an image in my web browser I can copy and paste it. When I copy and paste the same image on the desktop, this happens:

Why so cumbersome @peternlewis? It worked wonderfully in the previous KM version.

1 Like

For anyone who might find it useful, here is a simple Keyboard Maestro Macro that opens the selected Image File in Preview (after it is selected in the Finder), selects all of it and copies it to the Clipboard - ready for pasting into the Image Well in any Keyboard Maestro Macro.

I agree with @appleianer that it would be nice if the previous ability to be able to drag a file from the Finder straight into the Image Well was reinstated in Keyboard Maestro. But until then, this little Macro makes the process quite fast. I just call it up by clicking on my Keyboard Maestro Finder Palette. But it could also be given a Hot Key.

Icon to Clipboard.kmmacros (21.0 KB)

3 Likes

Thanks for the tip @Zabobon :+1:

I have your macro for me somewhat extended, so that I get the image from the Finder directly inserted.
I have taken into account that there are different base icons for macros and macro groups.

06)Icon KM <C892 210112T165239>.kmmacros (25,9 KB)

06)Icon KM <C892 210112T165239>

Since I individualize many icons in Snagit 2021 or also fetch them via the browser (Safari), I have also created macros for it :wink:

2 Likes

That is great @appleianer and I was thinking it would be good to automate the whole process...

...but I have just discovered something, by playing around, that will make the whole process even smoother:

When a Macro is selected, pressing the Tab Key once highlights the Icon Well and from that point a simple Paste Action will paste in the Icon that is in the Clipboard.

I will add this on to my Macro and see if it works...

1 Like

Yes - just tested it and it works!

I think this is a good way @appleianer as I mostly want to change the icons of existing Keyboard Maestro Macros and the "Find Image" solution would only work with the initial Keyboard Maestro Icons - once a Macro is edited Keyboard Maestro changes the Icon to a range of other Icons.

This new Macro will paste into the Image Well of the Macro no matter what its existing Icon is.

Icon to Keyboard Maestro.kmmacros (23.3 KB)

2 Likes

Brilliant idea @Zabobon :star_struck:

I had already thought about how to get this to work. I added tab input to my macros.
It works great :+1:

1 Like

Hey Guys,

Is it no longer possible to get the icon of a file/app from the Get-Info window in the Finder?

That traditionally has been the easiest method.

  • Select the file/app you want in the Finder.
  • Make sure the macro you want to paste into is open in the Keyboard Maestro Editor.
  • Run the script IN the Finder.

Since it uses System Events it might require tweaking to work on versions of macOS later than macOS 10.12.6 Sierra.

But it should be waaay faster than using Preview.

-Chris

--------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2021/01/13 02:01
# dMod: 2021/01/13 02:09
# Appl: Keyboard Maestro, Finder, System Events
# Task: Copy the Finder Icon from the Selected File or App
#     : to the Image Well of the Keyboard Maestro Editor.
# Libs: None
# Osax: None
# Test: Only on macOS 10.12.6 with Keyboard Maestro 9.2
# Tags: @Applescript, @Script, @Finder, @Keyboard_Maestro, @System_Events
# Vers: 1.00
--------------------------------------------------------

try
   
   tell application "System Events"
      tell application process "Finder"
         tell menu bar 1
            tell menu "File"
               tell menu item "Get Info"
                  perform action "AXPress"
               end tell
            end tell
         end tell
         
         delay 0.1
         keystroke tab
         delay 0.1
         
         tell (first window whose subrole is "AXStandardWindow" and name ends with "Info")
            tell scroll area 1
               tell image 1
                  set focused to true
               end tell
            end tell
            
            keystroke "c" using command down
            delay 0.1
            
            tell (first button whose subrole is "AXCloseButton")
               perform action "AXPress"
            end tell
            
         end tell
         
      end tell
      
      if first item of (first item of (get clipboard info)) is «class icns» then
         
         tell application process "Keyboard Maestro"
            set frontmost to true
            tell (first window whose subrole is "AXStandardWindow" and name starts with "Keyboard Maestro Editor")
               tell group 1
                  tell splitter group 1
                     tell scroll area 3
                        tell image 1
                           set focused to true
                        end tell
                     end tell
                  end tell
               end tell
            end tell
         end tell
         
         delay 0.1
         keystroke "v" using command down
         
      end if
      
   end tell
   
on error e number n
   set e to e & return & return & "Num: " & n
   if n ≠ -128 then
      try
         tell application (path to frontmost application as text) to set ddButton to button returned of ¬
            (display dialog e with title "ERROR!" buttons {"Copy Error Message", "Cancel", "OK"} ¬
               default button "OK" giving up after 30)
         if ddButton = "Copy Error Message" then set the clipboard to e
      end try
   end if
end try

--------------------------------------------------------

Unfortunately not anymore @ccstone.

In the current version of macOS Catalina and macOS Big Sur, drag & drop or copy & paste no longer works.

To answer it in your words @ccstone:

If you read the article carefully and are not up to date with the macOS operating systems... is unnecessary in the future such a demand.

Ha! I did read the thread carefully, and this is hardly clear.

-ccs