!execute with parameters? Thread last updated on 2004-01-22 19:41:42

Posted by member 84122 on 2004-01-20 04:08:03

Hi,

I don't like having to right-click then go to 'programs' in litestep just to access my game shortcuts, so I've decided to hard-code them into popup.rc.

I know how to do it, but I can't seem to get it to execute hl.exe with certain parameters, ie. '-game cstrike'.

Can anyone shed some light on this little problem?

I've tried doing...

*Popup !execute ["C:\Games\Half-Life\hl.exe" "-game cstrike"]

to no avail, and I don't think it's a problem with the directory length, because it launches Half-Life just fine.

Thanks for any help :)

Posted by member 12798 on 2004-01-20 10:10:18 link

what about
*Popup "entry's name is missing here!" !execute ["C:\Games\Half-Life\hl.exe" "-game cstrike"] ?

Posted by member 12798 on 2004-01-20 13:18:49 link

oh well, i think that missing name wasn't your problem.
try this, worked this way on q3 for me
!execute ["C:\Games\Half-Life\hl.exe" -game cstrike]

Posted by member 36955 on 2004-01-20 16:33:39 link

that second way should work... or you could just create a folder on your hard drive and put shortcuts to all of your commonly used programs in it and call !dynamicfolder to get to them

Posted by member 84122 on 2004-01-20 19:02:03 link

thx for all the help, i was considering doing something like doy said, but I'll just go ahead do what ElkMonster said.

Posted by member 99 on 2004-01-21 10:59:21 link

Or you could just use "C:\Games\Half-Life\hl.exe" -game cstrike since the !execute [] doesn't do anything useful in this case.

Posted by member 36955 on 2004-01-21 23:43:54 link

well... the !execute is useful to make litestep recognize it as one command in something like a .rc file, although just []s or '' by themselves may work, im not sure

Posted by member 99 on 2004-01-22 01:08:31 link

!execute [...] is still two tokens. I'm not so sure about !execute[...] (no space) although I suspect in any cases where that would work, it'd still break at the first space inside the []. But in this case it makes no functional difference.

Posted by member 7 on 2004-01-22 04:46:50 link

If !execute[] actually works it's a bug in GetToken. :P

Posted by member 36955 on 2004-01-22 19:41:42 link

hmmm... i guess thats true(: