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 wrote:Sorry to keep asking endless questions, but is there anyway from javascript to set a button that was added via override's hotkey and sortOrder attributes?
Are you asking if you can add buttons using over ride that adds all the new options then yes
addButton(String target, String text, String set, String unSet, String jScript, String image, String hotKey, String sortOrder, boolean disabled, String id)

* @param target the page to go to
* @param text the text displayed on the button
* @param set the flags to set if the button is pressed
* @param unSet the flags to clear if the button is pressed
* @param jScript the Java Script function to run if the button is pressed
* @param image the background image for the button
* @param hotKey the hot key assigned to the button
* @param sortOrder the sort order value (used to sort the buttons)
* @param disabled the disabled state of the button (true to disable it)
* @param id the id to use to manipulate the button from Java Script

I need to update the documentation on override still for 0.1.4
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 »

Awesome, thank you!
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 wrote:I had a javascript question, really a curiosity so no big deal, but basically I was just getting a random list of files back and was unable to pop() or shift() them out. If the array had 7 items in it, and the last item was 'cool_file.txt' and I would run shift() on it, the last two items would be 'cool_file.txt', on the next shift the last 3 items would be like that, until the whole array was renamed to 'cool_file.txt'. So I would shift out the files but the array never emptied. Really weird.

I fixed it by just copying the list items to a new array like this:

Code: Select all

var ordered_encs =  guide.listFiles( guide.fixPath("Scripts/random_encounters") );
var encs = ordered_encs.split(",");
var non_fucked = []; //encs wont push/pop right for some reason
for( var i = 0; i<encs.length; i++ )
	non_fucked[i] = encs[i];
		
//shuffle order
parent.random_encounters = shuffle( non_fucked );

//later on was where i was doing the shifts and pops. Code worked when I added the 'non_fucked[]' array :)
Having had a look at this, I think it is because a Java string and a Javascript string are two different objects.
listFiles returns a java string so I think what is happening is encs is an array of Java strings but non_fucked is an array of Javascript strings.
So you probably do need the code you wrote to do the conversion.
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 »

philo wrote: Having had a look at this, I think it is because a Java string and a Javascript string are two different objects.
listFiles returns a java string so I think what is happening is encs is an array of Java strings but non_fucked is an array of Javascript strings.
So you probably do need the code you wrote to do the conversion.
Ahh ok, I can probably even try to drop the list files into a new var or call new String() on it before doing the split and that may work too. Strongly typed languages ftw ;) Thank you for the answer!
guardianx
Explorer
Explorer
Posts: 32
Joined: Sun Mar 30, 2014 7:24 pm

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

Post by guardianx »

philo wrote:
desertfox wrote:I had a javascript question, really a curiosity so no big deal, but basically I was just getting a random list of files back and was unable to pop() or shift() them out. If the array had 7 items in it, and the last item was 'cool_file.txt' and I would run shift() on it, the last two items would be 'cool_file.txt', on the next shift the last 3 items would be like that, until the whole array was renamed to 'cool_file.txt'. So I would shift out the files but the array never emptied. Really weird.

I fixed it by just copying the list items to a new array like this:

Code: Select all

var ordered_encs =  guide.listFiles( guide.fixPath("Scripts/random_encounters") );
var encs = ordered_encs.split(",");
var non_fucked = []; //encs wont push/pop right for some reason
for( var i = 0; i<encs.length; i++ )
	non_fucked[i] = encs[i];
		
//shuffle order
parent.random_encounters = shuffle( non_fucked );

//later on was where i was doing the shifts and pops. Code worked when I added the 'non_fucked[]' array :)
Having had a look at this, I think it is because a Java string and a Javascript string are two different objects.
listFiles returns a java string so I think what is happening is encs is an array of Java strings but non_fucked is an array of Javascript strings.
So you probably do need the code you wrote to do the conversion.
Philo is right about Java String object vs Javascript. What you're seeing is the array.pop() array.shift() methods being unable to free the element properly. What you can do is force a string conversion by doing the following:

Code: Select all

var ordered_encs = "" + guide.listFiles( guide.fixPath("Scripts/random_encounters") );
//ordered_encs is now a true javascript string

var encs = ordered_encs.split(",");
encs.pop() 
//encs will push/pop just fine now
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 »

guardianx wrote:
philo wrote:
desertfox wrote:I had a javascript question, really a curiosity so no big deal, but basically I was just getting a random list of files back and was unable to pop() or shift() them out. If the array had 7 items in it, and the last item was 'cool_file.txt' and I would run shift() on it, the last two items would be 'cool_file.txt', on the next shift the last 3 items would be like that, until the whole array was renamed to 'cool_file.txt'. So I would shift out the files but the array never emptied. Really weird.

I fixed it by just copying the list items to a new array like this:

Code: Select all

var ordered_encs =  guide.listFiles( guide.fixPath("Scripts/random_encounters") );
var encs = ordered_encs.split(",");
var non_fucked = []; //encs wont push/pop right for some reason
for( var i = 0; i<encs.length; i++ )
	non_fucked[i] = encs[i];
		
//shuffle order
parent.random_encounters = shuffle( non_fucked );

//later on was where i was doing the shifts and pops. Code worked when I added the 'non_fucked[]' array :)
Having had a look at this, I think it is because a Java string and a Javascript string are two different objects.
listFiles returns a java string so I think what is happening is encs is an array of Java strings but non_fucked is an array of Javascript strings.
So you probably do need the code you wrote to do the conversion.
Philo is right about Java String object vs Javascript. What you're seeing is the array.pop() array.shift() methods being unable to free the element properly. What you can do is force a string conversion by doing the following:

Code: Select all

var ordered_encs = "" + guide.listFiles( guide.fixPath("Scripts/random_encounters") );
//ordered_encs is now a true javascript string

var encs = ordered_encs.split(",");
encs.pop() 
//encs will push/pop just fine now
Oh awesome, little bit of trickery there, nice, thank you.
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.1.5 (minor fixes)

Post by philo »

Bug fix release of Guide Me.

64 Bit Windows
https://mega.nz/#!JFZmiTJb!A-U7sxw05qF5 ... jq3cwOqTo4
32 Bit Windows
https://mega.nz/#!NB4TWRzS!243tfn6qJtZC ... FgF8gfrGh8

Documentation
OverRide updated
https://github.com/philormand/TeaseMeV2/wiki/Override

Issues addressed in this version
  • Spurious scroll bar.
  • Issue with reading files in java script and audio on the same page
  • Issue with re sizing images in certain situations
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 wrote:Hello, I think I have found an odd bug having to do with playing audio in the 32 big version (might also do it in the 64).

Basically when playing an audio file on a page and in the pageLoad of the same page trying to call the guide.jsReadFileArray() it will always return null. Attached is a really short guide which tests it out, but is basically this:

Code: Select all

<Page id="start">
      <javascript>
      <![CDATA[
          function pageLoad()
          {
             
              overRide.setAudio("Audio/Ding.mp3", "", "", "", "", "", "", "");


            var lines = guide.jsReadFileArray( "test.txt");
            jscriptLog("Lines: " +lines +" Length: " +lines.length);
          }
      ]]>
      </javascript>
      <Text>
        <p>Try it!</p>
      </Text>
    </Page>
The behavior to reproduce:
1. Start guideme from start.bat
2. Open tease
3. Checking jscriptlog it works correctly, see the array and the length

4. File -> Open, pick the guide
5. Crash, checking the log, lines is returned null.

Any successive file-> opens will keep producing null. If you restart guideme by shutting down, it keeps working that first time.

If you remove the audio call, the restart guideme, it works every time.

The behavior was present if I was using the override function or the standard XML audio tag.
This has now been fixed in 0.1.5
(It was badly written threading code in the audio, which should now be fixed)
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 »

Thank you for the update!

Just tried out the 32 bit version and noticed that there are scroll bars permanetly on both frames now where the last 32 version and version before that did not have them. Is there an option to get them back to only appearing when they are needed or was it supposed to be like that?

Also here is the java version just in case that factors in somehow.
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) Client VM (build 25.31-b07, mixed mode, sharing)

Double checked the audio bug and image scaling and they are working perfect now!
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 wrote:Thank you for the update!

Just tried out the 32 bit version and noticed that there are scroll bars permanetly on both frames now where the last 32 version and version before that did not have them. Is there an option to get them back to only appearing when they are needed or was it supposed to be like that?

Also here is the java version just in case that factors in somehow.
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) Client VM (build 25.31-b07, mixed mode, sharing)

Double checked the audio bug and image scaling and they are working perfect now!
Try editing the defaultcss.txt and removing the last line something like html{ autoflow:both} I think, I added it to resolve another issue.
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 »

philo wrote: Try editing the defaultcss.txt and removing the last line something like html{ autoflow:both} I think, I added it to resolve another issue.
Thank you, that did it! Well not just the overflow, it looked like the only thing different was html was on top of the default css and you added the overflow:auto's...but those should probably hide the scroll bars so says w3schools at least hehe. Anyway I just took the previous defaultcss and put it in the 1.5 guide me and it's back to 'normal'. Thank you again!
guardianx
Explorer
Explorer
Posts: 32
Joined: Sun Mar 30, 2014 7:24 pm

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

Post by guardianx »

desertfox wrote:
philo wrote: Try editing the defaultcss.txt and removing the last line something like html{ autoflow:both} I think, I added it to resolve another issue.
Thank you, that did it! Well not just the overflow, it looked like the only thing different was html was on top of the default css and you added the overflow:auto's...but those should probably hide the scroll bars so says w3schools at least hehe. Anyway I just took the previous defaultcss and put it in the 1.5 guide me and it's back to 'normal'. Thank you again!
Actually the problem is that the css is malformed. It probably should look like this:

Code: Select all

html {overflow: auto;}

body { 
	color: white; 
	background-color: black; 
	font-family: Tahoma; 
	font-size:MintHtmlFontSizepx;
	overflow-y: auto; 
} 

html, body, #wrapper { 
	height:100%; 
	width: 100%; 
	margin: 0; 
	padding: 0; 
	border: 0; 
} 

#wrapper td { 
	vertical-align: middle; 
	text-align: center; 
}
Also, not sure if it's intended, but the font-size value looks curious.
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 »

Going to take a wild stab that the font value is just a flag to replace with whatever you've set in your guideme pref.

Tried the fixed format and is working.

Also, just discovered alt +d. I'm an asshole, that screen is so nice. Have been refreshing the javascript log in the text editor and I have to say that has sort of been sucking. This screen is freaken nice. Wish I saw that two weeks ago :)
User avatar
Kongming
Explorer At Heart
Explorer At Heart
Posts: 105
Joined: Sat Oct 19, 2013 7:59 am
Gender: Male
Sexual Orientation: Straight

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

Post by Kongming »

philo wrote:
Kongming wrote:Could someone reupload the Tease Downloader please? All the links I found in this thread are dead :\'-(
32bit version
https://mega.nz/#!dYIRySqK!Iqc_D3FWkct4 ... QHzBi9hvWw
64bit version
https://mega.nz/#!UQwQCCiS!-nE5YbKWD5Ug ... 3QuP8vzh1U
Thank you! :-)
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 wrote:Going to take a wild stab that the font value is just a flag to replace with whatever you've set in your guideme pref.

Tried the fixed format and is working.

Also, just discovered alt +d. I'm an asshole, that screen is so nice. Have been refreshing the javascript log in the text editor and I have to say that has sort of been sucking. This screen is freaken nice. Wish I saw that two weeks ago :)
I added alt m as well which toggles the menu bar on and off

I will corect the css file in the next release, I edited it in a hurry, and yes the strange font value is substituted for the default font size.
the css and html were hard coded in the program but I have moved them to text files so they can be updated without having to release a new version. Also it allows people to change them on their local copy if they wish.
Post Reply