GuideMe (TeaseMe v2.0) - Current Build 0.4.4

Webteases are great, but what if you're in the mood for a slightly more immersive experience? Chat about Tease AI and other offline tease software.

Moderator: 1885

User avatar
PlayfulGuy
Explorer At Heart
Explorer At Heart
Posts: 778
Joined: Sat Jul 07, 2012 10:08 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): No domme
Sub/Slave(s): No sub
Location: British Columbia, Canada

Re: Changes in Guideme 3.1

Post by PlayfulGuy »

philo wrote: Sat May 13, 2017 2:50 pm
PlayfulGuy wrote: Mon May 08, 2017 2:25 pm The real issue was the "scope" change, and you've confirmed that this is my problem. I will have to spend a bunch of time reviewing my code now. In many cases I was relying on the old behaviour. I did not realize that the persistence of variables was unintended. I was using it as a feature. I should have asked. I had noted a couple times that something was working that I thought shouldn't be, but just accepted it since it was working in my favour.

Thanks

PG
Have made a change which makes Global Java Script run in it's own scope which will persist between calls.
Hopefully this will resolve some of the issues, if you want help debugging or coming up with alternate ways of coding the issues I am happy to help.
Is there something different about javascript objects? In my script engine the currently running script and some settings and such are stored in an object with named elements. This is saved in a scriptVar, but the contents of the object are no longer being saved in the state file, but other scriptvars are saved properly. This means I can't close Guideme and then come back later and pick up a tease where I left off.

I tried 3.2 but it doesn't work at all on my machine as noted above.

I'll review my code and make sure I'm saving it properly everywhere - maybe I've missed something.

PG
philo
Explorer At Heart
Explorer At Heart
Posts: 831
Joined: Sun Jan 08, 2012 3:10 pm
Gender: Male
Sexual Orientation: Straight
Location: UK

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by philo »

The guideme jar is the same for 32 and 64bit.
The differences are the java engine, swt (which handles the operating system stuff) and vlc (video).
All three of those need to be 32 or 64bit everything else is the same.

Will make sure both are working on my machine and then publish a full release to see if that fixes it.
philo
Explorer At Heart
Explorer At Heart
Posts: 831
Joined: Sun Jan 08, 2012 3:10 pm
Gender: Male
Sexual Orientation: Straight
Location: UK

Re: Changes in Guideme 3.1

Post by philo »

PlayfulGuy wrote: Sat May 13, 2017 8:40 pm
philo wrote: Sat May 13, 2017 2:50 pm
PlayfulGuy wrote: Mon May 08, 2017 2:25 pm The real issue was the "scope" change, and you've confirmed that this is my problem. I will have to spend a bunch of time reviewing my code now. In many cases I was relying on the old behaviour. I did not realize that the persistence of variables was unintended. I was using it as a feature. I should have asked. I had noted a couple times that something was working that I thought shouldn't be, but just accepted it since it was working in my favour.

Thanks

PG
Have made a change which makes Global Java Script run in it's own scope which will persist between calls.
Hopefully this will resolve some of the issues, if you want help debugging or coming up with alternate ways of coding the issues I am happy to help.
Is there something different about javascript objects? In my script engine the currently running script and some settings and such are stored in an object with named elements. This is saved in a scriptVar, but the contents of the object are no longer being saved in the state file, but other scriptvars are saved properly. This means I can't close Guideme and then come back later and pick up a tease where I left off.

I tried 3.2 but it doesn't work at all on my machine as noted above.

I'll review my code and make sure I'm saving it properly everywhere - maybe I've missed something.

PG
If you want to point me at the version of your script engine and what isn't working I will have a look what is going on.
There was a change to how rhino converts between javascript and java variables that I had to make to fix a bug.
Getting it to save and retrieve state is probably the most complex bit of guideme at the moment.
I haven't tested saving and retrieving objects much.
There could have been a bug introduced in the changes
philo
Explorer At Heart
Explorer At Heart
Posts: 831
Joined: Sun Jan 08, 2012 3:10 pm
Gender: Male
Sexual Orientation: Straight
Location: UK

Re: V0.3.2

Post by philo »

d3vi0n wrote: Sat May 13, 2017 7:11 pm
philo wrote: Sat May 13, 2017 2:45 pm Just the jar file so you will need 0.3.1 for the full install

https://mega.nz/#!NcIBhZYK!PEoUjqH76iSC ... z7VZPPqxn8
v0.3.2 doesn't work for me... nothing happens when i try to start it (using start.bat) :huh:

oops I added the ability to create and unpack teases as zip files.
It needs an extra jar file in GuideMe_lib
https://mega.nz/#!5ZBx3BJQ!ZM1TdjONYrK5 ... mXTJyh-vOI

(guideme jar file link just to keep them together)
https://mega.nz/#!NcIBhZYK!PEoUjqH76iSC ... z7VZPPqxn8


The zip file is password protected by a hard coded password in GuideMe.
The unzip option within GuideMe automatically provides the password to unzip it.
User avatar
PlayfulGuy
Explorer At Heart
Explorer At Heart
Posts: 778
Joined: Sat Jul 07, 2012 10:08 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): No domme
Sub/Slave(s): No sub
Location: British Columbia, Canada

Re: Changes in Guideme 3.1

Post by PlayfulGuy »

philo wrote: Sun May 14, 2017 8:02 am
If you want to point me at the version of your script engine and what isn't working I will have a look what is going on.
There was a change to how rhino converts between javascript and java variables that I had to make to fix a bug.
Getting it to save and retrieve state is probably the most complex bit of guideme at the moment.
I haven't tested saving and retrieving objects much.
There could have been a bug introduced in the changes
I'm testing my new version that I haven't published yet. Will try and put a package together and upload it for you.

Meanwhile, I downloaded the extra jar file and tried version 3.2 again. Guideme loads now, but something else is broken.

See spoiler below around time stamp 2017-05-14 09:41:36,657. I've highlighted the errors and added notes. When the button is clicked the GetScript() function runs and outputs a message using jscriptLog(), then calls the loadScript()function which fails with message "jscriptLog is not defined". The target page (ShowScriptPage) then tries to load but the pageload() function fails with "scriptVars is not defined".
It's like it's cleared all the Guideme functions too. Very puzzled.

This all works properly in Guideme 3.1.

PG
Spoiler: show
2017-05-14 09:40:51,605 INFO Jscript - Chapter: default
2017-05-14 09:40:51,606 INFO Jscript - Page: GuidemeScripts
2017-05-14 09:40:51,606 INFO Jscript - javaFunction: pageLoad
2017-05-14 09:40:51,606 INFO Jscript - pageloading: true
2017-05-14 09:40:51,607 INFO Jscript - javaScriptText:

function pageLoad() {
var scriptFiles = [];
jscriptLog("GuidemeScripts:pageload() starting...");
var scriptFolder = scriptVars.get("ScriptFolder");
if ( scriptFolder == undefined ) scriptFolder = "Scripts/" ;
else scriptFolder = scriptFolder + "/";
if ( comonFunctions.directoryExists(scriptFolder) == false ) {
jscriptLog("GuidemeScripts: Script folder " + scriptFolder + " not found. Defaulting to media folder.");
scriptFolder = ""; // Just use the media folder instead of generating an error.
}
jscriptLog("GuidemeScripts: Using script folder \"" + scriptFolder + "\"");

jscriptLog("GuidemeScripts: Loading list of available scripts.");

// Get the list of files in the scripts folder
files = comonFunctions.ListFiles(scriptFolder);
filesArray = files.split(",");

// Filter out only *.scr files
jscriptLog("Files found " + filesArray.length);

var i = 0;
for(var i=filesArray.length-1;i>=0;i--) {
if ( filesArray.search(/\.[Ss][Cc][Rr]$/) != -1 ) {
// file has a .scr extension so keep it, but remove
// the extension for display purposes
// scriptFiles[scriptFiles.length] = filesArray.substr(0,filesArray.length()-4);
try { // For GuideMe 1.0 to 1.5
scriptFiles[scriptFiles.length] = filesArray.substr(0,filesArray.length()-4);
}
catch(err) { // For GuideMe 3.1 and up
scriptFiles[scriptFiles.length] = filesArray.substr(0,filesArray.length-4);
}
jscriptLog("Found " + scriptFiles[scriptFiles.length-1]);
}
}
jscriptLog("Scripts found " + scriptFiles.length);

if (scriptFiles.length == 0) {
rightHtml = "No scripts found";
}
else {
scriptFiles.sort(); // Sort the list alphabetically
// What was the last script selected?
lastSelected = scriptVars.get("lastScriptSelected");
if ( lastSelected == undefined || lastSelected == "" ) lastSelected = "Tutorial";
var rightHtml = "Select a script file<br /><br />";
rightHtml += "<form>\n";
rightHtml += "<select name=\"ScriptFile\" size=\"15\" style=\"width: 50%;\">\n";
for (var i = 0; i < scriptFiles.length; i++) {
rightHtml += "<option value=\"" + scriptFiles + "\"";
if ( scriptFiles == lastSelected ) rightHtml += " selected>";
else rightHtml += ">";
rightHtml += scriptFiles + "</option>";
}
rightHtml += "</select>\n";
rightHtml+="</form>\n";
}

// Add an exit button??
var exitButton = scriptVars.get("ExitButton"); // The value of the variable is the target page
if ( exitButton != undefined ) overRide.addButton(exitButton,"Exit","","","", "");
// }
overRide.setHtml(rightHtml);

}
// ---------------------------------------------------------------------
function GetScript() {
var scriptFile = guideSettings.getFormField("ScriptFile");
if ( scriptFile != "" ) {
scriptVars.put("lastScriptSelected", scriptFile);
var scriptFolder = scriptVars.get("ScriptFolder");

if ( scriptFolder == undefined ) scriptFolder = "Scripts/" ;
else scriptFolder = scriptFolder + "/";
if ( comonFunctions.directoryExists(scriptFolder) == false ) {
scriptFolder = ""; // Just use the media folder instead of generating an error.
}

scriptFile = scriptFolder + scriptFile + ".scr"; // Add the folder spec and extension back
jscriptLog("Loading " + scriptFile);
loadScript(scriptFile);
}
}


2017-05-14 09:40:51,607 INFO Jscript - Starting ScriptVariables: {ImageFolder=Models/Sarah}
2017-05-14 09:40:51,608 INFO Jscript - Starting Flags {}
2017-05-14 09:40:51,609 INFO Jscript - GuidemeScripts:pageload() starting...
2017-05-14 09:40:51,612 INFO Jscript - GuidemeScripts: Using script folder "Scripts/"
2017-05-14 09:40:51,615 INFO Jscript - GuidemeScripts: Loading list of available scripts.
2017-05-14 09:40:51,617 INFO Jscript - Files found 23
2017-05-14 09:40:51,618 INFO Jscript - Found Tutorial
2017-05-14 09:40:51,620 INFO Jscript - Found Testing
2017-05-14 09:40:51,621 INFO Jscript - Found StrokingOnly
2017-05-14 09:40:51,623 INFO Jscript - Found StrokingAndEdging
2017-05-14 09:40:51,624 INFO Jscript - Found StrokeAWhile
2017-05-14 09:40:51,625 INFO Jscript - Found Stroke By The Cards
2017-05-14 09:40:51,627 INFO Jscript - Found SlideShows
2017-05-14 09:40:51,628 INFO Jscript - Found Script Engine Functions
2017-05-14 09:40:51,630 INFO Jscript - Found SarasTease
2017-05-14 09:40:51,632 INFO Jscript - Found Reset Script Engine
2017-05-14 09:40:51,634 INFO Jscript - Found Quick Test
2017-05-14 09:40:51,636 INFO Jscript - Found New in v1.5
2017-05-14 09:40:51,638 INFO Jscript - Found New in v1.4
2017-05-14 09:40:51,640 INFO Jscript - Found MetronomeStroking
2017-05-14 09:40:51,642 INFO Jscript - Found JOIVideo
2017-05-14 09:40:51,656 INFO Jscript - Found Include Demo
2017-05-14 09:40:51,658 INFO Jscript - Found DoSomeEdges
2017-05-14 09:40:51,660 INFO Jscript - Found DenialCardGameOptions
2017-05-14 09:40:51,662 INFO Jscript - Found DenialCardGame
2017-05-14 09:40:51,665 INFO Jscript - Found Builtin Pages
2017-05-14 09:40:51,668 INFO Jscript - Found bobhill
2017-05-14 09:40:51,670 INFO Jscript - Scripts found 21
2017-05-14 09:40:51,673 INFO Jscript - Ending ScriptVariables: {ImageFolder=Models/Sarah}
2017-05-14 09:40:51,674 INFO Jscript - Ending Flags {}
2017-05-14 09:41:36,655 INFO Jscript - Chapter: default
2017-05-14 09:41:36,656 INFO Jscript - Page: GuidemeScripts
2017-05-14 09:41:36,656 INFO Jscript - javaFunction: GetScript()
2017-05-14 09:41:36,656 INFO Jscript - pageloading: false
2017-05-14 09:41:36,657 INFO Jscript - javaScriptText:

function pageLoad() {
var scriptFiles = [];
jscriptLog("GuidemeScripts:pageload() starting...");
var scriptFolder = scriptVars.get("ScriptFolder");
if ( scriptFolder == undefined ) scriptFolder = "Scripts/" ;
else scriptFolder = scriptFolder + "/";
if ( comonFunctions.directoryExists(scriptFolder) == false ) {
jscriptLog("GuidemeScripts: Script folder " + scriptFolder + " not found. Defaulting to media folder.");
scriptFolder = ""; // Just use the media folder instead of generating an error.
}
jscriptLog("GuidemeScripts: Using script folder \"" + scriptFolder + "\"");

jscriptLog("GuidemeScripts: Loading list of available scripts.");

// Get the list of files in the scripts folder
files = comonFunctions.ListFiles(scriptFolder);
filesArray = files.split(",");

// Filter out only *.scr files
jscriptLog("Files found " + filesArray.length);

var i = 0;
for(var i=filesArray.length-1;i>=0;i--) {
if ( filesArray[i].search(/\.[Ss][Cc][Rr]$/) != -1 ) {
// file has a .scr extension so keep it, but remove
// the extension for display purposes
// scriptFiles[scriptFiles.length] = filesArray[i].substr(0,filesArray[i].length()-4);
try { // For GuideMe 1.0 to 1.5
scriptFiles[scriptFiles.length] = filesArray[i].substr(0,filesArray[i].length()-4);
}
catch(err) { // For GuideMe 3.1 and up
scriptFiles[scriptFiles.length] = filesArray[i].substr(0,filesArray[i].length-4);
}
jscriptLog("Found " + scriptFiles[scriptFiles.length-1]);
}
}
jscriptLog("Scripts found " + scriptFiles.length);

if (scriptFiles.length == 0) {
rightHtml = "No scripts found";
}
else {
scriptFiles.sort(); // Sort the list alphabetically
// What was the last script selected?
lastSelected = scriptVars.get("lastScriptSelected");
if ( lastSelected == undefined || lastSelected == "" ) lastSelected = "Tutorial";
var rightHtml = "Select a script file<br /><br />";
rightHtml += "<form>\n";
rightHtml += "<select name=\"ScriptFile\" size=\"15\" style=\"width: 50%;\">\n";
for (var i = 0; i < scriptFiles.length; i++) {
rightHtml += "<option value=\"" + scriptFiles[i] + "\"";
if ( scriptFiles[i] == lastSelected ) rightHtml += " selected>";
else rightHtml += ">";
rightHtml += scriptFiles[i] + "</option>";
}
rightHtml += "</select>\n";
rightHtml+="</form>\n";
}

// Add an exit button??
var exitButton = scriptVars.get("ExitButton"); // The value of the variable is the target page
if ( exitButton != undefined ) overRide.addButton(exitButton,"Exit","","","", "");
// }
overRide.setHtml(rightHtml);

}
// ---------------------------------------------------------------------
function GetScript() {
var scriptFile = guideSettings.getFormField("ScriptFile");
if ( scriptFile != "" ) {
scriptVars.put("lastScriptSelected", scriptFile);
var scriptFolder = scriptVars.get("ScriptFolder");

if ( scriptFolder == undefined ) scriptFolder = "Scripts/" ;
else scriptFolder = scriptFolder + "/";
if ( comonFunctions.directoryExists(scriptFolder) == false ) {
scriptFolder = ""; // Just use the media folder instead of generating an error.
}

scriptFile = scriptFolder + scriptFile + ".scr"; // Add the folder spec and extension back
jscriptLog("Loading " + scriptFile);
loadScript(scriptFile);
}
}


2017-05-14 09:41:36,657 INFO Jscript - Starting ScriptVariables: {ImageFolder=Models/Sarah, ScriptFile=Tutorial}
2017-05-14 09:41:36,658 INFO Jscript - Starting Flags {}
2017-05-14 09:41:36,736 INFO Jscript - Loading Scripts/Tutorial.scr // This comes from the GetScript function so jscriptLog works here
2017-05-14 09:41:36,743 ERROR Jscript - FileRunScript ReferenceError: "jscriptLog" is not defined. (script#140) // This comes from the loadScript() function - WTF?
org.mozilla.javascript.EcmaError: ReferenceError: "jscriptLog" is not defined. (script#140)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3951)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3929)
at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:4019)
at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1917)
at org.mozilla.javascript.ScriptRuntime.getNameFunctionAndThis(ScriptRuntime.java:2326)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1313)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3282)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:107)
at org.guideme.guideme.scripting.Jscript.run(Jscript.java:197)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
2017-05-14 09:41:36,748 INFO Jscript - Ending ScriptVariables: {lastScriptSelected=Tutorial, ImageFolder=Models/Sarah, ScriptFile=Tutorial}
2017-05-14 09:41:36,748 INFO Jscript - Ending Flags {}
2017-05-14 09:41:38,120 INFO Jscript - Chapter: default
2017-05-14 09:41:38,120 INFO Jscript - Page: ShowScriptPage
2017-05-14 09:41:38,120 INFO Jscript - javaFunction: pageLoad
2017-05-14 09:41:38,121 INFO Jscript - pageloading: true
2017-05-14 09:41:38,121 INFO Jscript - javaScriptText:

function pageLoad() {
jscriptLog("ShowScriptPage: starting...");
var jScript;
var page;
var temp;
var scriptStack;
var scriptData;

if ( guideSettings.getCurrPage() != guideSettings.getPrevPage() ) {
page = getNextPage(); // Get the next page to be displayed
}
else {
page = scriptVars.get("scriptData"); // Just reload the last page
}
if ( page == undefined ) { // This can happen if a runtime error is detected in the script
overRide.setPage("runScript"); // Go back to run the error handling
return;
}
jscriptLog("ShowScriptPage: Current index is " + page.index);
jscriptLog("ShowScriptPage: Page is " + page);

// Check for a gotoPage command
if ( page.hasOwnProperty("GotoPage") && page.GotoPage == true ) {
jscriptLog("ShowScriptPage: Going to page " + page.text);
overRide.setPage(page.text);
return; // And go to it.
}

// Check for an Exit command (exit the script)
if ( page.text == "exit" ) {
// Save the onScriptExit property of the script that is exiting.
temp = scriptVars.get("onScriptExit");

// If a scriptDataStack object exists and is nonzero length
// then restore the previous script
scriptStack = scriptVars.get("scriptDataStack");
if ( scriptStack != undefined && scriptStack.length > 0 ) {
jscriptLog("ShowScriptPage: Exiting to previous script..." );
// Delete the scriptData object of the script that's exiting
scriptVars.remove("scriptData");

// Pop the next object from the stack and save it as scriptData
// Restore the scriptVars ImageFolder, AudioFolder, VideoFolder and onScriptExit
scriptData = scriptStack.pop();

if ( scriptData.ImageFolder != "" ) scriptVars.put("ImageFolder", scriptData.ImageFolder);
else scriptVars.remove("ImageFolder");

if ( scriptData.AudioFolder != "" ) scriptVars.put("AudioFolder", scriptData.AudioFolder);
else scriptVars.remove("AudioFolder");

if ( scriptData.VideoFolder != "" ) scriptVars.put("VideoFolder", scriptData.VideoFolder);
else scriptVars.remove("VideoFolder");

if ( scriptData.ScriptFolder != "" ) scriptVars.put("ScriptFolder", scriptData.ScriptFolder);
else scriptVars.remove("ScriptFolder");

if ( scriptData.onScriptExit != "" ) scriptVars.put("onScriptExit", scriptData.onScriptExit);
else scriptVars.remove("onScriptExit");

// Restore critical flags
if ( scriptData.TextOnLeft == true ) comonFunctions.SetFlags("TextOnLeft", guide.getFlags());
else comonFunctions.UnsetFlags("TextOnLeft", guide.getFlags());

if ( scriptData.CardGameLayout1 == true ) comonFunctions.SetFlags("CardGameLayout1", guide.getFlags());
else comonFunctions.UnsetFlags("CardGameLayout1", guide.getFlags());

if ( scriptData.KeepDelays == true ) comonFunctions.SetFlags("KeepDelays", guide.getFlags());
else comonFunctions.UnsetFlags("KeepDelays", guide.getFlags());

if ( scriptData.KeepMetronomes == true ) comonFunctions.SetFlags("KeepMetronomes", guide.getFlags());
else comonFunctions.UnsetFlags("KeepMetronomes", guide.getFlags());

if ( scriptData.dontReplaceTags == true ) comonFunctions.SetFlags("dontReplaceTags", guide.getFlags());
else comonFunctions.UnsetFlags("dontReplaceTags", guide.getFlags());

// Restore the saved data
scriptVars.put("scriptData",scriptData);

if ( temp == undefined || temp == "" ) {
// There was no onScriptExit defined so just continue the previous script
temp = "runScript";
}
}
else {
// We're exiting the last (or only) script so clean up and restore key variables
jscriptLog("ShowScriptPage: Exiting ...." );

if ( page.ImageFolder != "" ) scriptVars.put("ImageFolder", page.ImageFolder);
else scriptVars.remove("ImageFolder");

if ( page.AudioFolder != "" ) scriptVars.put("AudioFolder", page.AudioFolder);
else scriptVars.remove("AudioFolder");

if ( page.VideoFolder != "" ) scriptVars.put("VideoFolder", page.VideoFolder);
else scriptVars.remove("VideoFolder");

scriptVars.remove("onScriptExit");
scriptVars.remove("scriptDataStack");

// Delete the scriptData object of the script that's exiting
scriptVars.remove("scriptData");
}

// If temp is still null then there was no onScriptExit variable defined
// and we are not exiting back to a previous script, so we are finished
// all scripts
if ( temp == undefined || temp == "" ) {
temp = "GuidemeScripts"; // Default to GuidemeScripts but log a message
jscriptLog("ShowScriptPage: Exiting... onScriptExit not set so defaulting to " + temp);
}

overRide.setPage(temp);
return; // And go do it.
}

// Okay. We're not exiting or going to some other page so we must have
// a page of our own to display. So display it. What are you waiting for!
if ( page.text == undefined ) { // Display an error page
overRide.addButton( "GuidemeScripts", "OK", "", "", "", "");
overRide.setHtml("A fatal script error occured. See the jscript log file for clues.");
overRide.setImage("Common/Oops.png");
}
else {
// First add any global buttons defined
// jscriptLog("ShowScriptPage: page.globalButtons.length=" + page.globalButtons.length);
// for (var i=0;i<page.globalButtons.length;i++) { // For when guideme gets fixed and puts them the way we said them
for (var i=page.globalButtons.length-1;i>=0;i--) { // Because guideme puts them backwards
// jScript = "onButtonClick(" + page.globalButtons[i][0] + ", " + page.globalButtons[i][1] + ")";
jScript = "globalButtonClick(" + i + ")"; // Modified Dec 2016 to support commands that contain commas like "set option1,option2" to set multiple flags
// jscriptLog("Adding global button \"" + page.globalButtons[i][0] + "\" with target = runScript and jscript = \"" + jScript + "\"");
overRide.addButton( "runScript", page.globalButtons[i][0], "", "", jScript, "");
}
// And any local buttons
// jscriptLog("ShowScriptPage: page.buttons.length=" + page.buttons.length);
if ( isSet("ReverseButtons") ) {
// By default we present buttons in the order they are specified.
// If this flag is set we reverse that. Useful when converting a tease from Teaseme or Guideme
for (var i=0;i<page.buttons.length;i++) { // Use the default guideme behaviour
// jScript = "onButtonClick(" + page.buttons[i][0] + ", " + page.buttons[i][1] + ")";
jScript = "localButtonClick(" + i + ")"; // Modified Dec 2016 to support commands that contain commas like "set option1,option2" to set multiple flags
// jscriptLog("Adding local button \"" + page.buttons[i][0] + "\" with target = runScript and jscript = \"" + jScript + "\"");
overRide.addButton( "runScript", page.buttons[i][0], "", "", jScript, "");
}
}
else {
for (var i=page.buttons.length-1;i>=0;i--) { // Reverse them because guideme puts them backwards
// jScript = "onButtonClick(" + page.buttons[i][0] + ", " + page.buttons[i][1] + ")";
jScript = "localButtonClick(" + i + ")"; // Modified Dec 2016 to support commands that contain commas like "set option1,option2" to set multiple flags
// jscriptLog("Adding local button \"" + page.buttons[i][0] + "\" with target = runScript and jscript = \"" + jScript + "\"");
overRide.addButton( "runScript", page.buttons[i][0], "", "", jScript, "");
}
}

// If we didn't have any buttons, and there is no delay on the page add a default button
if ( page.globalButtons.length == 0 && page.buttons.length == 0 && page.delay <= 0 && page.defBtnText.toLowerCase() != "none") {
// jscriptLog("Adding default button \"" + page.defBtnText + "\" with target = runScript and jscript = \"\"");
overRide.addButton( "runScript", page.defBtnText, "", "", "", "");
}

jscriptLog("ShowScriptPage: Got image=" + page.image + ", text=\"" + page.text + "\", delay=" + page.delay + ", metronome=" + page.metronome);

// Do we have any audio to play
if (page.audio != "" ) {
jscriptLog("ShowScriptPage: Adding audio " + page.audio + " and loop=" + page.loop);
overRide.setAudio( page.audio, "", "", "", "", "", page.loop-1, "");
}

// Do we have any video to play
if (page.video.filename != undefined && page.video.filename != "" ) {
if ( comonFunctions.fileExists(page.video.filename) == true ) jscriptLog("ShowScriptPage: Playing video file \"" + page.video.filename + "\" startAt=" + page.video.startAt + " stopAt=" + page.video.stopAt + " atEnd=" + page.video.atEnd );
else jscriptLog("ShowScriptPage: Video file \"" + page.video.filename + "\" not found");

overRide.setVideo( page.video.filename, page.video.startAt, page.video.stopAt, page.video.atEnd, "", "", 0, "");
}

// And the delay and metronome if applicable
if ( page.metronome > 0 ) overRide.setMetronome(page.metronome, 4, 0, "");
if ( page.delay > 0 ) overRide.setDelay( "runScript", page.delay, "", page.timer, "", "", "");

// And finally the page text

if ( isSet("TextOnLeft") ) { // Layout the page with the text on the left and image on the right
overRide.setLeftBody(page.text, "");
// Okay, that was the easy part. Now to put an image on the right
// First we need some CSS to size things
pText = "\n<style>\n";
pText += "html, body { height: 100% }\n";
pText += "div.domImage { height: 500px; padding: 0px 20px;}\n";
pText += "img.domImage { height: 100%; }\n";
pText += ".domSays { clear: both; padding: 10px 20px; }\n";
pText += "</style>\n";
// Now wrap the image in some html with the css applied

pText += "<div class=\"domImage\" id=\"imageWrapper\">";
pText += "<img class='domImage' src='\\MediaDir\\" + page.image + "' />\n";
pText += "</div>";

// pText += "<script>\n";
// pText += "document.write(\"Window is \" + document.getElementById(\"imageWrapper\").clientHeight + \" pixels tall<br/>\");";
// pText += "document.write(\"Window is \" + document.getElementById(\"imageWrapper\").clientWidth + \" pixels wide\");";
// pText += "</script>";

// And we can place some text below the image too if we want.
// Maybe a page argument could be used here?
// pText += "<p class=\"domSays\">";
// pText += "There's something to be said here.<br /><br/> ";
// pText += "</p>";

overRide.setHtml(pText); // And set the text area
}
else if ( isSet("CardGameLayout1") ) { // Layout the page with playing cards on the right
var playingCards = scriptVars.get("playingCards");

// Show the last 5 cards drawn on the right
pText = cardStyleElement(); // Use standard card layout
pText += "<div class=\"theCards\">";
var start = playingCards.nextCard - 5;
if ( start < 0 ) start = 0;
for (var i=start; i < playingCards.nextCard; i++) {
pText += showCard(playingCards.myDeck[i]);
}
pText += "</div>\n"; // End the cards div

pText += "<div style=\"clear: both; padding-top: 20px;\">\n";
pText += page.text; // Add the supplied page text
pText += "</div>\n";

overRide.setHtml(pText); // Set the text area
overRide.setImage(page.image); // And the page image
}
else { // Use the standard layout
overRide.setHtml(page.text); // Set the page text
overRide.setImage(page.image); // And the page image
}
}
// And that, as they say, is that!
}
function globalButtonClick( index ) {
var page = scriptVars.get("scriptData");
jscriptLog("globalButtonClick: arguments " + page.globalButtons[index][0] + ", " + page.globalButtons[index][1]);
onButtonClick(page.globalButtons[index][0], page.globalButtons[index][1]);
}
function localButtonClick( index ) {
var page = scriptVars.get("scriptData");
jscriptLog("localButtonClick: arguments " + page.buttons[index][0] + ", " + page.buttons[index][1]);
onButtonClick(page.buttons[index][0], page.buttons[index][1]);
}



2017-05-14 09:41:38,122 INFO Jscript - Starting ScriptVariables: {lastScriptSelected=Tutorial, ImageFolder=Models/Sarah, ScriptFile=Tutorial}
2017-05-14 09:41:38,122 INFO Jscript - Starting Flags {}
2017-05-14 09:41:38,125 INFO Jscript - ShowScriptPage: starting...
2017-05-14 09:41:38,127 ERROR Jscript - FileRunScript ReferenceError: "scriptVars" is not defined. (script#1592) // Now we're in the pageload function of the next page and scriptVars is no longer defined
org.mozilla.javascript.EcmaError: ReferenceError: "scriptVars" is not defined. (script#1592)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3951)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3929)
at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:4019)
at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1917)
at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1856)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1558)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3282)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:107)
at org.guideme.guideme.scripting.Jscript.run(Jscript.java:197)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
2017-05-14 09:41:38,131 INFO Jscript - Ending ScriptVariables: {lastScriptSelected=Tutorial, ImageFolder=Models/Sarah, ScriptFile=Tutorial}
2017-05-14 09:41:38,132 INFO Jscript - Ending Flags {}

Ldroamer
Explorer
Explorer
Posts: 50
Joined: Sat May 11, 2013 2:56 pm

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by Ldroamer »

I am having an issue with Java crashing while running Guideme. It has worked fine previously and I think this may have been caused by an update to Java. Any ideas what I should try to solve this? The teases I am using had worked flawlessly before.
philo
Explorer At Heart
Explorer At Heart
Posts: 831
Joined: Sun Jan 08, 2012 3:10 pm
Gender: Male
Sexual Orientation: Straight
Location: UK

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by philo »

Ldroamer wrote: Fri May 26, 2017 1:30 pm I am having an issue with Java crashing while running Guideme. It has worked fine previously and I think this may have been caused by an update to Java. Any ideas what I should try to solve this? The teases I am using had worked flawlessly before.
Are you starting it with start.bat or clicking on the jar file?
Starting using start.bat should use the bundled version of java so updates shouldn't upset it.

Guideme does write a lot of info to the log files which may tell you what the issue is.
If you delete the log files then cause the crash so the log files are small, I am happy to have a look if you upload them somewhere.
Ldroamer
Explorer
Explorer
Posts: 50
Joined: Sat May 11, 2013 2:56 pm

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by Ldroamer »

philo wrote: Fri May 26, 2017 3:21 pm
Are you starting it with start.bat or clicking on the jar file?
Starting using start.bat should use the bundled version of java so updates shouldn't upset it.

Guideme does write a lot of info to the log files which may tell you what the issue is.
If you delete the log files then cause the crash so the log files are small, I am happy to have a look if you upload them somewhere.
I am using the start.bat file so I guess whatever updates happened to Java didn't have anything to do with this issue. I will try and generate the log files as you suggest. I will also try some other teases to see how they run to see if maybe there is something in the tease itself causing the issue. I realized that I probably have run the same tease over and over recently so it might be in that tease. I am sure that I got it to run all the way before but it is worth doing some testing I guess to make sure it isn't the tease that is corrupted or causing some sort of an issue. I glanced through the log files and not sure I have the knowledge to know what to look for. I found a few things that were flagged as errors but no idea really what they mean.
Ldroamer
Explorer
Explorer
Posts: 50
Joined: Sat May 11, 2013 2:56 pm

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by Ldroamer »

I haven't got any log files yet but some experimentation has, I think, pointed me in the right direction.The teases that crash are ones that use a lot of videos. I have some that use quite a few often very short videos. The first few are fine and then you start to notice that the page changes get delayed and you start to see a text message in the media window which says "Body Content" . Eventually the program grinds to a halt and you get a message that Java has crashed. If the tease contains only pictures it doesn't happen. I suspect that if a tease only has a few videos in it that it will run fine but I haven't verified that. This tease used to work so my suspicion is that a video driver update probably caused this. My video card is an Nvidia one and they update their drivers at least once every three months. There was an update a few months ago. This issue may well be specific to systems running Nvidia cards.

One thought I had was that it might be possible to make things work with an updated version of VLC but as this is beyond my level of expertise that is just a guess on my part. Also I don't know how you would make it work with a newer version of VLC as I think the VLC files are part of the distribution?

Anyway that is what is happening and if anyone can suggest something I can try to make it work that would be great.
philo
Explorer At Heart
Explorer At Heart
Posts: 831
Joined: Sun Jan 08, 2012 3:10 pm
Gender: Male
Sexual Orientation: Straight
Location: UK

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by philo »

Ldroamer wrote: Sun May 28, 2017 10:36 am I haven't got any log files yet but some experimentation has, I think, pointed me in the right direction.The teases that crash are ones that use a lot of videos. I have some that use quite a few often very short videos. The first few are fine and then you start to notice that the page changes get delayed and you start to see a text message in the media window which says "Body Content" . Eventually the program grinds to a halt and you get a message that Java has crashed. If the tease contains only pictures it doesn't happen. I suspect that if a tease only has a few videos in it that it will run fine but I haven't verified that. This tease used to work so my suspicion is that a video driver update probably caused this. My video card is an Nvidia one and they update their drivers at least once every three months. There was an update a few months ago. This issue may well be specific to systems running Nvidia cards.

One thought I had was that it might be possible to make things work with an updated version of VLC but as this is beyond my level of expertise that is just a guess on my part. Also I don't know how you would make it work with a newer version of VLC as I think the VLC files are part of the distribution?

Anyway that is what is happening and if anyone can suggest something I can try to make it work that would be great.
Will update to the latest version of the video stuff in the next release, there are a few files that would all need to change not just vlc.
Will also do some testing to make sure it is not a resource leak of some sort
philo
Explorer At Heart
Explorer At Heart
Posts: 831
Joined: Sun Jan 08, 2012 3:10 pm
Gender: Male
Sexual Orientation: Straight
Location: UK

Version 0.3.3

Post by philo »

Quite a few components upgraded to newer versions so this is a complete release.
The files in the Guideme_lib folder will mostly need to be replaced.

Upgraded to the latest version of vlc for video.

Fixed a bug where videos on consecutive pages don't work
Worked more on the javascript debugging, you should now be able to debug the global javascript as well as the page javascript.
Let me know if you find any issues.

Windows 32bit
https://mega.nz/#!cARkxbRQ!elq3fwncjdyJ ... BApMcjbRMg

Windows 64bit
https://mega.nz/#!xI52yS6Z!TSQW6tm0J0Gg ... 2t9Zs9vw3M
User avatar
d3vi0n
Explorer At Heart
Explorer At Heart
Posts: 563
Joined: Fri Mar 25, 2011 10:42 am

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by d3vi0n »

And first post of this thread updated with the new version. Thx for the great work on GuideMe! :wave:
Try GuideMe to play Milovana Teases offline or create your own offline teases with highres images and videos...
Look at Hearts Club or Pilgrim Quest or My Succubus if you wanna see whats possible with GuideMe...
User avatar
Sissy Elise
Explorer At Heart
Explorer At Heart
Posts: 307
Joined: Sat Oct 10, 2015 1:52 pm
Gender: Femboy
Sexual Orientation: Open to new ideas!
I am a: Submissive
Dom/me(s): Miss Tress

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by Sissy Elise »

Hi, this looks like a typecasting error:
Image

This error looks like TeaseMe/GuideMe uses an integer on delay where as NYX uses a float

or maybe its scripted so below a 1 is not allowed.

offending line:

Code: Select all

preload1#page(text:'<P ALIGN="LEFT">PreLoading.</P>',media:pic(id:"femdomopoly1.jpg"),action:delay(time:0.1sec,target:preload2#,style:hidden))

Taken from this post
  
TEASES   VIDEOS   GAMES   ART
💕  Latest Tease:    Rock Paper Scissors - Visual Game
📼  Latest vids:      Sissy Trainer 22     🆕

Image
User avatar
d3vi0n
Explorer At Heart
Explorer At Heart
Posts: 563
Joined: Fri Mar 25, 2011 10:42 am

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by d3vi0n »

Sissy Elise wrote: Tue Jun 06, 2017 7:53 am This error looks like TeaseMe/GuideMe uses an integer on delay where as NYX uses a float or maybe its scripted so below a 1 is not allowed.
yes... GuideMe doesn't support float variables for delays. You can only use full seconds (including 0 seconds for "hidden pages"). I can't imagine in which cases a page delay below 1 second but above 0 seconds would be needed. In your case: You used delays with 0.1 seconds for your "preloader" pages. In GuideMe there is no need for any "preload", at least performance wise. If you want a "loading screen" for immersion reasons, use one page with a reasonable delay and add a nice animation.

Besides delays, there is another problem with your teases and GuideMe. GuideMe doesn't support <br> for texts. The importer won't import texts on pages which use <br>. In your case: Some pages in your teases will have no text in GuideMe. This can be fixed using <br/> instead of <br>. The use of <br> is considered bad webdesign because of compatibility reasons, anyways. But maybe philo could make a update for GuideMe and add support for <br>.

As example:

- i imported your "30 Seconds To Cum" tease
- fixed the delay problem (replace preloader with animated loading screen)
- fixed the missing texts because auf <br>
- replaced the low res pictures with high res pictures

Another possible change for GuideMe would be to reduce your 30 countdown pages to a single page using a small javascript function for the countdown itself.

Download: 30 Seconds To Cum (20,2 MB)

Image
Try GuideMe to play Milovana Teases offline or create your own offline teases with highres images and videos...
Look at Hearts Club or Pilgrim Quest or My Succubus if you wanna see whats possible with GuideMe...
philo
Explorer At Heart
Explorer At Heart
Posts: 831
Joined: Sun Jan 08, 2012 3:10 pm
Gender: Male
Sexual Orientation: Straight
Location: UK

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by philo »

d3vi0n wrote: Tue Jun 06, 2017 1:26 pm
Sissy Elise wrote: Tue Jun 06, 2017 7:53 am This error looks like TeaseMe/GuideMe uses an integer on delay where as NYX uses a float or maybe its scripted so below a 1 is not allowed.
Besides delays, there is another problem with your teases and GuideMe. GuideMe doesn't support <br> for texts. The importer won't import texts on pages which use <br>. In your case: Some pages in your teases will have no text in GuideMe. This can be fixed using <br/> instead of <br>. The use of <br> is considered bad webdesign because of compatibility reasons, anyways. But maybe philo could make a update for GuideMe and add support for <br>.
Neither TeaseMe nor GuideMe can support <br> as the tease is stored as xml, so any text needs to be to the XHTML not HTML standard.
I will look at converting any <br> tag to <br/> tags in the stand alone download
Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests