Jump to content

alvaroybanez

Member
  • Posts

    4
  • Joined

  • Last visited

Everything posted by alvaroybanez

  1. I got it to work, if anyone from the Obsidian forum is wondering, the two Safari tells need to be replaced with: tell application "Google Chrome" to set currentURL to URL of active tab of window 1 tell application "Google Chrome" to set theTitle to title of active tab of window 1 I've also shared the finding with the script creator so he might update his repo. Thanks!
  2. that I get. I’ll have to dig deeper. The chromium documentation regarding Apple script is pretty shallow. Thanks again and a happy new year!
  3. Thanks! I checked that post before asking a question, but the tell seems to be pretty straight forward for the browser. Retrieve the URL and the title. The syntax in that post's example regarding Google Chrome says: tell application "Google Chrome" to return title of active tab of front window, which is, more or less, close to the syntax that AS is passing to Safari. The rest is handled by Alfred. Maybe I'm missing something (I have zero experience with AS).
  4. Hi all, I've been an Alfred user for quite some time, but never a power user. I've recently started taking Alfred more seriously as a productivity tool, and I came across a script by @senhortavares, that retrieves a title, a URL from the web, and downloads it as markdown, creating an Obsidian file. The start of the workflow starts like this with Safari, and it works flawlessly. Then, there's a curl, an html2text step, and finally everything put down in a file. tell application "Safari" to set currentURL to the url of the front document tell application "Safari" to set theTitle to name of front document set bundleID to (system attribute "alfred_workflow_bundleid") tell application id "com.runningwithcrayons.Alfred" set configuration "url" to value currentURL in workflow bundleID set configuration "title" to value theTitle in workflow bundleID end tell For some reason, after allowing Chrome to accept JS events from Apple Events (View > Developer > Allow JavaScript from Apple Events), it does not work in Chrome. Not as (AS), nor as (JS). Replacing Safari with Google Chrome should work just fine, as far as my understanding goes. Any thoughts on what could be wrong to fix this first step? Thanks in advance and Happy New Year! 😁
×
×
  • Create New...