FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Sleep ?

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


Joined: 15 Nov 2005
Posts: 11

PostPosted: Fri Nov 25, 2005 4:30 pm    Post subject: Sleep ? Reply with quote

What can i do that the following works

WScript.Sleep(500);

Or is it possible to start a Programm synchron?

Thanks Ralf
Back to top
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Fri Nov 25, 2005 4:33 pm    Post subject: Re: Sleep ? Reply with quote

Avoid stalling the scripts. Scripts should handle their tasks as quickly as possible; otherwise the user will think the application has hung.

What are you trying to do?

Best.
--
Jonas

[quote="schiefersoft"]What can i do that the following works

WScript.Sleep(500);

Or is it possible to start a Programm synchron?

Thanks Ralf[/quote]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
schiefersoft
Newbie


Joined: 15 Nov 2005
Posts: 11

PostPosted: Fri Nov 25, 2005 4:51 pm    Post subject: Reply with quote

yes i know but i must use a command line tool
the command line tool writes a file in this file are the informations fo the new Menu
but the commandline needs about 1 second for his job and so the informations in the menu are not actual

new ActiveXObject("Shell.Application").ShellExecute( PMPath, "-info" );
var SocketName = new Array();
var browser = CreateListScreen( "browser_");
browser.name = "Sockets";
browser.title = "Switch Sockets";
var items = new Array();
var fso = new ActiveXObject( 'Scripting.FileSystemObject' );
var settingsFileStream = fso.OpenTextFile( InfoFile, 1, false );
{
while(true)
{
var s = settingsFileStream.ReadLine();
if ( s.search("DeviceName=") == 0 )
{
var name = s.split("=")[1];
DeviceName = name;
items.push( "<" + DeviceName +">");
}
if ( s.search("Socket0Name") == 0 )
{
var name = s.split("=")[1];
var s = settingsFileStream.ReadLine();
switchstate = s.split("=")[1];
if ( switchstate =="TRUE" )
{
items.push( name + " OFF");
}else
{
items.push( name + " ON");
}

}
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