Page 50 of 121
Re: GuideMe (TeaseMe v2.0): BETA Thread
Posted: Tue Jun 14, 2016 7:30 pm
by Shattered
GuideMe file for Days of Chastity with Lexi in my main thread! Will add here once all the kinks are worked out, it is being reuploaded a bit right now as I find glitches.
viewtopic.php?f=2&t=18915&p=220478#p220478
EDIT:
How do I get sound to work? I'm using MWTEdit from the teaseme thread but once I choose the mp3 I don't know how to get it to play in the application...
Re: GuideMe (TeaseMe v2.0): BETA Thread
Posted: Wed Jun 15, 2016 7:08 am
by Trusfrated
Shattered wrote:How do I get sound to work? I'm using MWTEdit from the teaseme thread but once I choose the mp3 I don't know how to get it to play in the application...
There is a Play Audio (and Stop) button on the Page View tab, in the upper right corner. It's greyed-out unless the page has an mp3 selected.
To truly preview the tease with audio though, I'd use TeaseMe or GuideMe. MWTEdit doesn't really have much of a preview mode, other than Page View.
Re: GuideMe (TeaseMe v2.0): BETA Thread
Posted: Wed Jun 15, 2016 2:27 pm
by philo
wheresmything wrote:
So, I've been trying to get what I'm after working for a bit now, and can't quite seem to get there (I suspect its a path thing). The above is a great start, but say my media directory has 3 subfolders named low, medium, and high. How can I adapt this to create 3 arrays, one for each folder than can function independently of each other? Thanks
Original updated with some changes below
This will give you a button per subfolder which will then do a slideshow based on that folder
this gets a list of sub folders
Code: Select all
var directories = "" + comonFunctions.ListSubFolders("", false);
var dirList = directories.split(",");
This gets a list of files for a sub folder and creates an array
Fix path will substitute the correct separator for mac, linux or windows
Code: Select all
var files = "" + guide.listFiles(directory);
var fileList = files.split(",");
for (index = 0; index < fileList.length; ++index) {
fileList[index] = guide.fixPath(directory + "/" + fileList[index]);
}
scriptVars.put("fileList", fileList);
Full listing of it in action
Code: Select all
<?xml version="1.0"?>
<Tease scriptVersion="v0.1" id="">
<Title>gn</Title>
<Url>
</Url>
<Author id="">
<Name>
</Name>
<Url>
</Url>
</Author>
<MediaDirectory>gn</MediaDirectory>
<Settings>
<AutoSetPageWhenSeen>false</AutoSetPageWhenSeen>
</Settings>
<Pages>
<Page id="start">
<Text>
<DIV>
</DIV>
</Text>
<Button target="Page1">Continue</Button>
<javascript><![CDATA[
function pageLoad() {
//Get a list of files in the current directory
var files = "" + guide.listFiles("");
var fileList = files.split(",");
//Get a list of directories
var directories = "" + comonFunctions.ListSubFolders("", false);
var dirList = directories.split(",");
//loop through the directories and add a button for each directory
for (index = 0; index < dirList.length; ++index) {
//page target Page 1
//Button text dir (directory name)
//set flags none
//unset flage none
//javascript to run when button is clicked startDir passing the directory
//image to display on the button none
overRide.addButton("Page1", dirList[index], "", "", "startDir(" + dirList[index] + ")", "");
}
scriptVars.put("fileList", fileList);
}
function startDir(directory)
{
//Get a list of files in the directory passed in
var files = "" + guide.listFiles(directory);
var fileList = files.split(",");
for (index = 0; index < fileList.length; ++index) {
fileList[index] = guide.fixPath(directory + "/" + fileList[index]);
}
scriptVars.put("fileList", fileList);
}
]]></javascript>
</Page>
<Page id="Page1">
<Text>
<DIV>
</DIV>
</Text>
<Button target="Page1">Continue</Button>
<Delay seconds="(1..4)" target="Page1" style="hidden" />
<javascript><![CDATA[
function pageLoad() {
var fileList = scriptVars.get("fileList");
var last = fileList.length - 1;
var num = guide.getRandom("(" + 0 + ".." + last + ")");
var file = fileList[num];
overRide.setImage(file);
overRide.setHtml("File being displayed is " + file);
fileList.splice(num,1);
scriptVars.put("fileList", fileList);
}
]]></javascript>
</Page>
</Pages>
</Tease>
Re: GuideMe (TeaseMe v2.0): BETA Thread
Posted: Wed Jun 15, 2016 2:33 pm
by philo
Trusfrated wrote:Shattered wrote:How do I get sound to work? I'm using MWTEdit from the teaseme thread but once I choose the mp3 I don't know how to get it to play in the application...
There is a Play Audio (and Stop) button on the Page View tab, in the upper right corner. It's greyed-out unless the page has an mp3 selected.
To truly preview the tease with audio though, I'd use TeaseMe or GuideMe. MWTEdit doesn't really have much of a preview mode, other than Page View.
Yes the preview is only meant to give you a basic idea, you would need to run it in teaseme / guideme to test it.
One thing to be aware of is the editor loads the xml file and then overwrites it when it saves.
If it is a guideme tease then it will probably lose any of the new guideme nodes in the xml.
I am planning at some point to at least get it to ignore guideme stuff and just re-save it, but currently if it is guideme specific you would probably lose it if you loaded and saved in the editor
Re: GuideMe (TeaseMe v2.0): BETA Thread
Posted: Fri Jun 17, 2016 1:07 am
by wheresmything
Philo,
First, thanks for the help, I've never been able to make sense of Javascript. If it were .Net, I'd probably be fine from the start

Anyway, this last version works as designed, but isn't quite what I'm going for, I presume I haven't explained clearly, so let me try now.
I have 3 folders, UberFavs, Favs, and Regular into which I have separated various captioned images. In what I currently have, I've called a random image from one of the directories thus:
Code: Select all
<Page id="p1">
<Text>Uberfaves</Text>
<Image id="UberFavs/*.jpg" />
<Button target="Chooser(1..6)">Next</Button>
</Page>
<Page id="p2">
<Text>Faves</Text>
<Image id="Favs/*.jpg" />
<Button target="Chooser(1..6)">Next</Button>
</Page>
<Page id="p3">
<Text>Reg</Text>
<Image id="Regular/*.jpg" />
<Button target="Chooser(1..6)">Next</Button>
</Page>
The 6 chooser pages that the button calls to simply make a random call back to one of the 3 pages above after 0 delay (so the chooser pages are never seen). Because of the additional chooser pages, I'm able to weight the 3 folders so that Uber has a 50% chance of being pulled, Favs has a 33% chance, and Regular has a 17% chance. This allows me to make sure that my more favorite ones are selected more often than others - but that the sequence is alternating between all 3 folders. What I'm hoping to achieve with the rework of the script is adding the image file name to the text field, and preventing the same image from being displayed twice in the same session.
My thought would be to have the onload function create three distinct arrays (one for each of the statically named folders), then each of the 3 pages that display images could draw from and modify the specific array related to that page. However, I don't know if that's possible in Javascript. Or perhaps there's a better way to achieve this? I don't know.
Again, thanks for the help, I really appreciate it.
Re: GuideMe (TeaseMe v2.0): BETA Thread
Posted: Fri Jun 17, 2016 1:21 pm
by philo
wheresmything wrote:
The 6 chooser pages that the button calls to simply make a random call back to one of the 3 pages above after 0 delay (so the chooser pages are never seen). Because of the additional chooser pages, I'm able to weight the 3 folders so that Uber has a 50% chance of being pulled, Favs has a 33% chance, and Regular has a 17% chance. This allows me to make sure that my more favorite ones are selected more often than others - but that the sequence is alternating between all 3 folders. What I'm hoping to achieve with the rework of the script is adding the image file name to the text field, and preventing the same image from being displayed twice in the same session.
My thought would be to have the onload function create three distinct arrays (one for each of the statically named folders), then each of the 3 pages that display images could draw from and modify the specific array related to that page. However, I don't know if that's possible in Javascript. Or perhaps there's a better way to achieve this? I don't know.
Again, thanks for the help, I really appreciate it.
Try this
It creates an array from each static folder and deletes from the array any that do not end in .jpg
It adds the directory for each file
It then generates a random number between 1 and 100 and chooses the folder based on the random number
It uses the chosen folder to get a file or returns to the start page if it runs out of pictures in any of the arrays
Code: Select all
<?xml version="1.0"?>
<Tease scriptVersion="v0.1" id="">
<Title>gn</Title>
<Url>
</Url>
<Author id="">
<Name>
</Name>
<Url>
</Url>
</Author>
<MediaDirectory>gn</MediaDirectory>
<Settings>
<AutoSetPageWhenSeen>false</AutoSetPageWhenSeen>
</Settings>
<Pages>
<Page id="start">
<Text>
<DIV>
</DIV>
</Text>
<Button target="Page1">Continue</Button>
<javascript><![CDATA[
function pageLoad() {
//Get a list of files in the directory passed in
var files = "" + guide.listFiles("Regular");
var regularFileList = files.split(",");
jscriptLog("regularFileList: " + regularFileList);
for (index = regularFileList.length - 1; index >= 0; --index) {
if (regularFileList[index].substr(regularFileList[index].length - 4).toLowerCase() == ".jpg")
{
jscriptLog("add: " + regularFileList[index]);
regularFileList[index] = guide.fixPath("Regular/" + regularFileList[index]);
}
else
{
jscriptLog("remove: " + regularFileList[index]);
regularFileList.splice(index,1);
}
}
scriptVars.put("regularFileList", regularFileList);
var files = "" + guide.listFiles("Favs");
var favFileList = files.split(",");
jscriptLog("favFileList: " + favFileList);
for (index = favFileList.length - 1; index >= 0; --index) {
if (favFileList[index].substr(favFileList[index].length - 4).toLowerCase() == ".jpg")
{
jscriptLog("add: " + favFileList[index]);
favFileList[index] = guide.fixPath("Favs/" + favFileList[index]);
}
else
{
jscriptLog("remove: " + favFileList[index]);
favFileList.splice(index,1);
}
}
scriptVars.put("favFileList", favFileList);
var files = "" + guide.listFiles("UberFavs");
var uberFavFileList = files.split(",");
jscriptLog("uberFavFileList: " + uberFavFileList);
for (index = uberFavFileList.length - 1; index >= 0; --index) {
if (uberFavFileList[index].substr(uberFavFileList[index].length - 4).toLowerCase() == ".jpg")
{
jscriptLog("add: " + uberFavFileList[index]);
uberFavFileList[index] = guide.fixPath("UberFavs/" + uberFavFileList[index]);
}
else
{
jscriptLog("remove: " + uberFavFileList[index]);
uberFavFileList.splice(index,1);
}
}
scriptVars.put("uberFavFileList", uberFavFileList);
}
]]></javascript>
</Page>
<Page id="Page1">
<Text>
<DIV>
The file name is <span>DisplayFileName</span>
</DIV>
<DIV>
Percent <span>Percent</span>
</DIV>
<DIV>
File Number <span>FileNumber</span>
</DIV>
<DIV>
Files Left <span>FilesLeft</span>
</DIV>
</Text>
<Button target="Page1">Continue</Button>
<Delay seconds="(1..4)" target="Page1" style="hidden" />
<javascript><![CDATA[
function pageLoad() {
var rand = guide.getRandom("(1..100)");
var arrayName = "";
switch (true)
{
case rand > 50:
arrayName = "uberFavFileList";
break;
case rand > 17:
arrayName = "favFileList";
break;
default:
arrayName = "regularFileList";
break;
}
var fileList = scriptVars.get(arrayName);
if (fileList.length > 0)
{
var last = fileList.length - 1;
var num = guide.getRandom("(" + 0 + ".." + last + ")");
var file = fileList[num];
overRide.setImage(file);
scriptVars.put("DisplayFileName", file);
scriptVars.put("Percent", rand);
scriptVars.put("FileNumber", num);
fileList.splice(num,1);
scriptVars.put("FilesLeft", fileList.length );
scriptVars.put(arrayName, fileList);
}
else
{
overRide.setPage("start");
}
}
]]></javascript>
</Page>
</Pages>
</Tease>
Re: GuideMe (TeaseMe v2.0): BETA Thread
Posted: Wed Jun 29, 2016 1:16 am
by wheresmything
OK, spoke too soon before, still having some trouble with it. Checked the logs and I see this:
2016-06-28 21:12:32,171 INFO Jscript - add: tumblr_o7pey9AYDF1u84aw1o1_1280.jpg
2016-06-28 21:12:32,173 ERROR Jscript - JavaScriptError line 10 column 0 Source null error Wrapped java.lang.StringIndexOutOfBoundsException: String index out of range: -1 (script#10)
After that, the script dies and nothing more happens. This leads me to wonder if there is a maximum length to either the filename or the number of files that can be in the folder. As you can see, the file names can be very long, and I have upwards of 2K jpgs in the folder.
Re: GuideMe (TeaseMe v2.0): BETA Thread
Posted: Wed Jun 29, 2016 8:37 am
by philo
wheresmything wrote:OK, spoke too soon before, still having some trouble with it. Checked the logs and I see this:
2016-06-28 21:12:32,171 INFO Jscript - add: tumblr_o7pey9AYDF1u84aw1o1_1280.jpg
2016-06-28 21:12:32,173 ERROR Jscript - JavaScriptError line 10 column 0 Source null error Wrapped java.lang.StringIndexOutOfBoundsException: String index out of range: -1 (script#10)
After that, the script dies and nothing more happens. This leads me to wonder if there is a maximum length to either the filename or the number of files that can be in the folder. As you can see, the file names can be very long, and I have upwards of 2K jpgs in the folder.
Some where in the region of 2,147,483,647 so 2,000 is probably ok.
Looks like a weird error because it thinks the element in the array that gets printed out in the INFO line then doesn't exist for the next line.
would need more of the log files to try to work out what was going on.
If you want to upload them somewhere and pm me a link I will have a look.
Re: GuideMe (TeaseMe v2.0): BETA Thread
Posted: Fri Jul 08, 2016 4:17 pm
by the_big_teaser
philo wrote:the_big_teaser wrote:This is a great resource. Is it possible to provide a button on a tease page that would pause the video for a set amount of time?
At the moment you can probably do it via javascript and reloading the page.
but it would be a bit complicated.
it is a good idea though so I will look at adding it in to be able to pause and restart video
Dear Philo
I wonder if any progress has been made with this - I can't get it to work with javascript and reloads and I wonder if you've put anything that works. I think you're programme is great but this would be a bonus. If there is something could you give a bit of code that I could use
Thanks
Blackjack - A New Guideme tease
Posted: Fri Jul 08, 2016 6:36 pm
by PlayfulGuy
Hi all,
I just posted a new tease for Guideme. The thread is here :
Blackjack for Guideme.
Check it out and leave any feedback in that thread please.
Philo - please add this to the list of Guideme teases in this thread.
Anyone is welcome to use any elements of the code or tease in their own projects.
PG
Re: GuideMe (TeaseMe v2.0): BETA Thread
Posted: Sat Jul 09, 2016 6:44 pm
by greentack
So I seem to have a problem, after downloading the latest version of GuideMe, I open it up and double click start.bat but it only opens a command prompt for a split second then automatically closes it.
Anyone know a fix for this?
Thanks
Re: GuideMe (TeaseMe v2.0): BETA Thread
Posted: Sat Jul 09, 2016 10:52 pm
by lestrian
run the bat file in a command prompt to see what errors you get. you do it like this: press ctrl+shift and right-click the folder the bat file is in, click "open command window here" and once you're in there, type the name of the bat file and press enter.
Re: GuideMe (TeaseMe v2.0): BETA Thread
Posted: Mon Jul 11, 2016 5:57 am
by philo
the_big_teaser wrote:philo wrote:the_big_teaser wrote:This is a great resource. Is it possible to provide a button on a tease page that would pause the video for a set amount of time?
At the moment you can probably do it via javascript and reloading the page.
but it would be a bit complicated.
it is a good idea though so I will look at adding it in to be able to pause and restart video
Dear Philo
I wonder if any progress has been made with this - I can't get it to work with javascript and reloads and I wonder if you've put anything that works. I think you're programme is great but this would be a bonus. If there is something could you give a bit of code that I could use
Thanks
Have not had a chance to look at it yet.
I have been working on integrating the javascript debugger into guideme, it lets you step through java script and see the values of variables.
When I get that working I will look at the video stuff.
Re: GuideMe (TeaseMe v2.0): BETA Thread
Posted: Mon Jul 11, 2016 6:02 am
by philo
greentack wrote:So I seem to have a problem, after downloading the latest version of GuideMe, I open it up and double click start.bat but it only opens a command prompt for a split second then automatically closes it.
Anyone know a fix for this?
Thanks
If you delete all the log files in the log directory then start guideme then look in the guideme.log file it may give you an idea why.
Or you can upload the log file somewhere and pm me a link. Mega.nz is probably the easiest for me.
Re: GuideMe (TeaseMe v2.0): BETA Thread
Posted: Thu Jul 14, 2016 4:18 pm
by greentack
philo wrote:greentack wrote:So I seem to have a problem, after downloading the latest version of GuideMe, I open it up and double click start.bat but it only opens a command prompt for a split second then automatically closes it.
Anyone know a fix for this?
Thanks
If you delete all the log files in the log directory then start guideme then look in the guideme.log file it may give you an idea why.
Or you can upload the log file somewhere and pm me a link. Mega.nz is probably the easiest for me.
That seemed to fix it, thanks!