I'm new to using KM with Airtable. I'm trying to write a macro that will copy an ID value from an Airtable cell, then move to a linked cell that does not yet have a value in it, so it has a plus sign (+), which, when clicked, brings up a range of available values to link from another table. Is there any way to get KM to click precisely on that plus sign? Recording the sequence once works but it records the specific location of that click, which, of course then changes as one works down the rows of the table.
TIA for any suggestions!
Are you referring to the native-macOS version, or the web-browser version?
If the former, did you check whether the app is AppleScript compatible? If the latter, which browser are you using?
If you provide a screenshot, I may be able to tell you if the KM Find Image action will be able to find and click on the "+" symbol. Find Image is reliable when the image is large, but something as small as a "+" may cause problems, because there could be more then one "+" on the window.
I am using KM Version 11.0.2 with Mac OS 12.7.5 Monterey. I am not very familiar with AppleScript, so in answer to your question, I would refer you to How to Run a Script Action | Airtable Support. It seems there are scripting functionalities, but I'm not sure how or whether it would interact with AppleScript. Attached is a screen shot. The plus sign is rather prominent.
Not only is the PLUS sign prominent, but in your image there's a blue border near it. Is that blue border always near it, or is that something you did just to enhance the image? Either way, there's a grey box around the PLUS, so I think Find Image should work fine, as long as you include the box as part of your image.
Do you know how to create a Click on Found Image action? Do you know how to take a screen capture and drag the image into the action?
That blue border is something Airtable creates automatically when the cell is active.
I took a screen shot of the image and dragged it to the Image section of the "Click on Found Image" action. I told it to click at 20 over and -20 down from "found image's corner. So far, no success. I must be missing something.
Don't screen shot to file -- instead, do ⇧⌃⌘4 then drag out your rectangle to screen shot to the clipboard, then click on the image well in the action and ⌘V or Edit->Paste.
Doing it that way solves the resolution problems some people are running into when going via a file.
Firstly, don't use +/-20 and don't use "from found image's corner", instead use "zeros" and choose the option "from the center of the found image."
Second, you said "no success" but that could be for a variety of reasons. For example, did you pick "Unique" or "Best"? Second, you didn't say precisely how you obtained and set the image into the Find Image action. Nige gave some advice about that issue. Did you take his advice?
Thirdly, make sure, at least until you get it working, that you click on the option box called "Display" which will show you the exact locations(s) that it found the image. Let us know if you see green boxes being displayed on your screen once you set that.
Fourthly, it's a rare situation, but if you are having a problem you should restart your KM Engine. For all I can tell, you may have been running the engine for months without restarting it.
Thank you, Nigo and Airy, for your suggestions.
I restarted the KM Engine.
I took another screen shot, using ⇧⌃⌘4 and pasted it into the image field in the action.
Left the default parameters -- 0,0 and "from center of the found image".
Clicked the "Display" box.
Now when I run the routine, the system tells me "Keyboard Maestro wants to access your system settings" (or something to that effect), which I went ahead and allowed.
I still do not see any green boxes being displayed on the screen. I also do not see "the exact location(s) that it found the image". Where would that appear?
The Airtable app simply tells me that "1 cell has been copied".
I tried something else -- took a screen shot of just the plus sign and tried it that way. That did not work. Still no green boxes or location coordinates.
Success! I added the action "Find Image on the Screen", using just the plus sign image, and put it in front of the "Click at found image" action. Now I get the green box and the desired result. Not sure whether both those actions are required or if the first alone will work.
Just tested it. It appears that both actions are required. I also added a 0.5 second pause for good measure, before the macro proceeds to the next step.
For now, we're good. Thanks again for your help! I would have never figured it out by myself.