I need to change my applescript to Python before next version. I don't know Python, so I need help. Here below some of my applescripts. I would appreciate to have the translation of these example.
thanks a lot
Patrice
SCRIPT 1:
- Code: Select all
tell application "IndigoServer"
set VAR to value of variable "STATUTPORTAILOUVERT" as string
set theURL to "http://192.168.0.49/~patriceagnesmetairie1/logger7.php?" & "f=STATUTPORTAILOUVERT&v=" & VAR
do shell script "curl " & quoted form of theURL
end tell
SCRIPT 2:
- Code: Select all
tell application "IndigoServer"
-- calcul du vent total de la journée
set VITVENT to (value of variable "OREGONVITVENT") as real
set VENTOT to (value of variable "OREGONVENTTOT") as real
set VENTTOT to (VITVENT) / 100 + VENTOT
set value of variable "OREGONVENTTOT" to VENTTOT
end tell
SCRIPT 3:
- Code: Select all
tell application "IndigoServer"
set URLChromeResponse to do shell script "curl http://127.0.0.1/~patriceagnesmetairie1/FLIPRPH.php"
set VAR11 to URLChromeResponse
set URLChromeResponse to do shell script "curl http://127.0.0.1/~patriceagnesmetairie1/FLIPROXYDOREDUCTION.php"
set VAR22 to URLChromeResponse
set URLChromeResponse to do shell script "curl http://127.0.0.1/~patriceagnesmetairie1/FLIPRBATTERYLEVEL.php"
set VAR44 to URLChromeResponse
set value of variable "FLIPRPH" to VAR11
set value of variable "FLIPROXYDOREDUCTION" to VAR22
set value of variable "FLIPRBATTERYLEVEL" to VAR44
end tell
SCRIPT 4 :
- Code: Select all
set theURL to "http://192.168.0.49/~patriceagnesmetairie1/DOMOMETEOdelete5jours.php"
do shell script "curl " & quoted form of theURL
SCRIPT 5 :
- Code: Select all
tell application "IndigoServer"
set TEMPOREGONEXT to (value of variable "ZWAVETEMPOREGONEXTERIEURAVANTCORRECTION") as real
set TEMPOREGONEXT to TEMPOREGONEXT - 0
set value of variable "ZWAVETEMPOREGONEXTERIEUR" to TEMPOREGONEXT
set VARPISSANS to (value of variable "ZWAVETEMPPISCSANSCORRECT") as real
set VARPIS2 to (value of variable "ZWAVETEMPPIS2") as real
if VARPISSANS < VARPIS2 * 2 and VARPISSANS > VARPIS2 * 0.5 then
set value of variable "ZWAVETEMPPIS2" to VARPISSANS
end if
set VARTHEOSANS to (value of variable "ZWAVETEMPTHEOSANSCORRECT") as real
set VARTHEO to (value of variable "ZWAVETEMPTHEO") as real
if VARTHEOSANS < VARTHEO * 1.2 and VARTHEOSANS > VARTHEO * 0.8 then
set value of variable "ZWAVETEMPTHEO" to VARTHEOSANS
end if
set VARCELIASANS to (value of variable "ZWAVETEMPCELIASANSCORRECT") as real
set VARCELIA to (value of variable "ZWAVETEMPCELIA") as real
if VARCELIASANS < VARCELIA * 1.2 and VARCELIASANS > VARCELIA * 0.8 then
set value of variable "ZWAVETEMPCELIA" to VARCELIASANS
end if
end tell
SCRIPT 6 :
- Code: Select all
tell application "IndigoServer"
set VAR111 to (value of variable "ZWAVECONSIGNETHERMOSTATSMARTPAC") as real
set VAR222 to VAR111 + 0.1
set value of variable "ZWAVECONSIGNETHERMOSTATSMARTPAC" to VAR222
end tell
SCRIPT 7 :
- Code: Select all
tell application "IndigoServer"
set URLChromeResponse to do shell script "curl http://127.0.0.1/~patriceagnesmetairie1/ACTIVERMODEALARMEAWAY.php"
end tell