Closed abstractrealism closed 11 months ago
Do you have any other examples of this behavior? I don't have Photoshop, and I'm not sure whether or not it's necessary to reproduce this issue. It would be helpful if you could give an example with some Apple-provided software (or something open source like FIrefox -- which doesn't seem to support do javascript
) so I can test on my end.
For example, Safari
supports do javascript
as long as you "tell" a specific tab (and enable "Allow JavaScript from Apple Events" in the "Develop" menu):
tell application "Safari" to do JavaScript "alert('hello world')" in current tab of first window
Running this reliably gives me a hello world
in Safari and no undefined
window in QS.
Apologies for never replying, I thought I had. Photoshop is the only program I've experienced this in.
If anyone stumbles upon this who's having the same issue, I just discovered that adding "return" at the end of the AppleScript fixes it, so it returns nothing instead of the "undefined" that it was sending. Everything works fine that way!
Thanks for the followup!
Before submitting your bug report, please confirm you have completed the following steps
Bug description
In certain cases when I run a text command as AppleScript in Quicksilver, the QS interface will pop back up after the command is done running with "undefined" in the first pane. The only program I really use this functionality with is Photoshop, so I'm not sure if it happens with other programs. Additionally, it doesn't always happen, it seems like it's particularly if I use AS to tell Photoshop to run Javascript, whether a file or a typed snippet. (The reason I'm doing this is that it's an easy way to use QS triggers to make keyboard shortcuts that PS doesn't allow, such as with just the control or option key, no Command). The QS interface popping back up is a mild inconvenience, but losing what I'd typed if I forgot to copy it before running is more annoying. I don't know when this bug started, as I've been on Windows for the last two years (a dark time..), and previously was on Mojave with a different machine, different QS version, different PS version, so I have no idea whether it's MacOS, QS, or Adobe causing the issue, but back then I used this same technique without a problem so something changed, somewhere.
Steps to reproduce
tell application "Photoshop" to do javascript "alert('hello world')"
Expected behavior
The command to run, as it does, and that's it, no need for QS to re-open, and the next time I invoke it I'd expect the AS snippet to still be there (barring some other reason for it to not be).
MacOS Version
macOS 12
Quicksilver Version
2.4.0 (4039)
Relevant Plugins
I have the Extra Scripts and Terminal plugins installed, though I don't believe either should be making a difference here.
Crash Logs or Spindump
No response
Screenshots
Additional info
No response