Python - Remove Decimal

Posted on
Mon Dec 30, 2019 8:46 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Python - Remove Decimal

Appreciate any help getting a script to remove a decimal from a variable.
It's executed on any change of the variable.
Been playing with this but getting nowhere.

Code: Select all
myVar = indigo.variables[103086076].getValue(int)
indigo.variable.updateValue(indigo.variables[103086076], value= myVar)


Thanks,

Carl

Posted on
Mon Dec 30, 2019 8:51 pm
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Python - Remove Decimal

Hi Carl - I just posted a short script on your other thread.

https://forums.indigodomo.com/viewtopic.php?f=267&t=23419#p186576

Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Dec 30, 2019 9:03 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Python - Remove Decimal

Perfect, thanks!

Carl

Posted on
Tue Dec 31, 2019 9:03 am
Umtauscher offline
User avatar
Posts: 566
Joined: Oct 03, 2014
Location: Cologne, Germany

Re: Python - Remove Decimal

.... or you could use the „adapters“ plugins „custom formula adapter“

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests

cron