Emailing variables from Captivate 2019 not working
I am trying to email a Captivate 2019 variable, "cpquizinfopointsscored". I have tried all the javascripts found in my searches, but none work. Here is my current script....
var email="setname@mycompany.edu"; var subject="Final Score";
var myscore=window.cpAPIInterface.getVariableValue("cpQuizInfopointsscored");
var body_start="Final Score:%20";
var body_end=myscore;
var mailto_link='mailto:'+email+'?subject='+subject+'&body='+body_start +body_end;
win=window.open(mailto_link,'emailWin');
This is in Advanced Actions. The user clicks on a Click Box to run the script and open an email ready to just hit send. I defined “myscore” as a user variable.
First off, no matter what script I run I get….

And the email does not open. I have tried various scripts, sometimes the email will pop up but the “myscore” is not populated, just say myscore. I’m not familiar with javascript so I just basically copied and pasted ones I have found and replaced with my info.
I use the cpquizinfopointsscored within the project and the score is correct. Another point is I have reporting turned off for this project since it is not on any LMS but a standalone.
What am I doing wrong?
