View unanswered posts | View active topics It is currently Wed Jun 19, 2013 3:12 am



Reply to topic  [ 4 posts ] 
 Condition Statement Not Working? 
Author Message

Joined: Nov 07, 2003
Posts: 200
Post Condition Statement Not Working?
I have a Time/Date Action set with Condition set to "If variable DayofWeek" is "not equal to:" "wed". The variable DayofWeek shows "wed" in the Variable List. However, this action fires regardless. Am I being stupid (again)?


Wed Sep 06, 2006 5:55 pm
Profile
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 11814
Location: Texas
Post Re: Condition Statement Not Working?
Not sure exactly. I just tried it and it seems to work okay on my setup. Note that pressing the "Execute Actions" button in the main window *always* executes the actions regardless of the conditions defined. If that isn't it, then could it be a space or something in the condition panel edit field, or in the variable value?

Regards,
Matt


Wed Sep 06, 2006 6:00 pm
Profile WWW

Joined: Nov 07, 2003
Posts: 200
Post 
Matt -

Hmmm... I know about the "Execute Actions" thing - and I've been triggering this in the old school manner.

Ah! Turns out there _is_ an extra space in the variable - it's "wed " - extra space at the end. This is curious - it must be my misunderstanding of Applescript coding again. I am populating the DayofWeek variable using this embedded Applescript:
Code: Select all
tell application "IndigoServer"
    set value of variable "DayofWeek" to weekday of (current date)
end tell
That seems to set the variable to "wed ". I'll have to come up with a workaround...

Hans


Wed Sep 06, 2006 6:34 pm
Profile

Joined: Nov 07, 2003
Posts: 200
Post 
Update:

This code solved it:
Code: Select all
tell application "IndigoServer"
    set value of variable "DayofWeek" to weekday of (current date) as string
end tell

That puts "Wednesday" in the variable. Done.


Wed Sep 06, 2006 6:37 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: Google Feedfetcher and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.