two commands at once?

Avatar
Bosf
48 Posts
Posted Feb 28, 2008
I know it sounds insane but-Who have some experience with linux i explain it for him:
when you type
command1 & command2
It do command1 and after it command2.
I have two commands but i want to bind them.And i dont want to press button A and after it B.I want to press A and execute two commands at once.Thank you.
Advertisement
Registered users don’t see ads! Register now!
Avatar
youme
937 Posts
Posted Feb 28, 2008
Replied 53 minutes later
"<command 1> ; wait ; <command 2>"

I think

Avatar
Bosf
48 Posts
Posted Feb 28, 2008
Replied 2 minutes later
yeah thanks but command ; command works too :smile: hey and i want to bind
sv_cheats 1 when its set to 0 and sv_cheats 0 when its set to 1.How?Thanks!
Avatar
rellikpd
1,053 Posts
Posted Feb 28, 2008
Replied 11 minutes later

Bosf wrote:
yeah thanks but command ; command works too :smile: hey and i want to bind
sv_cheats 1 when its set to 0 and sv_cheats 0 when its set to 1.How?Thanks!

i don't know if this works exactly the same, but its how i did it in quake and so far pretty much all the aliasing and binding has been the same for me

alias chON "sv_cheats 1;wait;bind k chOFF"
alias chOFF "sv_cheats 0;wait; bind k chON"
bind k chON

and just change "k" with whatever key you want to use it as

Avatar
Bosf
48 Posts
Posted Feb 28, 2008
Replied 5 minutes later
thanks for alias command.it works bit before i set it-MADNESS!
i use it for turn off hud too.

] alias "hudOFF" "cl_drawhud 0 ; crosshair 0 ; impulse 200 ;bind "tab" "hudON" "
] alias "hudON" "cl_drawhud 1 ; crosshair 1 ; impulse 200 ; bind "tab" "hudOFF" "
] bind "tab" "hudOFF"

LOL

I never want to do it again. :smile: where its saved?

Avatar
rellikpd
1,053 Posts
Posted Feb 28, 2008
Replied 13 minutes later

Bosf wrote:
thanks for alias command.it works bit before i set it-MADNESS!
i use it for turn off hud too.

] alias "hudOFF" "cl_drawhud 0;crosshair 0;impulse 200;bind "tab" "hudON" "
] alias "hudON" "cl_drawhud 1;crosshair 1;impulse 200;bind "tab" "hudOFF" "
] bind "tab" "hudOFF"

LOL

I never want to do it again. :smile: where its saved?

ok in your
C:\Program Files\steam\SteamApps\STEAMID\portal\portal\cfg
directory make a new text file and name it whatever example hudcon.cfg and make sure it saves as a simple ascii-text file. in that file put your commands; example:

alias hudOFF "cl_drawhud 0;crosshair 0;impulse 200;bind tab hudON" 
alias hudON  "cl_drawhud 1;crosshair 1;impulse 200;bind tab hudOFF" 
bind tab hudOFF

then save it
then in the game. type

exec hudcon

and it should help you autotype also

Avatar
Bosf
48 Posts
Posted Feb 28, 2008
Replied 4 hours later
hey but when i ran portal once that alias was not found.Unkown command hudOFF.Waht should i do now?
Avatar
rellikpd
1,053 Posts
Posted Feb 28, 2008
Replied 2 hours later

Bosf wrote:
hey but when i ran portal once that alias was not found.Unkown command hudOFF.Waht should i do now?

follow my instructions.. make a config file in your /portal/cfg directory name it whatever you want (suggest hudcon.cfg) and put all your aliases and binding in there and then when you get in the game just run the config file (use: "exec hudcon") and then everything should be aliased and bound.

Avatar
Bosf
48 Posts
Posted Feb 29, 2008
Replied 12 hours later
i dont want to type it again anda again...When you type
bind key command
After you launch portal once again its not bound.
when you type
bind "key" "command"
It will be bind all the time.
when i type
alias key command
after i launch portal once again its- not aliased.
when i type
alias "key" "command"
after i launch portal once again its- not aliased???Can some comand fix it at all?
Avatar
rellikpd
1,053 Posts
Posted Feb 29, 2008
Replied 1 hour later

Bosf wrote:
i dont want to type it again anda again...When you type
bind key command
After you launch portal once again its not bound.
when you type
bind "key" "command"
It will be bind all the time.
when i type
alias key command
after i launch portal once again its- not aliased.
when i type
alias "key" "command"
after i launch portal once again its- not aliased???Can some comand fix it at all?

ok i already told you. and for the 3rd time. goto your portal/portal/cfg directory (should be something like this)
C:\Program Files\steam\SteamApps\STEAMID\portal\portal\cfg
and ### in that directory make a new text file and name it whatever (example; hudcon.cfg) and make sure it saves as a simple ascii-text file. ### in that file put your commands; example:

alias hudOFF "cl_drawhud 0;crosshair 0;impulse 200;bind tab hudON" 
alias hudON  "cl_drawhud 1;crosshair 1;impulse 200;bind tab hudOFF" 
bind tab hudOFF

then save it

then in the game. type

exec hudcon

and it should help you autotype also

Avatar
Bosf
48 Posts
Posted Feb 29, 2008
Replied 33 minutes later
I KNOW THAT! But i dont want to type exec hud again.
Avatar
rellikpd
1,053 Posts
Posted Feb 29, 2008
Replied 9 minutes later

Bosf wrote:
I KNOW THAT! But i dont want to type exec hud again.

then rename the file to
autoexec.cfg **
and it
"should"
excecute when you start the game...
but really whats so hard about typing exec hudcon ? lol that way you have have multiple bindings set up to the same/different keys and just exec whatever config you need to fit your situation :razz: but if thats all you want. then just renamewhatever config you have your hud setup stuff in to autoexec.cfg

Avatar
Bosf
48 Posts
Posted Feb 29, 2008
Replied 24 minutes later
no it isnt but i always forgot it.I run fraps,prepare room for making movie(Camera,ACTION :smile: ) and i do it.Okay stop fraps and run once again.Then i want some scene without portalgun.Recording-i press tab-nothing matters.Its annyoning.
Advertisement
Registered users don’t see ads! Register now!
Avatar
msleeper
4,136 Posts
Admin
Posted Feb 29, 2008
Replied 6 hours later
:sigh: