FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Font size too big

 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows
View previous topic :: View next topic  
Author Message
masserra
Newbie


Joined: 17 Apr 2008
Posts: 1

PostPosted: Thu Apr 17, 2008 11:00 am    Post subject: Font size too big Reply with quote

Hello everybody, sorry for my english, im italian and dont speak very well.

Im using a script called "open movie" with vlc:

[size=9][color=green]var browsePath = "";

// FileSystemObject for use in this script
var fso = new ActiveXObject( "Scripting.FileSystemObject" );

// Settings (persisted in txt file)
var setting_path = null;

// Read settings for this script
try {
var settingsFileStream = fso.OpenTextFile( settingsPath + "\\settings.txt", 1, false );
if( settingsFileStream == null ) {
// Write defaults
writeSettings();
settingsFileStream = fso.OpenTextFile( settingsPath + "\\settings.txt", 1, false );
}
while( true ) {
var propertyName = settingsFileStream.ReadLine();
var propertyValue = settingsFileStream.ReadLine();
if( propertyName == "setting_path" ) {
browsePath = propertyValue;
}
}
} catch( e ) {
} finally {
if( settingsFileStream != null ) settingsFileStream.Close();
}


launchBrowser();


function writeSettings()
{
try {
var settingsFileStream = fso.CreateTextFile( settingsPath + "\\settings.txt", true ); // overwrite
settingsFileStream.WriteLine( "setting_path" );
settingsFileStream.WriteLine( browsePath );
settingsFileStream.Close();
} catch( e ) {}
}

function launchBrowser()
{
var browser = CreateListScreen( "browser_");
browser.name = "More menu open presentation";
browser.title = "Select File";
browser.selectedItem = 0;
browser.itemLabels = getFolderItems();

theTerminal.Push( browser );
}



function browser_ValueUpdated( browser, property )
{
var path = browser.itemLabels[browser.selectedItem] + "\\";

var newPath = fso.BuildPath( browsePath, path );
newPath = fso.GetAbsolutePathName( newPath );
if( newPath == browsePath ) {
newPath = "";
}

if( fso.FileExists( newPath ) ) {
// Selected a file
var wsh = new ActiveXObject('WScript.Shell');
var VLCPlayerPath = wsh.RegRead("HKLM\\SOFTWARE\\VideoLAN\\VLC\\");
if( VLCPlayerPath != null ) {
new ActiveXObject("Shell.Application").ShellExecute( VLCPlayerPath, "--one-instance \"" + newPath + "\"" );
theTerminal.PopTo( "VLC" );
}
return false;
} else {
// Selected a folder
browsePath = newPath;
writeSettings();
}

browser.itemLabels = getFolderItems();
browser.selectedItem = 0;

// Don't pop browser from stack
return true;
}

function getFolderItems()
{
var items = new Array();

if( browsePath == "" ) {
// Open Presentation
var e = new Enumerator( fso.Drives );
for( ; !e.atEnd(); e.moveNext() ) {
var x = e.item();
items.push( x.DriveLetter + ":" );
}
} else {
items.push("..");

var folder = null;
try {
folder = fso.GetFolder( browsePath );
} catch( e ) {
browsePath = "";
return getFolderItems();
}

var e = new Enumerator( folder.SubFolders );
for( ; !e.atEnd(); e.moveNext() ) {
var x = e.item();
items.push(x.Name);
}

e = new Enumerator( folder.files );
for( ; !e.atEnd(); e.moveNext() ) {
var file = e.item();
var filename = file.Name;
var fileext4 = filename.substr( filename.lastIndexOf("."), 4 ).toLowerCase();
var fileext5 = filename.substr( filename.lastIndexOf("."), 5 ).toLowerCase();
if( fileext4 == ".mpg" || fileext4 == ".avi" || fileext5 == ".mpeg" || fileext5 == ".divx" ) {
items.push( file.Name );
}
}
}

return items;
}[/color][/size]
The character size is very big and i want try to put a little small.

I have found in the Api reference scSmall like parameter but dont work.
seems work only in this way :[[color=green][size=9]widget.CreateRow( "", scCenter, scWrap, scSmall );[/size][/color]]

I have found in the script the function that create the list:

[size=9][color=green]function launchBrowser()
{
var browser = CreateListScreen( "browser_");
browser.name = "More menu open presentation";
browser.title = "Select File";
browser.selectedItem = 0;
browser.itemLabels = getFolderItems();

theTerminal.Push( browser );
}[/color][/size]

sincerly i dont know how to put this parameter or if there's another place where put it.

i've found another reference:

[b][color=green]enumDisplaySize [/color][/b] but i dont know how to use it..

So, somebody can help me?

Thanks a lot for all.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group