Starting an application - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: Starting an application (/showthread.php?tid=70408) Starting an application by tobias on 01-07-2007 at 05:21 AM
quote: How would you start an application not in the default windows directory, like iTunes, XFire, FireFox, etc.? RE: Starting an application by Ash_ on 01-07-2007 at 07:14 AM
i'm not completely sure because i usually use CreateProcess but what happens if you go like. code:would aa.exe run (place it in the directory above the default one, usually just C:/) RE: Starting an application by matty on 01-07-2007 at 07:15 AM
quote: code: Usage: code: RE: Starting an application by tobias on 01-07-2007 at 01:52 PM
Thank you. Now to get to work! RE: Starting an application by hmaster on 01-07-2007 at 02:38 PM
quote: code: RE: Starting an application by tobias on 01-07-2007 at 03:32 PM
Thanks, I'll add that now. RE: Starting an application by foaly on 01-07-2007 at 03:34 PM does the debugger give an error? RE: Starting an application by hmaster on 01-07-2007 at 03:41 PM
quote:The problem is the spaces in the path. I don't know what to replace it with though. I've tried %20 but that didn't work. RE: Starting an application by Eljay on 01-07-2007 at 03:52 PM
quote: you do what you normally would with a path containing spaces, put quotes around it. Which means you can either do this: code:or to simplify things, use single quotes instead of double quotes for the string: code: edit: added red highlighting to show double quotes on second example. edit 2: updated matty's function to support paths containing spaces: code: RE: Starting an application by hmaster on 01-07-2007 at 03:55 PM Thanks for that . RE: Starting an application by deAd on 01-07-2007 at 03:57 PM
It looks like what you're trying to do is run programs based on commands? RE: Starting an application by hmaster on 01-07-2007 at 04:03 PM Or maybe he's making a customizable list where you can add programs for you to quickly open . RE: RE: Starting an application by deAd on 01-07-2007 at 04:07 PM
quote:Yes but that's also quicktext-able, just add a quicktext. For example, if you want to run notepad when you type "/notepad", just make a quicktext that sends "/run notepad" when you send "/notepad"... RE: Starting an application by tobias on 01-08-2007 at 01:32 AM
Okay, I was able to get iTunes to work with this: RE: RE: Starting an application by CookieRevised on 01-08-2007 at 08:09 AM
quote:read the replies: especially http://shoutbox.menthix.net/showthread.php?tid=70...d=775535#pid775535 But also note: quote: ----------------------------------------------------- quote:This is a very big misconception... Both things (having "/" commands, and showing up your commands in the command list window) have got nothing todo with eachother. It is not because your commands are listed in the command list window that they are reconized by Plus! as commands. And vice versa, it is not because your script handles some "/" commands that they are listed in the command list window. The command list window is nothing more than a list of some text, nothing else. Again: both things are totally unrelated. - You can list whatever you want in the command list window using the OnGetScriptCommands() function (though, the text will always be prefixed with "/", eventhough you use "!"). - You can catch whatever you want to trigger something in the ChatWndSendMessage event. Please read the documentation before you start to script, and use it regulary during scripting to look things up. Even for stuff you take for granted. And especially when people give you example code: look up every used statement, function and used method before you implement it so that you fully understand what it does, what it can't do, why it is used and what the implications are. Copying from others will also mean you could copy possible errors... --- To list commands in the command list window, see hmaster's post (and the scripting documentation). To use proper "/" commands instead of "!" commands, do as you normally would. There is absolutely no difference at all*!!! (and see the scripting documentation). * And that is to be taken literally. There is no difference. A properly written ChatWndSendMessage() function should always return an empty string if a command is parsed and handled by your script. No matter how it is formatted, what command you use, what prefix you use or whatever else. Thus this goes for "!" commands too... hence why there is no difference at all. RE: Starting an application by tobias on 01-08-2007 at 04:46 PM
I have read the replies, and they both contain spaces, which is why I'm confused. I did read most of the documentation. I am using ChatWndSendMessage(). I'm not currently on my computer, I'm on a laptop at school with a broken spacebar, so sorry if I missed the spacing on any words. |