This week I'm beginning a series of articles that will take you through Captivate's System Variables, one group at a time. First up, Date variables, which are a subset of the System Information variables (variables that pull their information from the learner's computer when a Captivate lesson runs).
The table below lists the different date variables available in Captivate.
For this example, let's say that today's date is Sunday, November 17, 2002. If you need to build your own date string that showed only the month and the year (11/2002), you could simply insert a text caption like this:
If I were to use the System Variable cpInfoCurrentDay in a text caption, the learner would see the word "Sunday" on the slide if it's Sunday, "Friday" if it's Friday, and so on. But what if I want the learner to see the current day of the week in a specific format ("Sun" for Sunday; "Fri" for Friday, etc.)? Because there isn't a System Variable for that, I need to step in and create a user variable along with a little Advanced Action.
First I created a user variable called myDayOfTheWeek. (You can create a user variable via Project > Variables.) Then I created an Advanced Action named DayOfTheWeek.
In the image below, notice that I used the provided cpInfoCurrentDay System Variable in the If area of the Action and compared it to 1 using the is equal to comparison.
I used the myDayOfTheWeek user variable in the Actions area (shown above).
My Advanced Action contains seven Decision Blocks, one for each day of the week (some of the Decision Blocks are shown in the image above where you see blue word "Sunday").
Here's the recipe I used when I created each of those Decision Blocks.
I used the myDayOfTheWeek user variable in a text caption and that was that.
As far as I'm concerned, the most interesting date variable iscpInfoCurrentLocaleDateString. For my computer, it displays November 17, 2002. But for my friend's computer, the same lesson displays Sunday November 17, 2002. Curious as to why, I accessed my computer's time and date setting (Control Panel > Clock, Language, and Region > Change date, time, or number formats). My settings looked like this:
I changed my Long date to this:
... and my Captivate lesson displayed the date as Sunday, November 17, 2002.
See also: Adobe Captivate's System Time Variables
***
Recent Comments