Jump to content

BCNbcn

Member
  • Posts

    5
  • Joined

  • Last visited

BCNbcn's Achievements

Helping Hand

Helping Hand (3/5)

0

Reputation

  1. Hi, How can I output variables (not a query) from jsx? I want to output two separate variables from this script: const frontmost_app_name = Application('System Events').applicationProcesses.where({ frontmost: true }).name()[0] const frontmost_app = Application(frontmost_app_name) function run() { if (['Google Chrome','Google Chrome Canary','Chromium','Opera','Vivaldi'].indexOf(frontmost_app_name) > -1) { var current_tab_title = frontmost_app.windows[0].activeTab.name() var current_tab_url = frontmost_app.windows[0].activeTab.url() } else if (['Safari','Safari Technology Preview','Webkit'].indexOf(frontmost_app_name) > -1) { var current_tab_title = frontmost_app.documents[0].name() var current_tab_url = frontmost_app.documents[0].url() } else { throw new Error('You need a supported browser as your frontmost app') } console.log({"alfredworkflow": {"variables": {"var1": current_tab_url, "var2": current_tab_title}}}) } These are then sent to a notification: https://www.dropbox.com/s/6jpnigr1g6vd1g3/Screenshot 2018-03-27 10.45.57.png?dl=0
  2. Hi, This shell script works if I run sh ip.sh or env -i ip.sh, but not when I paste it into Alfred as part of a workflow. I get the following error: ip.sh #!/bin/bash export PATH=/usr/local/bin:$PATH export http_proxy='proxy:pass@192.168.1.98:3128' /usr/bin/curl 'ipinfo.io/ip' Similar problem, this works when I run it from terminal reset.sh ssh user@ip -p 1234 -T<<'ENDSSH' sudo sh /etc/blablabla/shell.sh ENDSSH In Alfred it's stuck at Processing output of 'action.script' and nothing happens. Tested to run them as external script and bash scripts in alfred.
×
×
  • Create New...