Skip to content

Problem with the zotpick-scannable-cite app #27

Open

Description

@ronaldroy

This almost works for me. Sorry, I'm no coder but here goes:

Using Zotero 5.0.96.1 (latest), Scrivener 3.2.2 (latest), M1 Mac Big Sur 11.2.2 (latest).

The zotpick-scannable-cite applescript (launched from the menu bar, for example) works perfectly but the app doesn't. I've tried the freshly downloaded version of the app from github and also tried saving the applescript as an application using Script Editor. I have pointed Scrivener to it (command-y in citation preferences). The app launches, brings Zotero to the front and I can choose a reference. When I click OK, it just sends me back to Zotero proper. It doesn't switch back to Scrivener and enter the citation. I've been into Security and Privacy System Preference and addressed all the permissions, I think, as I had a few errors reports initially: not allowing key strokes etc.

The pandoc for Scrivener app seems to work fine.

This might be user error so apologies if this is the case.

Activity

  1. ronaldroy commented on Mar 7, 2021

    @ronaldroy
    Author

    Plot thickens.

    I tried the older version and it worked once. Then it reverted to keystrokes not being allowed. It's like it needs to be removed and added back in Security and Privacy after each use.

  2. Jmuccigr commented on Mar 7, 2021

    @Jmuccigr
    Collaborator

    No clue if this is it, but sometimes I find that having an app launched by an indirect method doesn’t trigger the right security warning. Maybe run the AppleScript directly and see if you get prompted to allow it? Or is it sitting unchecked in the Security pref pane?

  3. ronaldroy commented on Mar 7, 2021

    @ronaldroy
    Author

    The applescript works fine on its own, triggered indirectly or directly. It's the app that's not right and I've gone through all the variations of Security settings, I think. It's all checked in the pref pane. No big problem really. I've set up a shortcut (using a Quick Action in Automator) to launch the applescript, which achieves the same thing.

  4. Jmuccigr commented on Mar 8, 2021

    @Jmuccigr
    Collaborator

    I meant to run the app form of the script directly.

  5. Jmuccigr commented on Mar 8, 2021

    @Jmuccigr
    Collaborator

    OK, I tried this myself (not a Scrivener user). I downloaded the app, set the Zotpick AppleScript app as my citation manager, and tried to insert a citation with cmd-Y. The Zotpick dialog popped up fine and I could select a work. Then I got the security query which I ok'ed.
    Screen Shot 2021-03-08 at 10 52 37

    Then I got a message saying the app wasn't authorized to do keystrokes, but immediately under that was another security dialog that sent me to the Security prefs pane to check off the app in the accessibility section.
    Screen Shot 2021-03-08 at 10 52 45

    Screen Shot 2021-03-08 at 10 53 09

    After I did this, I went back to Scrivener, and tried to insert another citation. It worked fine. Quit it. Re-opened, and inserted another citation with no problem.

  6. ronaldroy commented on Mar 8, 2021

    @ronaldroy
    Author

    Yes, I did all that too. And actually the pandoc script and app work as they should. It's just the scannable cite app that doesn't work. It just sends me back to Zotero instead of inserting the citation. No error reports or popups.

  7. Dmw-pixel commented on Mar 9, 2021

    @Dmw-pixel

    I had the same problem as Ronaldroy. I fixed it by doing two things.

    1. Since I just wanted this to work with Scrivener, I changed the script so that instead of figuring out the frontmost app it just used Scrivener. On my machine, that part of the script had been generating the script itself as the frontmost app.

    (So the line setting appName now reads:

    set appName to "Scrivener"

    1. I was still having trouble with the accessibility permission. I unchecked and rechecked the box. That seems to have fixed it and it now works as it is supposed to.

    Hope this help.

  8. ronaldroy commented on Mar 9, 2021

    @ronaldroy
    Author

    Thanks, I've tried that and get the following dialogue:

    Problem
    Could not get the name of the frontmost application.

    However, after clicking OK, the script runs properly.

    So, I just removed the line:
    display alert "Problem" message "Could not get the name of the frontmost application."
    error number -128
    Saved as an app and all seems to work now.
    Is this a bad idea? I've never written an applescript or any code for that matter. I'm pretty good at copy and paste though!

  9. ronaldroy commented on Mar 9, 2021

    @ronaldroy
    Author

    What's strange to me is that the original applescript works perfectly but when saved as an app, it stalls in Zotero.

  10. Dmw-pixel commented on Mar 9, 2021

    @Dmw-pixel
  11. Jmuccigr commented on Mar 11, 2021

    @Jmuccigr
    Collaborator

    @Dmw-pixel The scrivener app does just that, it sets the appName to "Scrivener". If you're seeing it set the app name to frontmost app, you're not using the Scrivener-specific version. I see that there's no scannable-cite version for Scrivener, so if that's what you mean, I've just posted one!

    Let me know how it goes, please.

  12. Dmw-pixel commented on Mar 11, 2021

    @Dmw-pixel
  13. ronaldroy commented on Mar 12, 2021

    @ronaldroy
    Author

    I be stoopid. Where is it?

  14. Jmuccigr commented on Mar 13, 2021

    @Jmuccigr
    Collaborator

    I be stoopid. Where is it?

    In the code section.

    EDIT: Oh, wait, you're right. It didn't get uploaded to the server. Hmmm. Let me look at that. I'm guessing it's a stupid git mistake I'm making.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions