Page 1 of 1

How to launch both SA-MP and your Keybinder in one click

Posted: July 18th, 2017, 1:24 pm
by Doodly
I've wanted to do this for a while now, and I finally got around to it.
My goal was to create a simple script that launches both my client and my keybinder with only one icon, thus reducing the need for me to open a folder or to click two icons. Usability > Effort

If you have any questions, feel free to ask here or in PM.

Showcase:
Image
This is the only SA-MP related icon I have on my desktop, yet by clicking it, both my client and keybinder will open.



How to:
  1. Move your SA-MP shortcut and your Keybinder to where you want them to be (preferrably not on the desktop)
  2. Open Notepad (or notepad++)
  3. Copy the below script into it
  4. Copy the path to your SA-MP shortcut/exe by holding SHIFT and then Right Mouse Button on it, select 'copy as path' or the likes.
  5. Paste this path (with quotation marks) after the first start ""
  6. Copy the path to your Keybinder shortcut/exe by holding SHIFT and then Right Mouse Button on it, select 'copy as path' or the likes.
  7. Paste this path (with quotation marks) after the second start "". This one has the command /min to start your keybinder minimized.
  8. Save the file somewhere as xxx.vbs
Your code should look similar to this:
Spoiler

Code: Select all

@echo off
echo Booting San Andreas Multiplayer
start "" "C:\Users\Bram-DESKTOP\Documents\San Andreas Multiplayer\samp.exe - Snelkoppeling.lnk"
echo Booting Ultimate San Andreas Keybinder
start /min "" "C:\Users\Bram-DESKTOP\Documents\San Andreas Multiplayer\Ultimate SAMP KeyBinder.exe"
exit
The echos are there so you get some nice text in the command window that pops up. You could add a 'ping 127.0.0.1 > NUL' before the exit line if you want the command window to stay open a bit longer.

Pro tip:
I saved the VBS file in my documents and made a shortcut to it on my desktop, this way I could put a custom .ico, where I put the original San Andreas Logo.



Clean code:

Code: Select all

@echo off
echo Booting San Andreas Multiplayer
start "" SAMP_PATH
echo Booting Ultimate San Andreas Keybinder
start /min "" KEYBINDER_PATH
PING 127.0.0.1 > NUL
exit
End result:
Spoiler
Image

Re: How to launch both SA-MP and your Keybinder in one click

Posted: July 18th, 2017, 1:28 pm
by frozen
is it really needed XD
nice tho

Re: How to launch both SA-MP and your Keybinder in one click

Posted: July 18th, 2017, 1:30 pm
by Spec
Nice one. Now instead of two clicks I can play with one.. hehe

Re: How to launch both SA-MP and your Keybinder in one click

Posted: July 18th, 2017, 1:32 pm
by Bojan_Smith
Can you teach us how to make Egg in a bottle?
lol these are sick stuff.

Re: How to launch both SA-MP and your Keybinder in one click

Posted: July 18th, 2017, 1:42 pm
by Kai
Bojan_Smith wrote:Can you teach us how to make Egg in a bottle?
lol these are sick stuff.
.........?

Re: How to launch both SA-MP and your Keybinder in one click

Posted: July 18th, 2017, 2:58 pm
by Doodly
Kai wrote:
Bojan_Smith wrote:Can you teach us how to make Egg in a bottle?
lol these are sick stuff.
.........?
Yeah you boil an egg then peel it, put a match in a bottle and the peeled egg on top. The vacuum created by the match will suck it in... How is this relevant again? xd

Re: How to launch both SA-MP and your Keybinder in one click

Posted: July 18th, 2017, 4:01 pm
by -Hopsin-
Hackerman doodly 1337

Re: How to launch both SA-MP and your Keybinder in one click

Posted: July 18th, 2017, 4:17 pm
by Darkel
Good effort.

Re: How to launch both SA-MP and your Keybinder in one click

Posted: July 18th, 2017, 5:30 pm
by Bojan_Smith
BramofDoom wrote:
Kai wrote:
Bojan_Smith wrote:Can you teach us how to make Egg in a bottle?
lol these are sick stuff.
.........?
Yeah you boil an egg then peel it, put a match in a bottle and the peeled egg on top. The vacuum created by the match will suck it in... How is this relevant again? xd


OK THANK YOU XD

Re: How to launch both SA-MP and your Keybinder in one click

Posted: July 18th, 2017, 6:51 pm
by Neo
What are you, God of laziness?