Page 1 of 1

Project Reality+Mumble 1 shortcut

Posted: 2011-11-13 18:05
by SGT.MARCO
After the release of the new mumble Link below
https://www.realitymod.com/forum/f196-pr-highlights/104754-new-pr-mumble-public-beta.html

Mumble has been much easier to use, Now there is no excuse not to use it because after the initial first time setup mumble is HANDS_FREE but in order to make it easier i used my amateur knowledge of prgramming to create a batch .bat file that could open mumble and PR all in one awesome shortcut.

The goal is that once PR starts Mumble also starts automatically linking you to mumble without picking the server.

THE ISSUE:When i open the shortcut mumble appears to forget it is connected to the PR mumble and i cannot find the proper server. When i start it up regularly it appears to work fine, Not sure if it is a .bat issue or a mumble issue.

I also would like to say that i have only tested this program on Vista and I would like to know if you have the same problem and also if you favor this one .bat file that i have created


1. open notepad: and type this(also note that if your programs are in separate folder locations from where mine were type its location instead)

@echo off
start "" "C:\Program Files\PR Mumble\pr_mumble.exe
start "" "C:\Program Files\EA GAMES\Battlefield 2\mods\pr\pr.exe
exit

2. save file as PR+mumble.bat (that makes it run the code above)

3.find the saved program and create a shortcut and add image if you want its simple

4. click and run it.

NOTE: a Command prompt box will show up for about 2 sec just to run the programs then it will close.

Please let me know if you can make get the mumble part to stay connected to PR and not loose the PR server like min did.

Re: Project Reality+Mumble 1 shortcut

Posted: 2011-11-14 07:36
by LITOralis.nMd
EDIT: I found the solution:

Check the properties of your new PRMumble desktop shortcut....
it already is using command line switches.. which are required to connect to the PRMumble server ....

My .bat file works... you can use the command line switches to auto connect and auto input your username too... follow my example...

Note that I am using a 64bit windows 7 OS so I have " Program Files (x86) "
Note that I am using a separate drive letter for my PR install " Z:\ "
@echo off
start "" "C:\Program Files (x86)\PR Mumble\pr_mumble.exe" mumble://[email protected]:64739/?version=1.2.0 -m
start "" "Z:\Program Files (x86)\EA GAMES\Battlefield 2\mods\pr\pr.exe
exit
Mumble URL - Mumble
Username

Scheme:
mumble://[USERNAME]@[SERVER ADDRESS]:[PORT]/?version=1.2.0

Examples:
mumble://[email protected]/?version=1.2.0
EDIT 2:

I can now create a Catalyst Control Center Preset that launches this .bat file.
SO I can switch back to a single monitor and overclock my GPU before launching PR...
Life is good.


Should be possible to create a small program to
1. detect the PR install directory in the registry,
2. the PRmumble directory in the registry,
3. ask for user input of their PRMumble name just once,
4. then autocreate a batch file on the desktop per each BF2/PR/PRMumble username.

EDIT 3: Found what the -m comand line switch does:

Tips Tricks - Mumble
Run Multiple instances of the Mumble Client

if you start the mumble client with the option -m You are allowed to start an other instance of the client on the same System. Be aware that this switch is unsupported and can cause all kinds of strange behaviours as the two clients still share the same config, database, overlay,.....you get the idea ;-) (especially make sure you don't use volume attenuation^^)

-----------------------------------------------

Original:
mumble accepts command line arguments.
Mumble URL - Mumble

I haven't looked at it yet...

also:

FAQ/English - Mumble

Can I set Mumble to auto-connect to my server when Windows starts?

The easiest way to make Mumble automatically connect to your server is using the Autostart feature Windows offers in the Start menu. Simply create a new Shortcut in the Autostart directory in your start menu, that points to a "mumble://" URL for your server.

Re: Project Reality+Mumble 1 shortcut

Posted: 2011-11-14 08:04
by AfterDune
Is it a copy/paste bug, or did you forget the closing quotes?

@echo off
start "" "C:\Program Files\PR Mumble\pr_mumble.exe"
start "" "C:\Program Files\EA GAMES\Battlefield 2\mods\pr\pr.exe"
exit

Re: Project Reality+Mumble 1 shortcut

Posted: 2011-11-14 13:05
by Adriaan
Nice work Marco and Litoralis, that should come in handy. :)

Re: Project Reality+Mumble 1 shortcut

Posted: 2011-11-14 15:47
by Doc.Pock
Thnx marco and litoralis

Re: Project Reality+Mumble 1 shortcut

Posted: 2011-11-14 19:58
by UTurista
Actually this new mumble is so awesome that I like to run Mumble first then PR ;)

Re: Project Reality+Mumble 1 shortcut

Posted: 2011-11-14 22:59
by Acemantura
O_turista_portugues wrote:Actually this new mumble is so awesome that I like to run Mumble first then PR ;)
Anyone ever tell you youre a dork? If not, they should start ;)

Re: Project Reality+Mumble 1 shortcut

Posted: 2011-11-16 00:32
by SGT.MARCO
thanks Litoralis, i am on phase 2 which is finding a way so that the application will be found first then ran so that it can be a universal file and not translated for every computer, Not sure if possible tho. well we will keep in touch you know more about it than i do

Re: Project Reality+Mumble 1 shortcut

Posted: 2011-11-16 05:44
by PricelineNegotiator
I was talking with Marco earlier and I'll talk to some of my friends that know C++ and java. I know how it would be done, but I cannot do it as my knowledge of the actual code is lacking. I'll be in contact with Marco as I really want this to be included in the next release so we can basically force people to be on mumble at all times. The only thing we have to worry about is them configuring mumble after they install it.

Re: Project Reality+Mumble 1 shortcut

Posted: 2011-11-16 06:46
by AfterDune
Could also use vbscript to do that. Something like this, though should be extended (Steam, for example):

Code: Select all

Function vbGetBF2Path()
	vbGetBF2Path = False
	
	On Error Resume Next

	reg32 = "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\EA Games\Battlefield 2\InstallDir"
	reg64 = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Electronic Arts\EA Games\Battlefield 2\InstallDir"

	Set s = CreateObject("Wscript.shell")
	BF2PATH = s.RegRead(reg32)
	If BF2PATH <> "" Then
		vbGetBF2Path = True
	Else
		BF2PATH = s.RegRead(reg64)
		If BF2PATH <> "" Then
			vbGetBF2Path = True
		End If
	End If
End Function

Instead of a .bat file, create a .hta file. This is an html file, but with more rights. You can run vbscript and from there execute applications. And if someone wants to see what goes on in the background, he can just view the scripts, so nothing to hide there.



Oh well. Whatever you guys come up with, I'm sure it's useful for the public :) .

Re: Project Reality+Mumble 1 shortcut

Posted: 2011-11-17 05:04
by SGT.MARCO
@echo off
set /p name=Enter your username:
start "%PROGRAMFILES%\PR Mumble\pr_mumble.exe" mumble://%name%@mumble.realitymod.com:64739/?version=1.2.0 -m
start "%PROGRAMFILES%\EA GAMES\Battlefield 2\mods\pr\pr.exe"
exit


Asked around and a buddy helped me get to this code right here, so far mumble comes up fine, but Pr will not as if it is stuck after mumble and dose not know what to do with itself someone analyze, its quite neat

Re: Project Reality+Mumble 1 shortcut

Posted: 2011-11-17 05:05
by SGT.MARCO
Hopefully this will work

Re: Project Reality+Mumble 1 shortcut

Posted: 2011-11-17 15:03
by Sinbe
Just a little tweak to what you guys already came up with. The following bat-file will start PR, PR Mumble and shut down the latter when pr.exe process closes:

@echo off
start "" "C:\Program Files (x86)\PR Mumble\pr_mumble.exe" mumble://[email protected]:64739/?version=1.2.0 -m
"E:\Games\BF2\mods\pr\pr.exe" +restart +playerName YOURLOGIN +playerPassword YOURPASS
taskkill /IM pr_mumble.exe /F
exit

Just fix the paths to correspond to yours and set your Username, login and password and you're ready and dont even have to look at the Mumble window any more. Great job btw devs.

Re: Project Reality+Mumble 1 shortcut

Posted: 2011-11-20 19:53
by Cassius
I used to do that, till I realised I want to look at mumble before starting up PR. Hopefully with the next release PR will electrically shock anyone who doesnt play with mumble and it wont be necessary no more.

Re: Project Reality+Mumble 1 shortcut

Posted: 2013-02-21 03:56
by Bluedrake42
ugh this took forever to find, please sticky this

Re: Project Reality+Mumble 1 shortcut

Posted: 2013-03-01 22:30
by Cavazos
My name has changed to [TP] in the beginning and it seems to not work with the command line anymore. Anyone can fix this? I think i'm done for because it's required for my login and have to do the enter the name manually now.

Re: Project Reality+Mumble 1 shortcut

Posted: 2013-03-02 09:49
by DDS
Post the script you have minus your password so we can see what you got. It is case sensitive. For example: playerName, playerPassword