Selection row focus in new window

A macro for Bike

Focus in selection row in new window.kmmacros (3.2 KB)

image

1 Like

Good idea – do you find that the focus is opened in the new window, on your system ?

( Here FWIW – macOS 11.7, KM and script versions – a new window is certainly being created, but the the focus is still opened in the old one )


I guess another approach might be to create a new tab for the focus ?

A possible sketch here:

Yes, it's works well here. <macOS 12.6, Bike 1.5(87)>

2022-10-25 18.41.56.2022-10-25 18_43_39

1 Like

It seems that on some systems it may need a brief delay statement – just to make sure that front document is already bound to the document object of the new window.

e.g.

tell application "Bike"
    activate
    set bikeurl to URL of selection row of front document
    
    tell application "System Events"
        tell process "Bike" to click menu item ¬
            "New Window" of menu "File" of menu bar 1
    end tell
    
    delay 0.1
    
    tell front document to open location bikeurl
end tell
1 Like