I Cannot Resize the Windows to What I Want

My goal is to create a macro that will open up an application and place it on the left side , then open up two finder windows and place them on the right side.

The first screenshot shows you what I get when I run it.

The second screenshot is what I want it to be.

I cannot get the "Move and Resize Front Window" to do what I want.

What am I doing wrong?

here is the macro

CSS Site Extract PDFs Macro (v9.2)

CSS Site Extract PDFs .kmmacros (5.5 KB)

This is what I get when I enable the Macro

After adjusting/moving, this is what my goal is

Thanks
Ron from Canada

@rphillipchuk, it is not clear whether you are just sharing a macro for others to use, or if you have some problem you need help with.
If you need help, please revise your topic title to reflect your request, and provide a statement of the problem you need help with at the TOP of your post.

Thanks.

@rphillipchuk , I downloaded your macro and modified it with a few suggestions

General Comments

  • I’ve disabled some of your actions and replaced them with the orange actions.
  • Obviously I didn’t have the application and the folders you specified, so I replaced them with others.
  • The green actions are actions I’ve added.

Specific Comments

  • To open an application, the help recommends the Activate a Specific Application action rather than an Open a File Folder or Application action.
  • Before attemptig to move and resize a window it’s a good practice to wait until the window appears.
  • There a several approaches that can be used when moving and resizing windows, but I like using these options:
    • SCREENVISIBLE(Main,Left)+SCREENVISIBLE(Main,Width)*A%
    • SCREENVISIBLE(Main,Top)+SCREENVISIBLE(Main,Height)*B%
    • SCREENVISIBLE(Main,Width)*C%
    • SCREENVISIBLE(Main,Height)*D%

You'll see I did that for the two folders.

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

Image • CSS Site Extract PDFs [with suggestions]

@_jims

Thank you for your time and effort.... I was successful in changing the folders to my needs

But I am having problems with the application. The "Move and Resize Front Window" doesn't change no matter what I change........Everytime I run the Macro, The application window is always front and centered.

My goal is to is to move it to the top left corner and fill in the void left by the folders. This is what I am after.

I Really like the way you are explaining it to me. I just don't not want other people to write my macros, I wish to write my own, so any explanation is greatly appreciated.

Sometimes this old brain is hard to start

Please advise
Ron

You can try add Pause Action (500ms) to wait till the window showup prior to manipulate window.
I always add pause action and usually it solve the problem.

You can also try Pause Until Action to check if the front window is shown up.

Great. Glad you got the folders resolved.

I included the suggestions embedded in the macro because it's the most efficient method to provide the help.

Did you insert the Pause Until action after activating the app? If so, in that action did you change the App to the app you are opening (PDF Genious)? If you did both, then try inserting a standard Pause (0.2 seconds) after the Pause Until action.

@_jims
I have done as requested with no success.... The Pause worked as expected....

Here is SS

Are there any permissions preventing me ?

Many thanks for your help

After the Pause 0.2 seconds, try inserting this action. That should provide some insight on the issue.

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?

Yes

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.)