I Cannot Resize the Windows to What I Want

As an alternative to the Pause Until approach, you could try the following...

Even though it seems that the Pause Until approach should be sufficient (and actually preferred), I've occasionally had to employ a While loop.

What is the name of this action Please ?

Display Text. If you change the option to Display text in a window, you can copy-and-paste the displayed information.

Assuming you didn’t have a typo in the second line [ %WindowName%1% ], that very interesting.

I’d try this: Quit PDF Genious, start it manually and double-check to make sure you can click on the main window and bring it to the foreground. If you can, Quit Drive Genious again, then run the macro. Do you get the save result in the Display Text window?


I'll give this some more thought as I'm doing some yard work. :wink:

In the meantime, maybe the issue is related to this: ISSUE: PAUSE UNTIL Action Fails with No Windows

BTW, it's not normally this hard! Good luck!

Here are two other changes I'd try:

  • In the Activate Application action, try selecting Reopen initial windows.
  • In the Move and Resize action, try changing Front Application to PDF Genius.

It's a bit of a guessing game since I don't have PDF Genius on my Mac.

Did not change.

Do you have my email address ? if so, please send me yours to my email

Thanks for updating your Topic Title and providing a statement of the problem.
Very helpful.

I have not studied in detail all of the above responses, but a quick scan suggests that the windows in question may not be standard macOS windows that are visible to KM.

So, to help diagnose this issue, please do the following:

  1. Manually open the App and its windows of interest
  2. Run this macro: macro reports window properties for ALL windows that System Events can see in the Frontmost application
  3. Select all of the text in the report window, and paste into a Code Block in a reply here.

Activate a Specific Application Action (v9.2)

Activate a Specific Application.kmactions (710 B)

Sorry ! Wanted to append to my previous post.

admin: Please add to the end of my previous post

@rphillipchuk, you've attached a single action, not the updated macro. If this was a mistake, you can avoid this in the future by selecting some other macro, then reselecting the macro you want to share. (This process effectively deselects any actions you might have selected in the macro of interest.)


Okay, @rphillipchuk, I installed PDF Genius and found a work-around:

  1. Duplicate the Activate PDFGenius action.
  2. Move one copy of the Activate PDFGenius action, the Pause Until action, and the Move and Resize action to the end of the macro (after the actions to move and resize of the two Finder windows).

I don't know why it is necessary (and I've not seen this behavior with other apps), but this brute force work-around seems to work for me.

Give it a try and please let me know if the same method works for you.

My interest is piqued, so I'm going to try to understand why this is necessary.

CSS Site Extract PDFs [with suggestions 2].kmmacros (9.2 KB)

Image - CSS Site Extract PDFs [with suggestions 2

@rphillipchuk, after some more testing, I suggest you use one of the methods I’ve included in the macros below. Both are more robust than the method I suggested above.

I’ve left some debugging actions within, just FYI. Please refer to the comments at the top of the macros.

Bottom-line: With PDFGenius, it is not sufficient to Activate PDFGenius and Pause Until is at the front before moving the main window. A check of %WindowName%1% must be added. So with PDFGenious the application is at the front fractions of a second before the %WindowName%1% is updated with a value of PDFGenius.

I’m curious if others on the forum have seen this behavior with other macOS applications.

Move PDFGenius App Window [ Method 1 - provides insight ].kmmacros (9.5 KB)

Image • Move PDFGenius App Window [ Method 1 - provides insight ]

Move PDFGenius App Window [ Method 2 - streamlined ].kmmacros (7.2 KB)

Image • Move PDFGenius App Window [ Method 2 - streamlined ]

Method 2 worked.... I just have to add the directories...........I will send the Paypal tomorrow.....Thanks for all the effort and time.

BIG Canadian Bear Hug goes your way

Great to hear!

PSA for others: For $10, PDFGenius looks to be a good bargain. I'd probably use it myself if I didn't already have access to PDFPen and PDF Squeezer from Setapp.

Hey Folks,

Pause until application is frontmost is FREQUENTLY ineffective.

The macOS often returns true for this, before all of the UI elements are available.

Therefore I NEVER use the action alone. I always accompany it with another test – usually a Menu item exists at path test.

In this case I'd start with: File › Close Window


Chris, thanks for sharing your insight! Although I'm a relative newbie, I've used KM with many applications for years and I don't remember observing this issue. (Maybe, just maybe, I've encountered it, but didn't really understand the cause and did a quick fix by inserting a general Pause.)

Thanks for sharing that approach. Oddly PDFGenius does not have a Close Window menu item. But it does have an About PFDGenius menu item. (This works for most apps, but Obsidian is one notable exception, maybe because it is an Electron app).

Just to make sure I understand: Do you use one Pause Until action, with compound conditions? That’s the approach I used in Method 2.

Below is Method 3; essentially it's Method 2 with an additional check for the About PDFGenius menu item.

Move PDFGenius App Window [ Method 3 - Three Checks ].kmmacros (8.8 KB)

Image • Move PDFGenius App Window [ Method 3 - Three Checks ]

1 Like

Many thanks to all for the time and effort........

Great Program
Great Forum
Great Users