Friday, January 28, 2022

#1 2022-01-12 02:06:06 pm

Fredrik71
Member
Registered: 2019-10-23
Posts: 929

XTension for Home Automation

Maybe this is a old news but XTension from the link below have some AppleScript Terminology that
maybe are useful for people who like to do something special. The demo version do not limit a
user to script with AppleScript.

http://www.machomeautomation.com/doku.php/index

Here is a simple example from the Suite.

Applescript:

if (true as integer) is (its bitwiseAND:{1, 1}) then display dialog "Arithmetic operations Bitwise (AND) = true"

on bitwiseAND:integerList
   tell application "XTension"
       return bitwiseAND integerList as list
   end tell
end bitwiseAND:

if (true as integer) is (its bitwiseOR:{0, 1}) then display dialog "Arithmetic operations Bitwise (OR) = true"

on bitwiseOR:integerList
   tell application "XTension"
       return bitwiseOR integerList as list
   end tell
end bitwiseOR:

if (true as integer) is (its bitwiseXOR:{1, 0}) then display dialog "Arithmetic operations Bitwise (XOR) = true"

on bitwiseXOR:integerList
   tell application "XTension"
       return bitwiseXOR integerList as list
   end tell
end bitwiseXOR:

on hexWithNumber:theNumber
   tell application "XTension"
       return number to hex theNumber as integer
   end tell
end hexWithNumber:


if you are the expert, who will you call if its not your imagination.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)