Articulate Storyline 2: Using JavaScript

preview_player
Показать описание
In this screencast, I'll show you how to use some JavaScript code to display the system date from your computer and show it on a slide.

This was the code that I used:
var currentTime = new Date()
var dateString=month + "/" + day + "/" + year
var player = GetPlayer();
player.SetVar("SystemDate",dateString);

Рекомендации по теме
Комментарии
Автор

Thanks Matt! This was very helpful.

In scenarios etc, this method looks like a good way to add today's date to things like mock emails or direct messages, to make the course content seem more real.

(And in recent versions of Storyline, it seems you can now preview simple JavaScript, rather than having to publish your content. Yay!)

RemotePossibilities
Автор

Matthew, thank you so much for this tutorial. I'm not experienced in writing code, would you share this with me please?

Thanks,
June

juneganes
Автор

var currentTime = new Date();
var mon = currentTime.getMonth()+1;
var days = currentTime.getDate();
vary years = currentTime.getFullYear();
var dateString = mon + '/' + days + '/' + years;
vary players = GetPlayer();
players.SetVar("SystemDate", dateString);

vishalsaxen
Автор

Como se hace para que también se vea la hora?

IAconJimmyRosales
Автор

Never mind Matthew I found in in show more. Sorry

June

juneganes
welcome to shbcf.ru