FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Error calling Vbs

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


Joined: 13 Jul 2007
Posts: 2
Location: The Netherlands

PostPosted: Fri Jul 13, 2007 8:32 pm    Post subject: Error calling Vbs Reply with quote

Hey,

I've got a problem when calling a vbs script! :(
Sad
this is the code that should call/start a vbs file in the same directory...

Filename:[u]callvbs.js[/u]
[code:1]
function EnteringProximity(theTerminal)
{
var wsh = new ActiveXObject('WScript.Shell')
if( wsh ) {
wsh.Run("\"" + resourcesPath + "\play.vbs");
}

}[/code:1]

Could someone please tell me whats wrong with this script? :D
Very Happy

Thanx 'n Greetz, Stiruam
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
salling
Site Admin


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

PostPosted: Sat Jul 14, 2007 5:53 pm    Post subject: Reply with quote

Watch your quotes and backslashes:

wsh.Run("\"" + resourcesPath + "\play.vbs");

Should probably be:

wsh.Run("\"" + resourcesPath + "\\play.vbs\"");

Best.
--
Jonas
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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