{"action":"created","issue":{"url":"https://api.github.com/repos/davepwsmith/zotpick-applescript/issues/6","repository_url":"https://api.github.com/repos/davepwsmith/zotpick-applescript","labels_url":"https://api.github.com/repos/davepwsmith/zotpick-applescript/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/davepwsmith/zotpick-applescript/issues/6/comments","events_url":"https://api.github.com/repos/davepwsmith/zotpick-applescript/issues/6/events","html_url":"https://github.com/davepwsmith/zotpick-applescript/issues/6","id":165461391,"number":6,"title":"Not assigning appName correctly when run as application from Scrivener","user":{"login":"matthewlehew","id":4981740,"avatar_url":"https://avatars.githubusercontent.com/u/4981740?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewlehew","html_url":"https://github.com/matthewlehew","followers_url":"https://api.github.com/users/matthewlehew/followers","following_url":"https://api.github.com/users/matthewlehew/following{/other_user}","gists_url":"https://api.github.com/users/matthewlehew/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewlehew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewlehew/subscriptions","organizations_url":"https://api.github.com/users/matthewlehew/orgs","repos_url":"https://api.github.com/users/matthewlehew/repos","events_url":"https://api.github.com/users/matthewlehew/events{/privacy}","received_events_url":"https://api.github.com/users/matthewlehew/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-07-14T02:14:44Z","updated_at":"2016-11-15T17:48:01Z","closed_at":null,"body":"I discovered this script and the [Scrivener-Pandoc-Marked workflow](http://davepwsmith.github.io/academic-scrivener-howto/) today and am very excited about it. However, I'm having trouble getting zotpick-pandoc to work. I don't know much about AppleScript, so I don't know if this is an issue brought on by macOS Sierra (I'm running build 16A239m).\n\nAnyway, it looks like the issue is with line 3, and `appName` is being assigned the script itself (I'm running it as an application and launching with Command-Y in Scrivener, per the instructions. After selecting the source in the Zotero selector, I can see zotpick-pandoc briefly flash as the active app name in the upper left before Zotero is the active window and no change has occurred in Scrivener.\n\n**Notes:**\n- Adding `display dialog \"appName is: \" & appName` confirms that zotpick-pandoc is being assigned to `appName`. \n- If zotpick-pandoc is being launched for the first time from Scrivener and the confirmation dialog appears asking if you want to launch the app, Scrivener will be assigned to `appName`. However, on subsequent launches, `appName` will be zotpick-pandoc.\n- Altering the script to hardcode \"Scrivener\" as `appName` causes it to execute without problems.\n\n**Suggested Fix:**\n- If an alternate solution to isolate the frontmost application immediately prior to the script launch can't be found, I suggest hardcoding \"Scrivener\" as `appName` and changing the documentation to instruct the user on how to change it for their purposes.\n"},"comment":{"url":"https://api.github.com/repos/davepwsmith/zotpick-applescript/issues/comments/260713729","html_url":"https://github.com/davepwsmith/zotpick-applescript/issues/6#issuecomment-260713729","issue_url":"https://api.github.com/repos/davepwsmith/zotpick-applescript/issues/6","id":260713729,"user":{"login":"mrlyingman","id":6301856,"avatar_url":"https://avatars.githubusercontent.com/u/6301856?v=3","gravatar_id":"","url":"https://api.github.com/users/mrlyingman","html_url":"https://github.com/mrlyingman","followers_url":"https://api.github.com/users/mrlyingman/followers","following_url":"https://api.github.com/users/mrlyingman/following{/other_user}","gists_url":"https://api.github.com/users/mrlyingman/gists{/gist_id}","starred_url":"https://api.github.com/users/mrlyingman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrlyingman/subscriptions","organizations_url":"https://api.github.com/users/mrlyingman/orgs","repos_url":"https://api.github.com/users/mrlyingman/repos","events_url":"https://api.github.com/users/mrlyingman/events{/privacy}","received_events_url":"https://api.github.com/users/mrlyingman/received_events","type":"User","site_admin":false},"created_at":"2016-11-15T17:48:01Z","updated_at":"2016-11-15T17:48:01Z","body":"I'm on el capitan and it's not working. "}}
{"actor":{"display_login":"mrlyingman"}}