Image Files - Dashboard/XPression

Hello,

I created a DashBoard that will pull in team logos based on the selected team using:

var league = params.getValueAsString(‘Select_HOME_League’, 0);

var team = params.getValueAsString(‘Select_HOME_Team’, 0);

var logopath = ‘bg-u:file:/D:/TEAM LOGOS/’+ league +‘/’+ team +‘/TEAM_LOGO_FULL.png’;

ogscript.setStyle(‘HOME_Logo’, logopath);

This was working great when the DashBoard, XPression and logo files all lived on the XPression computer. We’ve since moved the Dashboard to a separate computer (it’s connected and working correctly with XPression) but I can’t seem to figure out the new path. The ‘TEAM LOGOS’ folder is shared on the network and visible from the Dashboard computer. And I can open up the png files to view them. But the DashBoard won’t seem to load them. I assumed the new path would be some version of this:

‘bg-u:smb://169.254.109.199/TEAM LOGOS/’+ league +‘/’+ team +‘/TEAM_LOGO_FULL.png’

I’ve also tried using the computer name in place of the IP and used %20 in place of the spaces in the folders but haven’t had any luck.

Thanks

Hi Robert.

DashBoard does not recognize the SMB URL scheme. It can do HTTP fetches or file system fetches. Your easiest workaround would be to map your Samba share as a “Network Drive” on your computer and then use the file:/ URL scheme to access your images.

Another option would be to run a small web server on your remove computer to serve-up the directory with team logos.

James

#DashBoard

Update: SOLVED

Here is the new scripting:

var league = params.getValueAsString(‘Select_HOME_League’, 0);
var team = params.getValueAsString(‘Select_HOME_Team’, 0);
var xpath = params.getValueAsString(‘XPRESSION_PATH’, 0);
var logopath = ‘bg-u:file:/’ + xpath +‘/’+ league +‘/’+ team + ‘/TEAM_LOGO_FULL.png’;
ogscript.setStyle(‘HOME_Logo’, logopath);

I ended up creating ‘XPRESSION_PATH’ as a new parameter that is editable within the DashBoard. This allows me to easily map to the images on different setups once the network is mapped…

localhost - D:/TEAM LOGOS
Mac device - Volumes/TEAM LOGOS
PC device - Z:/ (the drive name I gave to the mapped “TEAM LOGOS” folder)

Thanks to James and Brandon for their help!

#DashBoard

Hey Robert,

I’m really new to scripting so I’m slowly making my way through Dashboard and creating some things to help. If I have a logo in Dashboard that I want to change based on a value from a Datalinq source is that similar to your logo scripting here? Say my datalinq value is USA, can I then pull that into a script where it’ll load a png image from the E drive - say E:/flags/usa.png - basically replacing the USA tricode with whatever value is in the Datalinq cell I’m pointing to? Hope that makes sense and thanks for any help