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

Posted on
Sat Dec 09, 2006 6:48 pm
BobRoss offline
Posts: 101
Joined: Jan 15, 2006
Location: Arizona

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

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.

Posted on
Sun Dec 10, 2006 1:23 am
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: How to email a variable....

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

Posted on
Sun Dec 10, 2006 9:52 am
BobRoss offline
Posts: 101
Joined: Jan 15, 2006
Location: Arizona

Re: How to email a variable....

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 :-)

Posted on
Sun Dec 10, 2006 1:27 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: How to email a variable....

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

Posted on
Sun Dec 10, 2006 2:02 pm
BobRoss offline
Posts: 101
Joined: Jan 15, 2006
Location: Arizona

(No subject)

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

Posted on
Tue Dec 12, 2006 9:31 am
Tmaxx offline
Posts: 80
Joined: Jul 15, 2005

(No subject)

This is a great find !

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

Thanks,

Denny

Posted on
Tue Aug 04, 2009 1:05 pm
hwilke01 offline
Posts: 13
Joined: Jun 06, 2009

(No subject)

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.

Posted on
Wed Aug 05, 2009 7:00 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

(No subject)

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

Image

Posted on
Sun Jun 17, 2012 10:58 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: How to email a variable....

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

Posted on
Sun May 24, 2015 6:47 am
CraftGeek offline
User avatar
Posts: 107
Joined: May 13, 2015

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

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?

Sean

Posted on
Sun May 24, 2015 11:32 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

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

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.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Mar 06, 2017 2:18 am
haakon offline
User avatar
Posts: 45
Joined: Mar 02, 2017

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

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

Posted on
Mon Mar 06, 2017 4:27 am
Professor Falken offline
User avatar
Posts: 289
Joined: Mar 29, 2015

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

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.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest