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

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 »

@desertfox

Some interesting suggestions.
Originally my idea was to add java script for the more complex stuff and leave the base TeaseMe functionality the same.
From the feed back in the thread I am revisiting that as people are struggling with java script more than I expected (I spend too little time with people who don't do coding for a living :-D )

I am putting more time into adding more into the non java script stuff.

1) I will add more into the new <timer> node, currently it only allows a java script funtion to be run
I will add being able to set the image and the text as well which will give you pretty much the same as sequence

2) I will have a think on the best way to add the loop and random order sequence

3) It is very complex to parse free text, I wouldn't have the time to write something like that, I may look to see if there is an open source project that can be adapted and integrated but for the moment I think it would be too much effort.
desertfox
Explorer At Heart
Explorer At Heart
Posts: 365
Joined: Mon Dec 03, 2012 7:26 pm
Gender: Male
Sexual Orientation: Straight
I am a: None of the above

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

Post by desertfox »

Yeah I hear that! I'd probably blow my head off writing that parser :)

And if I didn't say so already, I'm super impressed with everything done already in the program! I code in my day life and I can never seem to find motivation or time to continue doing so after I get home.

I think the idea of sacrificing some creative freedom with the tool, eg do anything html/js for some structured sequences at times would be really useful. Basically the thought being you lose freedom due to the fixed structure, but save a lot of time writing it because the nature of the fixed structure lets the code fill in more information for you.
Sisyphuster
Explorer At Heart
Explorer At Heart
Posts: 201
Joined: Sat Mar 10, 2012 9:55 am

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

Post by Sisyphuster »

philo wrote:
Sisyphuster wrote: Also, is the 0.1.3 build of GuideMe available for Mac yet?
Guideme is not specifc, it is the libraries it uses that are specific to mac.
overwriting the 0.1.2 guideme.jar with the one from 0.1.3 should work.

Hey Philo, I tried replacing the guideme.jar file with the one from 0.1.3 as you suggested, but when I load the game, it still says 09.1.2 at the top of the window, and I'm getting a lot of the same errors. Is there a full 0.1.3 mac install anywhere?

Thanks!
User avatar
PlayfulGuy
Explorer At Heart
Explorer At Heart
Posts: 797
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: GuideMe (TeaseMe v2.0): BETA Thread

Post by PlayfulGuy »

philo wrote:
PlayfulGuy wrote:@Philo,

[*]There should be a way to delete scriptVars that are no longer needed. I can find no way to do it now
Just had a look at this and there is a way to do it already
It is a java hashmap so any of the functions should work
http://docs.oracle.com/javase/7/docs/ap ... shMap.html

This will delete all variables
scriptVars.clear();

This will delete the variable vehicle2
scriptVars.remove("vehicle2");
Works like a charm!

Thanks.
User avatar
PlayfulGuy
Explorer At Heart
Explorer At Heart
Posts: 797
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: GuideMe (TeaseMe v2.0): BETA Thread

Post by PlayfulGuy »

philo wrote:@desertfox

Some interesting suggestions.
I agree. Some very interesting suggestions. I do find it cumbersome trying to handle the different branches of a dialog in the current format. This method you propose looks intriguing.
philo wrote: 2) I will have a think on the best way to add the loop and random order sequence
philo wrote:
3) It is very complex to parse free text, I wouldn't have the time to write something like that, I may look to see if there is an open source project that can be adapted and integrated but for the moment I think it would be too much effort.
Check out nlp_compromise. I got looking into natural language parsing for a virtual dom/me idea I had for guideme. I've actually been working on it since January, and really wanted the main interface to be like a chat interface (an idea that 1885 has also been working on).

Anyway, also take a look at the nlp_compromise home page, particularly the Justification section. It turns out that relatively few words make up the bulk of written text. In specific contexts, like teases, it's fairly easy to make educated guesses about the words people will be using most. After spending a bunch of time trying to figure out how it all works, I ultimately decided it was easier to start writing my own parser and see how it went. So far I'm liking how it's going, but I'm in the very early stages. Maybe I'll post a demo when I get it to a stage I'm happy with.

On another note, It would be super cool if the Guideme window were really a single browser window with the left pane and right pane being html <div>'s or something like that so that the entire window is available, and the left and right sides could talk to each other. A little more food for thought.

Cheers!

PG
meson1
Explorer
Explorer
Posts: 93
Joined: Sun Sep 26, 2010 3:28 pm
Gender: Male
Sexual Orientation: Straight

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

Post by meson1 »

Is there a way to use a delay to trigger a JS script WITHOUT then going on to refresh the page?

Because at the moment, if you have a delay, whether it's defined via XML or via JS, you HAVE to specify a target page. So Guideme forces you to branch to whatever page you specify. You can put in the current page, but once again that causes the current page to be reloaded.

I want to do something like running a brief JS routine every 5 or 10 seconds without always having to reload the page so I can do some semi 'realtime' processing.
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 »

meson1 wrote:Is there a way to use a delay to trigger a JS script WITHOUT then going on to refresh the page?

Because at the moment, if you have a delay, whether it's defined via XML or via JS, you HAVE to specify a target page. So Guideme forces you to branch to whatever page you specify. You can put in the current page, but once again that causes the current page to be reloaded.

I want to do something like running a brief JS routine every 5 or 10 seconds without always having to reload the page so I can do some semi 'realtime' processing.
You can use a timer node which is new in 0.1.3.
if you go back a page or two in this thread there is some example code.
meson1
Explorer
Explorer
Posts: 93
Joined: Sun Sep 26, 2010 3:28 pm
Gender: Male
Sexual Orientation: Straight

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

Post by meson1 »

philo wrote:
meson1 wrote:Is there a way to use a delay to trigger a JS script WITHOUT then going on to refresh the page?

Because at the moment, if you have a delay, whether it's defined via XML or via JS, you HAVE to specify a target page. So Guideme forces you to branch to whatever page you specify. You can put in the current page, but once again that causes the current page to be reloaded.

I want to do something like running a brief JS routine every 5 or 10 seconds without always having to reload the page so I can do some semi 'realtime' processing.
You can use a timer node which is new in 0.1.3.
if you go back a page or two in this thread there is some example code.
Blimey. Fast response. I'll check that out. Thanks. :-)

I suppose there's a second part to the question. Can JS affect changes to the page content on the fly without reloading the page? For instance, if I change the text area, or add a button or something, will it be rendered without reloading the whole page?
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 »

meson1 wrote:
philo wrote:
meson1 wrote:Is there a way to use a delay to trigger a JS script WITHOUT then going on to refresh the page?

Because at the moment, if you have a delay, whether it's defined via XML or via JS, you HAVE to specify a target page. So Guideme forces you to branch to whatever page you specify. You can put in the current page, but once again that causes the current page to be reloaded.

I want to do something like running a brief JS routine every 5 or 10 seconds without always having to reload the page so I can do some semi 'realtime' processing.
You can use a timer node which is new in 0.1.3.
if you go back a page or two in this thread there is some example code.
Blimey. Fast response. I'll check that out. Thanks. :-)

I suppose there's a second part to the question. Can JS affect changes to the page content on the fly without reloading the page? For instance, if I change the text area, or add a button or something, will it be rendered without reloading the whole page?
you can definetly change text and probably images. I don't think buttons work but I would have to check.
I have been working on the next version which will allow a lot more.
if you look at the closed issues on github any thing marked 0.1.4 is in the next version.
meson1
Explorer
Explorer
Posts: 93
Joined: Sun Sep 26, 2010 3:28 pm
Gender: Male
Sexual Orientation: Straight

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

Post by meson1 »

philo wrote:I have been working on the next version which will allow a lot more.
if you look at the closed issues on github any thing marked 0.1.4 is in the next version.
Aye. I've been keeping an eye on that. :-)

Good work. Looking forward to it.
User avatar
PlayfulGuy
Explorer At Heart
Explorer At Heart
Posts: 797
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

overRide.setMetronome

Post by PlayfulGuy »

@Philo (or whoever)

Can you clarify how overRide.setMetronome is supposed to work? I'm trying to establish a page that plays a simple random metronome of 30, 60, 90... beats per minute.

overRide.setMetronome(60, 0, 0, ""); gives me silence, as expected I think.

I expected overRide.setMetronome(60, 1, 0, "") to give me 60 beats per minute, but I got 15 (one every 4 seconds).
overRide.setMetronome(60, 2, 0, "") gave me 30 beats per minute
overRide.setMetronome(60, 4, 0, "") finally gave me the 60 per minute I was after.

I don't get it. I really think the second argument should just be eliminated, and have the first specify a beats per minute. This current setup is confusing at best.

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: overRide.setMetronome

Post by philo »

PlayfulGuy wrote:@Philo (or whoever)

Can you clarify how overRide.setMetronome is supposed to work? I'm trying to establish a page that plays a simple random metronome of 30, 60, 90... beats per minute.

overRide.setMetronome(60, 0, 0, ""); gives me silence, as expected I think.

I expected overRide.setMetronome(60, 1, 0, "") to give me 60 beats per minute, but I got 15 (one every 4 seconds).
overRide.setMetronome(60, 2, 0, "") gave me 30 beats per minute
overRide.setMetronome(60, 4, 0, "") finally gave me the 60 per minute I was after.

I don't get it. I really think the second argument should just be eliminated, and have the first specify a beats per minute. This current setup is confusing at best.

PG
It uses the standard Java midi interface and I pretty much implemented it without thinking too much about it.
for overRide where you are just implementing a regular beat you need (BPM,4,0,"")
the 4 is the beats per bar with the default being 4.
not intuitive so I may change it
User avatar
PlayfulGuy
Explorer At Heart
Explorer At Heart
Posts: 797
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: GuideMe (TeaseMe v2.0): BETA Thread

Post by PlayfulGuy »

Philo, is there a way to read the contents of a local file from javascript?
Ideally I just want to be able to read the lines of the file into an array, one line per array element.

Or perhaps a way to get the text content of an XML node but retain the line breaks. I can get the text from a node but it always collapses the text into a single (one line) string.

I've looked over some of the magical things Nezhul was doing earlier in the thread but they're not exactly what I'm looking for.

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 »

PlayfulGuy wrote:Philo, is there a way to read the contents of a local file from javascript?
Ideally I just want to be able to read the lines of the file into an array, one line per array element.

Or perhaps a way to get the text content of an XML node but retain the line breaks. I can get the text from a node but it always collapses the text into a single (one line) string.

I've looked over some of the magical things Nezhul was doing earlier in the thread but they're not exactly what I'm looking for.

PG
There is an example of accessing an xml file on the wiki.
I think it was added for d3vi0n's tease.
I can't remember if there is anything for loading a flat file into an array, I will check when I get time.
It would be easy to add if it does not already exist.

*Edit
jsReadFile reads the contents of a file to a string which you could then split into an array in javascript.
something like this should give you an array in the variable lines

Code: Select all

 var text = comonFunctions.jsReadFile("file.txt"); var lines = text.match(/^.*([\n\r]+|$)/gm); 
the example on the wiki then converts that to an xml structure for an xml file

Code: Select all

 var modelsxml;  --Read file into a stringmodelsxml = comonFunctions.jsReadFile("models.xml");  --Convert the string to an xml objectvar modelsxmlobj = new XML(modelsxml);  var modelobj;  --loop round the top level nodes to process the contentsfor (var i = 0; i < modelsxmlobj.model.length(); i++) {       modelobj = modelsxmlobj.model[i];       jscriptLog(modelobj.name);       jscriptLog(modelobj.category);       jscriptLog(modelobj.haircolor);  } 


I am also adding a new function jsReadFileArray that will return a string array with each line in a separate element.

Code: Select all

 var lines = comonFunctions.jsReadFileArray("file.txt");  
User avatar
PlayfulGuy
Explorer At Heart
Explorer At Heart
Posts: 797
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: GuideMe (TeaseMe v2.0): BETA Thread

Post by PlayfulGuy »

Thanks Philo,

I'll look at those and see where it goes. I've been fiddling around today with some code in a browser but I'm not sure how it will work within Guideme.

I had seen that XML sample from the wiki ages ago and forgotten about. That may be close to what I need.
*Edit* Well that didn't work. I copied the code from the wiki and tried it out. The jsreadfile line does read the XML file and I can dump it to the log so I know it's working, but the next line dies.
My entire script is

Code: Select all

         modelsxml = comonFunctions.jsReadFile("models.xml");          jscriptLog("modelsxml=" + modelsxml);          var modelsxmlobj = new XML(modelsxml);   
On the last line I get the error in the spoiler below.
Spoiler: show
2015-05-26 21:58:58,316 ERROR Jscript - FileRunScript TypeError: The processing instruction target matching "[xX][mM][lL]" is not allowed. (script#7)
org.mozilla.javascript.EcmaError: TypeError: The processing instruction target matching "[xX][mM][lL]" is not allowed. (script#7)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3557)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3547)
at org.mozilla.javascript.xmlimpl.XmlProcessor$RhinoSAXErrorHandler.throwError(XmlProcessor.java:66)
at org.mozilla.javascript.xmlimpl.XmlProcessor$RhinoSAXErrorHandler.fatalError(XmlProcessor.java:75)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.mozilla.javascript.xmlimpl.XmlProcessor.toXml(XmlProcessor.java:233)
at org.mozilla.javascript.xmlimpl.XmlNode.createElement(XmlNode.java:108)
at org.mozilla.javascript.xmlimpl.XMLLibImpl.parse(XMLLibImpl.java:405)
at org.mozilla.javascript.xmlimpl.XMLLibImpl.ecmaToXml(XMLLibImpl.java:438)
at org.mozilla.javascript.xmlimpl.XMLObjectImpl.ecmaToXml(XMLObjectImpl.java:800)
at org.mozilla.javascript.xmlimpl.XML.jsConstructor(XML.java:217)
at org.mozilla.javascript.xmlimpl.XMLObjectImpl.execIdCall(XMLObjectImpl.java:591)
at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:127)
at org.mozilla.javascript.BaseFunction.construct(BaseFunction.java:328)
at org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2266)
at org.mozilla.javascript.gen.c4._c1(script:7)
at org.mozilla.javascript.gen.c4.call(script)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003)
at org.mozilla.javascript.gen.c4.call(script)
at org.guideme.guideme.scripting.Jscript.runScript(Jscript.java:113)
at org.guideme.guideme.MainLogic.displayPage(MainLogic.java:190)
at org.guideme.guideme.MainLogic.displayPage(MainLogic.java:77)
at org.guideme.guideme.ui.MainShell$FileLoadListener.widgetSelected(MainShell.java:740)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.guideme.guideme.App.main(App.java:96)
2015-05-26 21:58:58,321 INFO Jscript - Ending ScriptVariables: {}
2015-05-26 21:58:58,321 INFO Jscript - Ending Flags {}
Cheers,

PG
philo wrote:
PlayfulGuy wrote:Philo, is there a way to read the contents of a local file from javascript?
Ideally I just want to be able to read the lines of the file into an array, one line per array element.

Or perhaps a way to get the text content of an XML node but retain the line breaks. I can get the text from a node but it always collapses the text into a single (one line) string.

I've looked over some of the magical things Nezhul was doing earlier in the thread but they're not exactly what I'm looking for.

PG
There is an example of accessing an xml file on the wiki.
I think it was added for d3vi0n's tease.
I can't remember if there is anything for loading a flat file into an array, I will check when I get time.
It would be easy to add if it does not already exist.

*Edit
jsReadFile reads the contents of a file to a string which you could then split into an array in javascript.
something like this should give you an array in the variable lines

Code: Select all

 var text = comonFunctions.jsReadFile("file.txt"); var lines = text.match(/^.*([

]+|$)/gm); 
the example on the wiki then converts that to an xml structure for an xml file

Code: Select all

 var modelsxml;  --Read file into a stringmodelsxml = comonFunctions.jsReadFile("models.xml");  --Convert the string to an xml objectvar modelsxmlobj = new XML(modelsxml);  var modelobj;  --loop round the top level nodes to process the contentsfor (var i = 0; i < modelsxmlobj.model.length(); i++) {       modelobj = modelsxmlobj.model[i];       jscriptLog(modelobj.name);       jscriptLog(modelobj.category);       jscriptLog(modelobj.haircolor);  } 


I am also adding a new function jsReadFileArray that will return a string array with each line in a separate element.

Code: Select all

 var lines = comonFunctions.jsReadFileArray("file.txt");  
Post Reply

Who is online

Users browsing this forum: Google [Bot], markus, subm13 and 12 guests