FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Trying to run a program

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


Joined: 23 Aug 2007
Posts: 5

PostPosted: Thu Aug 23, 2007 5:03 am    Post subject: Trying to run a program Reply with quote

Ok so I am still new to all of this Codeing and what not but so far It seems I have everything right but it still wont launch the program lol... SO thought I would just ask, Here is the code I have so far for the .js file

var helper = new ActiveXObject("SCHelper.SECHelper");
if (helper.IsProcessRunning("E:\\Program Files\World of Warcraft\WoW.exe")) {
launchWidget();
} else {
var launchQuestion = CreateQuestionDialog("launch_");
launchQuestion.textualContent = "Launch WoW?";
theTerminal.Push(launchQuestion);
}


And this is what I have for my Menu .XML file


<?xml version="1.0" encoding="utf-8"?>

<ClickerScript>
<Path>WoW.js</Path>
<Author>Salling Software AB</Author>
<Category>WoW</Category>
<Description></Description>
<UUID>138f5986-5123-11dc-8314-0800200c9a66</UUID>
<Title>WoW</Title>
<Type>ClickerItem</Type>
<URL>http://clicker.salling.com</URL>
<Version>3.5</Version>
</ClickerScript>


SO any help would be sweet if its really screwed up please tell me so I can learn more

Thomas[/code]
Back to top
View user's profile Send private message
Runarius
Senior Member


Joined: 19 Nov 2006
Posts: 124

PostPosted: Thu Aug 23, 2007 9:42 am    Post subject: Reply with quote

var helper = new ActiveXObject("SCHelper.SECHelper");

[code:1]if (helper.IsProcessRunning("WoW.exe"))
{
launchWidget();
}
else
{
var widget = CreateQuestionDialog( "launcher_" );
widget.textualContent = "Launch World of Warcraft, the crappiest game ever made? Seriously I hate this game. Everybody in my class a few years ago were talking about it all the time, in their own WoW-language. Screw WoW?";
theTerminal.Push( widget );

}




// Launcher function to Launch MediaPortal
function launcher_OK(w)
{
new ActiveXObject("Shell.Application").ShellExecute( "E:\\Program Files\World of Warcraft\WoW.exe", "" );
launchWidget();
}[/code:1]

hope this helps though
Back to top
View user's profile Send private message
vwmomo
Newbie


Joined: 23 Aug 2007
Posts: 5

PostPosted: Fri Aug 24, 2007 1:18 am    Post subject: Still not working Reply with quote

Didnt work I copied everything you did and still didnt work and it stopped asking me on my phone if I want to launch or not ....

[code:1] if (helper.IsProcessRunning("WoW.exe"))
{
launchWidget();
}
else
{
var widget = CreateQuestionDialog( "launcher_" );
widget.textualContent = "Launch WoW?";
theTerminal.Push( widget );

}




// Launcher function to Launch MediaPortal
function launcher_OK(w)
{
new ActiveXObject("Shell.Application").ShellExecute( "E:\\Program Files\World of Warcraft\WoW.exe", "" );
launchWidget();
}[/code:1]
Back to top
View user's profile Send private message
melquiades
Junior Member


Joined: 24 Nov 2006
Posts: 50
Location: Washington, DC

PostPosted: Sat Aug 25, 2007 5:18 am    Post subject: Reply with quote

Check your slashes.... The path should be:
E:\\Program Files\\Wor ld of Warcraft\\WoW.exe", "" );

and not

E:\\Program Files\World of Warcraft\WoW.exe", "" );

Mel
Back to top
View user's profile Send private message
melquiades
Junior Member


Joined: 24 Nov 2006
Posts: 50
Location: Washington, DC

PostPosted: Sat Aug 25, 2007 5:22 am    Post subject: Reply with quote

Or, try this...
//=============================
function getAppPath()

{
var path = "E://Program Files//World of Warcraft//WoW.exe";
return path;
}

function launch()

{ var shell = new ActiveXObject("Shell.Application");
shell.ShellExecute(getAppPath(), "" )
}
launch();
//=============================

Mel
Back to top
View user's profile Send private message
vwmomo
Newbie


Joined: 23 Aug 2007
Posts: 5

PostPosted: Sat Aug 25, 2007 5:27 am    Post subject: Sweet thank you Reply with quote

Yep It worked thanks again.. I had to add the Double slashes...
This program is freaking sweet. Now trying to get the Xbox360 media center controls to work...
Still Learning,
Thomas
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