无法调用一些用户输入变量(currentWt、height、BMI,然后将在下面的这个 python 脚本中使用并粘贴到剪贴板。有没有人熟悉 alfred 工作流程并且知道我该怎么做?
import json
import sys
print ('Current wt: ') + str({var:currentWt}) + (' lbs (') + str({var:currentWt}/2.2) + (' kg)')
print ('Height: ') + str({var:height}) + (' inches')
BMI = ({var:currentWt} / 2.2) / (({var:height} * 0.0254) **2 )
print ('BMI: ' + str(BMI))
hamwiMale = (106 + (6 * ({var:height} - 60)))
hamwiFemale = (105 + (5 * ({var:height} - 60)))
if {var:gender} == 'Male':
print ('IBW (calculated using Hamwi): ') + str(hamwiMale)
elif {var:gender} == 'Female':
print ('IBW (calculated using Hamwi): ') + str(hamwiFemale)