Applescript conversion needed

Posted on
Sun Dec 10, 2017 7:02 pm
CraigM offline
Posts: 578
Joined: Oct 28, 2007

Applescript conversion needed

Could some please show me how to convert this to Python
Code: Select all
set t to value of variable "TemporaryAuthCode"
set value of variable "TemporaryAuthCode" to t & "1"

Posted on
Sun Dec 10, 2017 9:58 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Applescript conversion needed

Code: Select all
t = indigo.variables[VARIDHERE].getValue(int)
indigo.variable.updateValue(VARIDHERE, value=str(t+1))

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Dec 11, 2017 11:30 am
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Applescript conversion needed

I may have misread your script. On first glance it looked like you were trying to increment a variable. However, your script is appending a "1" onto the end of the variable value. If that's what you want, then:

Code: Select all
t = indigo.variables[VARIDHERE].value
indigo.variable.updateValue(VARIDHERE, value=t + "1")

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Dec 11, 2017 1:06 pm
CraigM offline
Posts: 578
Joined: Oct 28, 2007

Re: Applescript conversion needed

jay (support) wrote:
I may have misread your script. On first glance it looked like you were trying to increment a variable. However, your script is appending a "1" onto the end of the variable value. If that's what you want, then:

Code: Select all
t = indigo.variables[VARIDHERE].value
indigo.variable.updateValue(VARIDHERE, value=t + "1")

Thanks Jay

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests