Zoklet.net

Go Back   Zoklet.net > Technology > Network Security & Hacking

Reply
 
Thread Tools
  #1  
Old 02-22-2009, 03:03 PM
Bender's Avatar
Bender Bender is offline
Marquis
 
Join Date: Jan 2009
Location: Bite my shiney metal ass.
Thanks: 274
Thanked 217 Times in 161 Posts
Default Need help writing a simple BAT file

Ok, I'm not a scripter I never scripted a line of code in my life so bear with me.
I need a simple BAT file that will shutdown 2 programs and restart a game. This is for if the game crashes it will do what task manager does and ends both processes and then restart the game, this is what my friend wrote, and it doesn't work.

I think I'm just having trouble on the restart of the game part.


Code:
tskill hl2
tskill GameOverlayUI
START C:\Progra~1\Steam\Steam.exe -applaunch 320
__________________
When you kill a king, you don't stab him in the dark.
You do it where there whole court can watch him die.
Reply With Quote
  #2  
Old 02-23-2009, 03:54 PM
Dr Gonzo Dr Gonzo is offline
Wealthy Merchant
 
Join Date: Jan 2009
Thanks: 37
Thanked 21 Times in 20 Posts
Default Re: Need help writing a simple BAT file

Well run through the problem line by line:

tskill hl2 - Does this end the app you wanted it to?
tskill GameOverlayUI - Does this end what you want it to?

I see no reason why they shouldn't, so I'll presume they are working correctly.

The next thing you want to do, is run your game.

'START' is the correct command to run here, but Instead of just running the .exe for the game, you're trying to process the launch through steams own application launcher?

I don't have steam myself, but I was under the impression that this was unnecesary. Back when I had CS installed, I could just
Code:
win + R > cs > enter
(due to the environment variables I had set up.)

I know you need to login to Steam, but if Steam is already running (you haven't tskill'ed it anyway), then why don't you just START the .exe itself?

If you are logged out of steam, then just add another line onto the BAT that logs you back in.
Reply With Quote
  #3  
Old 02-23-2009, 11:47 PM
VolatileShiftInPersona VolatileShiftInPersona is offline
Member
 
Join Date: Jan 2009
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Need help writing a simple BAT file

Don't you need to affix .exe to hl2 and GameOverLayUI?
Reply With Quote
  #4  
Old 02-24-2009, 10:09 AM
Dr Gonzo Dr Gonzo is offline
Wealthy Merchant
 
Join Date: Jan 2009
Thanks: 37
Thanked 21 Times in 20 Posts
Default Re: Need help writing a simple BAT file

Quote:
Originally Posted by VolatileShiftInPersona View Post
Don't you need to affix .exe to hl2 and GameOverLayUI?
Nope, try it yourself. Open up notepad, then navigate to CMD, and 'tskill notepad'.
Reply With Quote
  #5  
Old 02-24-2009, 10:40 AM
Bender's Avatar
Bender Bender is offline
Marquis
 
Join Date: Jan 2009
Location: Bite my shiney metal ass.
Thanks: 274
Thanked 217 Times in 161 Posts
Default Re: Need help writing a simple BAT file

Quote:
Originally Posted by Dr Gonzo View Post
Well run through the problem line by line:

tskill hl2 - Does this end the app you wanted it to?
tskill GameOverlayUI - Does this end what you want it to?

I see no reason why they shouldn't, so I'll presume they are working correctly.

The next thing you want to do, is run your game.

'START' is the correct command to run here, but Instead of just running the .exe for the game, you're trying to process the launch through steams own application launcher?

I don't have steam myself, but I was under the impression that this was unnecesary. Back when I had CS installed, I could just
Code:
win + R > cs > enter
(due to the environment variables I had set up.)

I know you need to login to Steam, but if Steam is already running (you haven't tskill'ed it anyway), then why don't you just START the .exe itself?

If you are logged out of steam, then just add another line onto the BAT that logs you back in.

Thanks so what I can see from what you posted it should be?


Code:
tskill hl2
tskill GameOverlayUI
START hl2.exe
I have auto login so as soon as Steam starts up i'm good to go. Well wouldn't it be easier to do the exe, beacuse if I ran the program it automatically starts Steam to run it anyhow. I'll give that code a try.
__________________
When you kill a king, you don't stab him in the dark.
You do it where there whole court can watch him die.
Reply With Quote
  #6  
Old 02-24-2009, 10:58 AM
Bender's Avatar
Bender Bender is offline
Marquis
 
Join Date: Jan 2009
Location: Bite my shiney metal ass.
Thanks: 274
Thanked 217 Times in 161 Posts
Default Re: Need help writing a simple BAT file

EDIT

tskill hl2
tskill GameOverlayUI
START G:\steam\Steam.exe -applaunch 320

Success. Now phase two of my nooby scripting quest. How can I bind this to a key combination?
__________________
When you kill a king, you don't stab him in the dark.
You do it where there whole court can watch him die.
Reply With Quote
  #7  
Old 02-24-2009, 04:03 PM
Dr Gonzo Dr Gonzo is offline
Wealthy Merchant
 
Join Date: Jan 2009
Thanks: 37
Thanked 21 Times in 20 Posts
Default Re: Need help writing a simple BAT file

Right click the .bat, 'Copy', then right click somewhere else, and 'Paste Shortcut'.

Press ALT + Enter on the shortcut, then navigate to the "Shortcut" tab. Once in there you will see an input box for Keyboard Shortcut. Just click in there, and press the desired combination.
Reply With Quote
The following users say "It is so good to hear it!":
Zok (02-25-2009)
  #8  
Old 02-24-2009, 10:02 PM
Bender's Avatar
Bender Bender is offline
Marquis
 
Join Date: Jan 2009
Location: Bite my shiney metal ass.
Thanks: 274
Thanked 217 Times in 161 Posts
Default Re: Need help writing a simple BAT file

Quote:
Originally Posted by Dr Gonzo View Post
Right click the .bat, 'Copy', then right click somewhere else, and 'Paste Shortcut'.

Press ALT + Enter on the shortcut, then navigate to the "Shortcut" tab. Once in there you will see an input box for Keyboard Shortcut. Just click in there, and press the desired combination.
Awesome TYVM.
__________________
When you kill a king, you don't stab him in the dark.
You do it where there whole court can watch him die.
Reply With Quote
Reply

Bookmarks

Tags
bat, file, simple, writing

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:35 AM.


Hot Topics
On IRC
Users: 4
Messages/minute: 0
Topic: "http://www.zoklet.net/..."
Users: 21
Messages/minute: 0
Topic: "ask ibm why atlantis is real"
Users: 9
Messages/minute: 0
Topic: "So wie ich die sache sehe ist die intelligenz bereits ausgerot..."
Advertisements
Your ad could go right HERE! Contact us!

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.