How to create a graphic element that moves each day?

Working with Text Files, Image Lists and more.
Post Reply
rdflesher
Valued Contributor
Valued Contributor
Posts: 25
Joined: Thu Dec 01, 2011 3:43 pm

How to create a graphic element that moves each day?

Post by rdflesher »

OK - our cafe wants to adverstise their weekly menu on screens around our site. Pulling the information from the spreasheet that populates the actual menu board is pretty straight foward but on this screen, I'd like to go one step further. I would like a box or underline (see picture, Monday & Tuesday for examples) that every day will "move" to the current day. So, Monday the box is around Monday's offering, Tuesday? It uncircles the Tuesday food. Both the line and the box are transparent .png files.

Image

What clever way do you have up your sleeve to accomplish this?
User avatar
Tim R
Noventri Digital Signage Expert
Noventri Digital Signage Expert
Posts: 18
Joined: Thu Dec 10, 2009 1:50 pm

Re: How to create a graphic element that moves each day?

Post by Tim R »

Hello rdflesher,

This can be achieved by using a fullscreen image region that uses the ODBC data source to tell us which png to use. Since your menu information is coming from a spreadsheet, I will assume excel, we can use that data source to tell us which day of the week it is. By using an "Advanced" SELECT statement (applying to excel) such as:

SELECT *, WEEKDAY(NOW()) AS Weekday FROM [TableNameHere$]
For other community users who are not familiar with data source connectivity see this post http://www.noventri.com/forum/viewtopic.php?f=6&t=225.

This statement will return all of the columns from your spreadsheet as well as a new column called "Weekday".

The "Weekday" column will be a number representing the day of the week. For example 1 would be Sunday, 2 would be Monday, 3 would be Tuesday, etc.

The way an image region makes use of the ODBC data source is by allowing the returned data to complete a portion of the file path to the image. Therefore, we will want to have a directory of images for each day of the week. For example:

Box1.png
Box2.png
Box3.png
Box4.png
Box5.png
Box6.png
Box7.png

Each image would be a full screen transparent png with the box/line in the appropriate location for the day of week.

Now we are ready to point our project to these images. Back in our image region with the previously mentioned advanced SELECT statement - Enter the image path to your directory of images for each day of the week with the database formatter in place of the number. For example:

C:\Images\Box[1:Weekday].png

Now you can press "Refresh Now" on the "Advanced" tab and you will see the box around the applicable day.

I hope this solves your goal, and please let us know if it does not or if you have any questions.
Tim Rollins
Executive Director of Technology
Noventri
20940 Twin Springs Dr.
Smithsburg, MD 21783-1510 USA
301-790-0103
Fax: 301-790-0173
http://www.noventri.com
rdflesher
Valued Contributor
Valued Contributor
Posts: 25
Joined: Thu Dec 01, 2011 3:43 pm

Re: How to create a graphic element that moves each day?

Post by rdflesher »

So the seven images are full screen with the Box or line moving around on the image to the respective day's information position? Not just the little box or line itself, huh?
Molly C
Noventri Digital Signage Expert
Noventri Digital Signage Expert
Posts: 5
Joined: Thu Dec 10, 2009 2:02 pm

Re: How to create a graphic element that moves each day?

Post by Molly C »

rdflesher wrote:So the seven images are full screen with the Box or line moving around on the image to the respective day's information position? Not just the little box or line itself, huh?
That is correct. The regions themselves will not move. One does not necessarily need to create a full screen image(s)/region(s). Instead one can use smaller images, and create regions directly over the area they want the image to appear. That would mean naming the images a bit differently.

Instead of Box1.png, Box2.png, etc.

One will have a region positioned over each day and images named:

MonBox2.png
TueBox3.png
WedBox4.png
ThuBox5.png
FriBox6.png

Each region formatter will look like this:

MonBox[1:1].png
TueBox[1:1].png
WedBox[1:1].png
ThuBox[1:1].png
FriBox[1:1].png

So the Monday box will only show up on Monday because of the number.

This example requires more regions but uses smaller images. It's the same idea though.

- Mike C
rdflesher
Valued Contributor
Valued Contributor
Posts: 25
Joined: Thu Dec 01, 2011 3:43 pm

Re: How to create a graphic element that moves each day?

Post by rdflesher »

I like this solution, too. Especially because it's easier to reposition the smaller images. Thanks a lot.
Post Reply