The Get Specified Finder Items action will only return those items, and the Get Selected Finder Items action returns the current selection in the front Finder window. Your workflow isn't getting anything to move, unless there happens to be a current FInder selection.
You would need to do something like use Get Folder Contents on the specified folder(s), and then filter those items for folder names. You may also be able to use Find Finder Items to combine the getting and filtering actions. To see what a specific action is returning, you can view its result.
Post
Replies
Boosts
Views
Activity
Actions are designed to perform a specific task, which is usually general-purpose in nature. They do what they do. I don't know what you did before to get windows moved, but your posted sample workflow isn't going to work at all. Take a look at the action info, which specifies what the input and output will be. Opening files returns files (not windows), and the window actions require a window (not an image) to resize or move, which isn't specified anywhere. Also note that there isn't a line connecting the actions, which indicates they aren't compatible (there isn't anything to convert the action's input/output).
You would need to do something like open the files in Preview, wait a little bit to let them open, then have the Find Windows action filter for Preview windows. From there, you would need to loop through the windows, resizing and moving as desired, but now you are fighting what Shortcuts was designed to be (like a graphical shell script), and might as well use something more designed for the task, like a 3rd party action or scripting.
Shortcuts (and Automator) have their purpose, but they aren't really designed for much beyond batch workflows without some help.
Automator and Shortcuts built-in actions are general-purpose in nature, based mostly on existing shell utilities or common functions, or a developer was generous and decided to include some to support their application. There are tiling and window moving scripts out there (various scripting forums, GitHub, etc), but you would need to graft them into your specific workflow (Run AppleScript, Run Shell script, etc). Other options would be to find 3rd-party actions or make your own, although manipulating the UI is a pain no matter what you use.
The usual approach would be to save whatever the existing delimiters are, set the delimiters to what you want to use, split the string into a list of its text items, restore the previous delimiters, and then just use the list. You are continually splitting the string to get each piece, so all it would take is for the delimiters to get changed/reset somewhere else in the bigger script for the text items to be different the next time you split the string. Another option would be to try using the words of the string.
Finder and/or System Events can provide some information (see their scripting dictionaries), and the Cocoa API (via AppleScriptObjC) can use framework methods such as NSURL's getResourceValue. You would need to provide additional details for a more specific answer.
OK, I am getting a few different errors, but the problem seems to be that for whatever reason (looks like a bug), when you initially click in the window or use the divider or history, the window accessibility properties are not getting set up. Clicking the window again gets things set up, but until then the "front" window doesn't have any properties for the script to use, such as selected tab, so trying to use that throws an error.
Unfortunately, this also prevents targeting the window by name, id, tty, etc, so I haven't found a workaround other than to click the window a couple of times before running the script. A command line tool to do the clicking could probably be used, but you would need to get information about the "front" window to get the bounds to click into, which would most likely be way more involved than what you are doing now.
If you are talking about the split pane view, your script sample works for me in Sonoma. You mention a handler - is the handler being called differently, such as from another tell statement?
This is one of those situations where learning some basics instead of having others do everything helps.
The posted script just has some quoting issues - either escape the double quotes for use in the string, or use single quotes since the shell also understands those. The corrected script would be:
set myFile to choose file -- choose a package or or try `choose folder` to select a folder
set theCommand to "(test -d " & quoted form of POSIX path of myFile & " && echo 'is a dir') || (set status 0; echo 'not a dir') ; 2>&1"
return do shell script theCommand
It is only translating the first and last items because in the getCellRangeValues handler, that is all that the words of cellRange list contains. You would need to get the individual cell elements of the range and use those in the repeat statement to get the in between cell references, for example:
repeat with cellRef in cells of range cellRange of tbl
set end of cellValues to value of cellRef
end repeat
Unless that is a typo, the download_folder path is not valid.
A combination can be used. Shortcuts and Automator both have AppleScript, JavaScript/JXA, and shell script actions, so built-in actions can be used to get results that are then passed to your code. AppleScriptObjC, JXA, and PyObjC can also use (most) Cocoa frameworks.
You can speed it up a bit more by not bothering with the check for a window, as just getting the windows will always return a list and avoid the duplication in getting windows. Better yet, you can usually reduce overhead by having an application do as much as possible with any given call, for example:
tell application "System Events"
set foregroundApps to (processes whose background only is false)
repeat with anApp in foregroundApps
set minimizedWindows to (windows of anApp where value of attribute "AXMinimized" is true)
repeat with aWindow in minimizedWindows
tell aWindow to set value of attribute "AXMinimized" to false
end repeat
end repeat
end tell
In this example you can go even further by doing something like getting the (windows of (processes whose background only is false) where value of attribute "AXMinimized" is true), but there are diminishing returns for increased noise and the performance of complex expressions depends a bit on the particular application.
This is why I asked if there was a browser plugin or something like that. I have never seen that happen with Safari in any macOS I’ve used, and I also don’t see it with Firefox in Linux. Note that that guide was last updated in 2016.
It doesn't do that on any of my systems - could a browser plugin be interfering?
That is the parameter - see the Conventions Used in the Language Guide Introduction.