Hints, tips and tricks for newbies
Moderators: Dorian (MJT support), JRL
-
ari
- Junior Coder
- Posts: 23
- Joined: Tue Jul 15, 2014 4:12 pm
Post
by ari » Tue Jul 15, 2014 4:30 pm
The overall goal is to copy a number to clipboard, then paste a phrase that varies based on the number that was copied
Code: Select all
GetClipBoard>feno,0
If>%feno% < 21
Let>results=The exhaled nitric oxide level was %feno% ppb, demonstrating a low level of eosinophilic airway inflammation.
If>{(%feno% >20) AND (%feno% < 35)}
Let>results=The exhaled nitric oxide level was %feno% ppb, demonstrating an intermediate level of eosinophilic airway inflammation.
If>%feno% > 34
Let>results=The exhaled nitric oxide level was %feno% ppb, demonstrating a high level of eosinophilic airway inflammation.
PutClipBoard>results
Endif
Endif
Endif
Thanks, btw love MacroScheduler, it saves me so much work!! Now I just waste the time I saved on MacroScheduler...
-
hagchr
- Automation Wizard
- Posts: 331
- Joined: Mon Jul 05, 2010 7:53 am
- Location: Stockholm, Sweden
Post
by hagchr » Tue Jul 15, 2014 6:30 pm
Hi, I moved the Endif statements (from the end) to the end to each If section, and removed some spaces.
GetClipBoard>feno,0
If>%feno%<21
Let>results=The exhaled nitric oxide level was %feno% ppb, demonstrating a low level of eosinophilic airway inflammation.
Endif
If>{(%feno%>20) AND (%feno%<35)}
Let>results=The exhaled nitric oxide level was %feno% ppb, demonstrating an intermediate level of eosinophilic airway inflammation.
Endif
If>%feno%>34
Let>results=The exhaled nitric oxide level was %feno% ppb, demonstrating a high level of eosinophilic airway inflammation.
Endif
PutClipBoard>results View Snippet Page
-
ari
- Junior Coder
- Posts: 23
- Joined: Tue Jul 15, 2014 4:12 pm
Post
by ari » Tue Jul 15, 2014 6:42 pm
perfect thanks! Glad I was at least close to the right script on my own.