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

guardianx
Explorer
Explorer
Posts: 32
Joined: Sun Mar 30, 2014 7:24 pm

Re: Javascript question

Post by guardianx »

PlayfulGuy wrote:

Code: Select all

  function parsePageArgs(args) {
    var text;
    if ( args !== undefined ) text = args;
    else text = scriptVars.get("pageArgs");
   // parse the text and return
.....
  }
  
  function someOtherFunction() {
    result = parsePageArgs(someData);
  }    
PG
The javascript variables are of type variants. This means they are loosely defined and can be anything. So in your example, the variable "args" can be type string, number or something else, depending on what your calling program is passing in.

The following example, args will be type integer:

Code: Select all

abc = 9;
result = parsePageArgs(abc);
Generally to avoid type confusion and ensure args is a string.. I do the following:

Code: Select all

  function parsePageArgs(args) {
    var text;
    if (args) {
	    // This forces args to be treated as string.  .toString() doesn't always work
       text = "" + args;  
    } else {
       text = scriptVars.get("pageArgs");
   }
   // parse the text and return
Hope that helps.
sirveillance
Explorer
Explorer
Posts: 15
Joined: Mon Oct 31, 2011 1:25 pm

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

Post by sirveillance »

Is there a reupload (preferably on mega) for GottaEdgeEmAll ? That would be awesome.
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 »

lola88e wrote:Hi.. i finally gave the new downloader a try with mixed results, some teases downloaded and some not. . Mostly flash teases. .also missing the sounds in teases..
Much Thanks
Can you give examples of teases that don't work?
guardianx
Explorer
Explorer
Posts: 32
Joined: Sun Mar 30, 2014 7:24 pm

Re: Javascript question

Post by guardianx »

PlayfulGuy wrote:@Philo or anyone who might know:

This is driving me a little bananas.

Code: Select all

Cannot call property length in object The String Contents. It is not a function, it is "number".
PG
Playful, just ran into this myself. Here's the reason why, length in the javascript string object is a property, not a method. Which means you simply should just leave out the () parenthesis:

Code: Select all

//This works:
var xxx = "abc";
var i = xxx.length;

//this doesn't:
var i = xxx.length();
denialslave2010
Explorer
Explorer
Posts: 28
Joined: Mon Sep 28, 2009 12:26 am

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

Post by denialslave2010 »

I have a stupid question. I need to know,where,to,extract the teases to use them. Like specific location. I thought just extracting them to the main file would work, but it doesnt. Thank you in advance.
lola88e
Explorer
Explorer
Posts: 6
Joined: Sun Apr 03, 2016 6:08 am
Gender: Transsexual/Transgender
Sexual Orientation: Bisexual/Bi-Curious
I am a: Submissive

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

Post by lola88e »

denialslave2010 wrote:I have a stupid question. I need to know,where,to,extract the teases to use them. Like specific location. I thought just extracting them to the main file would work, but it doesnt. Thank you in advance.
In TeaseMe extract xml file and folder in to the teases folder :)
philo wrote:
lola88e wrote:Hi.. i finally gave the new downloader a try with mixed results, some teases downloaded and some not. . Mostly flash teases. .also missing the sounds in teases..
Much Thanks
Can you give examples of teases that don't work?
https://milovana.com/webteases/showflash.php?id=33487

This tease fails to download completely, sound files missing. Thanks :wave:
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: Javascript question

Post by PlayfulGuy »

cd_228 wrote:
PlayfulGuy wrote:
I'm trying to modify it to be a little more general like this:

Code: Select all

  function parsePageArgs(args) {
    var text;
    if ( args !== undefined ) text = args;
    else text = scriptVars.get("pageArgs");
   // parse the text and return
.....


PG[/quote]

Hmm. I'm not by any means a javascript guru:P.

But I'm pretty sure you will get an error by typing

 if ( args !== undefined ) text = args;
 
 it should be:
 
  if ( args != undefined ) text = args;[/quote]

Actually, in javascript ==, ===, != and !== are all valid, and are in fact different.
== and != use less strict type enforcement. For example, saying 
   if ( value == false ) 
will return true if value is 0, a null string, or the javascript constant false.
  if ( value === false ) will return true only if value is the javascript constant false.
!= and !== are the "not equal" equivalents.

PG
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: Javascript question

Post by PlayfulGuy »

guardianx wrote:
PlayfulGuy wrote:@Philo or anyone who might know:

This is driving me a little bananas.

Code: Select all

Cannot call property length in object The String Contents. It is not a function, it is "number".
PG
Playful, just ran into this myself. Here's the reason why, length in the javascript string object is a property, not a method. Which means you simply should just leave out the () parenthesis:

Code: Select all

//This works:
var xxx = "abc";
var i = xxx.length;

//this doesn't:
var i = xxx.length();
Thanks guardianx. I knew that's what was going on, but I was puzzled because what was supposed to fix it didn't work. Looking at it again today I think I was having a senior moment and was applying the fix in the wrong case. The work around I used is good enough for now. Maybe I'll revisit it later with a clearer head.

PG
User avatar
Alex69
Explorer At Heart
Explorer At Heart
Posts: 284
Joined: Sun Jul 12, 2015 9:46 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive
Location: Spain, Europe

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

Post by Alex69 »

Hi!

Is there a version of Teaseme or Guideme for macintosh computers?
Thank you in advance
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

Bug report

Post by PlayfulGuy »

Hi Philo,

Hope you're still around and doing okay. Haven't seen you chime in here for a while.

I've encountered a small issue with comonFunctions.GetRandomFile(). If the folder contains subfolders GetRandomFile may return a folder name as well as a file name. I think it should only return regular files.

I'm trying to load a random image file using "*" as the wildcard so images can be jpg, or png, or whatever.
I'm forced to call GetRandomFile, check the result to see if it's a folder, and keep trying again until I get a file.

Thanks,

PG
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 »

My Heart's Club Revisted heavily uses files, folders and tags for different media like images, animated gif, clips and videos. So I had similar problems. I wrote my own functions to get what I want.

comonFunctions.ListFiles() only lists files, not folders...

comonFunctions.ListSubFolders() only lists subfolders, not files...

Both functions return a string, not an array.

So you have to parse the string to create an array with the individual file- or foldernames.

Example for files:

Code: Select all

function fGetFilesArray(vFolder) {	
	var vFilesList = comonFunctions.ListFiles(vFolder);
	var vFilesArray = [];
	if (vFilesList.length() == 0) {
		// Folder contains NO Files 
		vFilesArray = [];
	} else { 
		if (vFilesList.search(",") == -1) {
			// Folder contains one subfolder
			vFilesArray = [vFilesList];
		} else {
			// Folder contains multiple subfolders
			vFilesArray = vFilesList.split(",");
		}
	}
	return vFilesArray;
}
Example for folders:

Code: Select all

function fGetSubFolderArray(vFolder) {
	var vSubFolderList = comonFunctions.ListSubFolders(vFolder);
	var vSubFolderArray = [];
	if (vSubFolderList.length() == 3) {
		// Folder contains NO Subfolder 
		vSubFolderArray = [];
	} else { 
		vSubFolderList = vSubFolderList.substring(2, vSubFolderList.length()-2);
		if (vSubFolderList.search("\", \"") == -1) {
			// Folder contains one subfolder
			vSubFolderArray = [vSubFolderList];
		} else {
			// Folder contains multiple subfolders
			vSubFolderArray = vSubFolderList.split("\", \"");
		}
	}
	return vSubFolderArray;
}
Then you could for example check each filename if it has the "correct" filetype by checking the ending (.jpg for example). And lastly you could combine foldernames and filenames into a new array containing each file including its complete folderpath (for example: "random\solo\babes\hot1.jpg"). Pick an random Elelement from that array using the range (0, Array.length+1) and you can directly use the resulting string to add it as media to your pages.

For my Heart's Club Revisted: At the start of the game and as part of the settings the player can initialize or refresh the random media files. The script then searches all random media files, sorts them into their categories and saves arrays for each individual category containing the list of all files (including the folderpath). So i have all random media files ready to go when i need them in the game and this way i make sure, a wrong filetypes or empty folders don't break the game. It makes in general the handling of the different files much easier.

I hope this helps a bit. :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...
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: Bug report

Post by philo »

PlayfulGuy wrote:Hi Philo,

Hope you're still around and doing okay. Haven't seen you chime in here for a while.

I've encountered a small issue with comonFunctions.GetRandomFile(). If the folder contains subfolders GetRandomFile may return a folder name as well as a file name. I think it should only return regular files.

I'm trying to load a random image file using "*" as the wildcard so images can be jpg, or png, or whatever.
I'm forced to call GetRandomFile, check the result to see if it's a folder, and keep trying again until I get a file.

Thanks,

PG
Yes still around.
Work is taking up a lot of my time right now and I have got back into full time development so coding in my spare time has been less a priority.
I have been working on getting Javascript debugging working for a while now which would allow you to step through javascript code and see the variables etc. it has meant quite a few changes around java script so I need to test it to make sure I haven't broken anything.
Once that is released and stable I will be looking at fixes and changes.
I am hoping to spend some time on it over Christmas.
And yes RandomFile should only return files not directories, so I will have a look at that when I get time.
User avatar
Edge88
Explorer
Explorer
Posts: 19
Joined: Fri Jan 22, 2016 5:22 pm
Gender: Male
Sexual Orientation: Straight
I am a: Slave

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

Post by Edge88 »

Hey :)
Is there a version for MAC too? :)
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 »

Edge88 wrote:Hey :)
Is there a version for MAC too? :)
It has been written so it can run on a mac, however putting together a release and testing it requires a mac, which I don't have.
(and probably never will)
There have been a few people that have managed to get older versions working.

There may be some minor tweaks needed to GuideMe as the directory separator in windows is \ and in Mac it is /. I have tried to write code that should use the right one. However some teases may have \ hardcoded in them.

Tech info on what needs doing is in the spoiler
Spoiler: show
Guideme is written in Java and can be run on any compatible system.
However it uses a couple of things to do this.
SWT (which handles operating system specific display functions) so you need the correct SWT jar for Mac
VLC (which handles video and audio) so again you need the correct vlc for Mac installed

There is also whether you a use 64bit or 32bit Java runtime engine.
The JRE, SWT and VLC must all be either 64bit or 32bit
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: GuideMe (TeaseMe v2.0): BETA Thread

Post by PlayfulGuy »

philo wrote:
Edge88 wrote:Hey :)
Is there a version for MAC too? :)
It has been written so it can run on a mac, however putting together a release and testing it requires a mac, which I don't have.
(and probably never will)
There have been a few people that have managed to get older versions working.

There may be some minor tweaks needed to GuideMe as the directory separator in windows is \ and in Mac it is /. I have tried to write code that should use the right one. However some teases may have \ hardcoded in them.

Tech info on what needs doing is in the spoiler
Spoiler: show
Guideme is written in Java and can be run on any compatible system.
However it uses a couple of things to do this.
SWT (which handles operating system specific display functions) so you need the correct SWT jar for Mac
VLC (which handles video and audio) so again you need the correct vlc for Mac installed

There is also whether you a use 64bit or 32bit Java runtime engine.
The JRE, SWT and VLC must all be either 64bit or 32bit
philo,

For what it's worth, I've found on Windows that it doesn't matter whether you use "/" or "\". I think Java is aware of this difference and handles it automatically.

PG
Post Reply

Who is online

Users browsing this forum: dfx and 29 guests