Ok so, there's this game I play alot and I don't have a shortcut or anything for it so I usually have to get to it my going through a few folders. I'm wondering if I can make a simple command that'll run the game. I'd also like to do this for a few other programs.
What sort of "command" did you have in mind? You could use Hotkey.dll to create a hotkey to launch the application. Or you could create a shortcut button for it in your theme using shortcut2.dll. Or you could edit popup.rc and create a link for it. Or you could simply create the shortcut icon for it in your .../Start Menu/Programs folder so it appears in the theme popup like other programs.
Oh yea, I'm talking about an !bang command. ;)
make a text file, in the file have
@echo off
start c:\path\filename
end
Save it in your windows directory, name it game.bat, game = game name, or whatever you whant.
when you whant to play it just type game (or whaever) in a command prompt and bada bing!
I use this to launch many things at once too.
.bat files dont suport long file names so "c:\program files\" would look like this "c:\progra~1\" this is only if the path or file name is longer than 8 chars.
hmmm.... there are commandalias like:
*CommandAlias "$programdir$\games\game1\start.exe" "!game1"
for lsxcommand, else you can do things like:
!execute ["$programdir$games\game1\start.exe"]
both are working very well
Hey!
ya learn something new everyday, ^thats way easier^ !
I have some batch files to delete =)
ooops... sorry, the !execute part is just for shortcuts, I'm sorry, so take the commandalias :) *hides*
Hehehe, thanks a bunch. ;)
aquatron, this isn't even related, but .bat files do support long file names. at least in win2k-xp, maybe not in 9x. I have a few I use at work that (among other things) do something with "c:\documents and settings\...". the trick is, if there are any spaces, then it needs to be in quotes. fyi
::noob:: umm where does the commandalias bit go? ::noob::
!execute is only needed when you have two commands you want to group together, or if the command you want starts with a special character like #. I see a lot of people using !execute where it's really unnecessary.
Another way to create bang commands is with mzScript, and you can do a lot with that.
Another question about commands...
How would I go about making a command to open up a folder?
By the way, the command alias didn't work for my game.
!crs "$Documents$\_files\_programs\CH010912\LATEST.exe"
Is the code I put in.
try this: "!crs $Documents$\_files\_programs\CH010912\LATEST.exe", without the quotes. since there's no spaces, you SHOULDN'T need them, and I have had problems before where having quotes stopped the code from working.
to use the commandalias everywhere can be called like:
(code for commandalias)
*CommandAlias "$programdir$\games\game1\start.exe" "game1"
(to call this command)
!command game1
but you have to create the commandalias
or just tie it to a hotkey (assuming you've got hotkey.dll or jkey.dll loaded):
*hotkey WIN G "$programdir$\games\game1\start.exe"
Then just press Winkey and G and you're good to go :)
Just put the hotkey-definition in $PersonalDir$hotkey.rc
And you put this in the lsxcommand in the theme docs, right?
ahm.... you write in any theme based .rc (prefered $themedir$step.rc) the command alias as I wrote (*commandalias)
and if you want to set this (anywhere like shortcuts, labels, scripts) you write the command (!command name)
thats all.
The only thing is, that the lsxcommand has to be loaded ;)
Ok, I just don't get it ;( I've tried the CommandAlias thing but I'm doing something wrong. Can you please guide me like a baby on what to do ;\
What I am seeing here is that some people here type the dirs like "$programdir$\games\game1\start.exe". I don't know how relevant this is, but I recall that you shouldn't put a backslash immediately after an evar. At least if the evar is LS-created and includes the slash itself (most do).
If I remember right, the above would resolve into something like "c:\Program Files\\sumthin"(?), which shouldn't work at all, and the correct would be "$ProgramDir$games\game1\start.exe".
lsdocs, _foug.
$Documents$ is a predefined evar to the My Documents CLSID.
$Documents$ for me is ::{450D8FBA-AD25-11D0-98A8-0800361B1103}
Try a literal path instead. Also try the alias without the exclamation mark (guess: possibly ambiguity).