Page 1 of 1

[SOLVED]How to email a variable....

PostPosted: Sat Dec 09, 2006 6:48 pm
by BobRoss
Hello All

I have used Insteon to send mail and do things when receiving mail.

I have created a variable that increments on an action.

So here is the question, how at a specific time can I email myself the contents of the variable?


Thanks
Bob

Loading up version 2 tonight - to give it a try.

Re: How to email a variable....

PostPosted: Sun Dec 10, 2006 1:23 am
by matt (support)
Hi Bob,

Create a Time/Date Action for when you want the email sent. On the action panel choose the Execute AppleScript type and in the embedded field put something like this:

Code: Select all
set messageText to value of variable "myCounterVariableNameHere"
send email to "my-phone@foobar.com" with subject "Variable Value" with body messageText

Regards,
Matt

Re: How to email a variable....

PostPosted: Sun Dec 10, 2006 9:52 am
by BobRoss
support wrote:
Hi Bob,

Create a Time/Date Action for when you want the email sent. On the action panel choose the Execute AppleScript type and in the embedded field put something like this:

Code: Select all
set messageText to value of variable "myCounterVariableNameHere"
send email to "my-phone@foobar.com" with subject "Variable Value" with body messageText

Regards,
Matt


Hi Matt

In 2.0 that works!! Now the bad news I think - I can't seem to get the TempLinc script to work in 2.0 - before I trouble shoot my self to death is that true??

The variable I was trying to send was the Temp :-)

Re: How to email a variable....

PostPosted: Sun Dec 10, 2006 1:27 pm
by matt (support)
The TempLinc script should work, but note there a new version of it in:

/Library/Application Support/Perceptive Automation/Indigo 2/Scripts/Attachments (Disabled)/

You should move that script up and over to the enabled Attachments folder and define the variable name and house code you are using at the top. Do not try to use the Indigo 1.8 TempLinc script.

Regards,
Matt

PostPosted: Sun Dec 10, 2006 2:02 pm
by BobRoss
Duh!!!!!

Never thought to look in the disabled folder - I used the ver 1.8 -

Yes it works great now

Ver 2.0 - is VERY COOL

Bob

PostPosted: Tue Dec 12, 2006 9:31 am
by Tmaxx
This is a great find !

That script should be put in the script section for us newbs !

Thanks,

Denny

PostPosted: Tue Aug 04, 2009 1:05 pm
by hwilke01
Aloha!

I've been using a Time/Date action to send me an email based on when sunrise is each day. Thinking about it, I've been considering the possibility of having additional variables added to this email something like this:

Today's forecast high temperature is: (Variable)

Sunset will be at: (Variable)

Local top stories are: (RSS?)

National top stories are: (RSS?)

I'm guessing this would require an insert of some sort of RSS feed? Is there a way to create an Apple Script to take like the first few lines of a news feed and then convert it into a variable and/or cut and paste into an email like this? I'm new at this, so I have no idea if this is even an easy or hard question. Many thanks in advance.

Hal W.

PostPosted: Wed Aug 05, 2009 7:00 pm
by matt (support)
Off the top of my head I'm not sure about the RSS part (although I'm sure it is possible), but here is an example for the sunset:
Code: Select all
set emailBody to "Sunset will be at " & (calculate sunset)
send email to "foo@foo.com" with subject "hello" with body emailBody

Re: How to email a variable....

PostPosted: Sun Jun 17, 2012 10:58 pm
by ckeyes888
Would really like to get the top news headlines into some variables to have spoken
each morning. Anyone done or have any info on that?

Thanks,

Carl

Re: [SOLVED?] How to email a variable....

PostPosted: Sun May 24, 2015 6:47 am
by CraftGeek
In version 6 of Indigo, can we insert a variable or device state directly into the GUI email form? Or do we still need to code it ourselves?

If we still need to do our own coding, where can a non coder turn to for all the info they need to create emails? Is there a document that lists all possible syntax that applies to an Indigo 6 email?

Re: [SOLVED?] How to email a variable....

PostPosted: Sun May 24, 2015 11:32 am
by jay (support)
CraftGeek wrote:
In version 6 of Indigo, can we insert a variable or device state directly into the GUI email form? Or do we still need to code it ourselves?


Unfortunately, no. It's on our list to address, hopefully in the next major release.

CraftGeek wrote:
If we still need to do our own coding, where can a non coder turn to for all the info they need to create emails? Is there a document that lists all possible syntax that applies to an Indigo 6 email?


The IOM docs document the sendEmailTo command.

Re: [SOLVED]How to email a variable....

PostPosted: Mon Mar 06, 2017 2:18 am
by haakon
Hi, is this possible in Indigo 7?

If so, how should the variable be entered?

I am new to Indigo, so please excuse me if this is common knowledge.



Haakon

Re: [SOLVED]How to email a variable....

PostPosted: Mon Mar 06, 2017 4:27 am
by Professor Falken
Probably the easiest way is to use the Better Email plugin. Install the plugin, then follow the instructions for creating an outgoing email device. Now a Better Email action list will appear in your possible actions.

The instructions for inserting a variable or device state are at the bottom of the pop-up in which you compose your email, but basically you offset the desired insertion with %%.

Hope this helps.