You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AppleScript actions that take an optional indirect object always end up receiving a randomly selected indirect object even if the user didn’t select anything in the third pane.
To reproduce, try the following:
using terms from application "Quicksilver"
on process text thetext with args
return "1. " & thetext & " 2. " & args
end process text
on get argument count
return 3
end get argument count
on get direct types
return {"NSStringPboardType"}
end get direct types
on get indirect types
return {"NSStringPboardType"}
end get indirect types
end using terms from
I have also found that the third pane will have random stuff in it for AppleScript actions that require a third pane selection, like so:
using terms from application "Quicksilver"
on process text thetext with args
return "1. " & thetext & " 2. " & args
end process text
on get argument count
return 2
end get argument count
on get direct types
return {"NSStringPboardType"}
end get direct types
on get indirect types
return {"NSStringPboardType"}
end get indirect types
end using terms from
It looks to me like there are two issues happening here:
AppleScript actions that have an optional third pane should always have the third pane empty by default, but they don’t.
For compiled three-pane actions, QS will pre-populate the third pane with the highest ranking catalog item that matches the action’s criteria for the third pane. This is possible because the compiled actions have to declare this criteria in their Info.plist (or somewhere like that), enabling QS to know it in advance. But for AppleScript-based actions, there is no way for QS to know the criteria in advance; it has to be discovered at run-time. So it just grabs something on the fly. (Perhaps the most recently indexed catalog item that matches the criteria, but who knows?) This affects all AppleScript actions that use the third pane, regardless whether the third pane is required or optional.
A good solution for the first problem would be to change the code to ensure that the third pane is always cleared the moment that an AppleScript-based action with an optional third pane is selected in the second pane.
The best solution to the second problem would be to ensure that QS always grabbed the top-ranked item for whatever criteria the AppleScript action defined for its third pane. Alternatively, a quick and dirty fix would be to clear the third pane any time any three-pane AppleScript action is selected in the second pane. That would be a bit less useful, since the user would always need to type something into the third pane. But since we have to do that anyway with the current situation, it would still be a step forward. At least we’d be forcing the user to make a good selection instead of suggesting a terrible selection.
The text was updated successfully, but these errors were encountered:
AppleScript actions that take an optional indirect object always end up receiving a randomly selected indirect object even if the user didn’t select anything in the third pane.
To reproduce, try the following:
I have also found that the third pane will have random stuff in it for AppleScript actions that require a third pane selection, like so:
It looks to me like there are two issues happening here:
A good solution for the first problem would be to change the code to ensure that the third pane is always cleared the moment that an AppleScript-based action with an optional third pane is selected in the second pane.
The best solution to the second problem would be to ensure that QS always grabbed the top-ranked item for whatever criteria the AppleScript action defined for its third pane. Alternatively, a quick and dirty fix would be to clear the third pane any time any three-pane AppleScript action is selected in the second pane. That would be a bit less useful, since the user would always need to type something into the third pane. But since we have to do that anyway with the current situation, it would still be a step forward. At least we’d be forcing the user to make a good selection instead of suggesting a terrible selection.
The text was updated successfully, but these errors were encountered: