Jump to content
shokwave8

Running Steamapps, Autoconnection

Recommended Posts

Good evening,

My problem: i tried to build a launcher for an Arma3 Server (onlinegame). Till now i made the launcher ask for the location of the arma3.exe for saving that and running this .exe. The following problem is, that i have no clue how to autoconnect to an IP:Port. I found some codes online and tryed to do the same but i failed. 

Found these codes for C++ 

Process.Start("steam://connect/DEINE_SERVER_IP:SERVER_PORT)


Process.Start("steam://rungameid/107410// -skipintro -mod=@HierDeinAddonName-connect=HierDieServerIP -port=HierDerPort")

Things i've tried:

Run("steam://rungameid/107410") ;this doesn't start the game

Run("S:\Steam\steamapps\common\Arma 3\arma3.exe") ;this starts the game without connecting

;is there a way of running the first one with AutoIT?

I hope i could define the problem good enough for understanding. 

 

Thanks a lot for  reading. :) 

 

 

EDIT: I just figured out that 

steam://rungameid/107410

is an URL and not a directory... I'm very sorry its to late for me -_- Still i would be glad if someone could help me with the autoconnection to a server. 

Edited by shokwave8

Share this post


Link to post
Share on other sites

shokwave8.

 i tried to build a launcher for an Arma3 Server (onlinegame).

I asked you to read the Forum rules when you last posted about games - it seems you cannot read very well. This is your last warning - another game post will result in sanctions.

Thread locked.

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Similar Content

    • By rcmaehl
      Hi all, I've recently needed to be able to catalog Programs on my system and Steam is a pain to do. So here's the UDF I've made.
      FAQ

      Q1: Isn't this game related?
      A1: It's borderline, yes, so much so I cleared it with M23 before posting

      Q2: Can you add X function that does X with the Steam API?
      A2: No

      Q3: Can you add X function that does X with games?
      A3: No

      Q4: Can you add X function that doesn't meet the above criteria?
      A4: No, just to be safe anyway

      Q5: Why doesn't this get me the .exe!?
      A5: See Q3
       
      UDF
      #include-once #include <File.au3> #include <StringConstants.au3> ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GetSteamLibraries ; Description ...: Obtains a list of Steam Libraries ; Syntax ........: _GetSteamLibraries([$sPath = "None"]) ; Parameters ....: $sPath - [optional] Steam Install Directory. Default will grab from Registry ; Return values .: Success - Returns an array of Steam library locations ; Failure - Returns 0 and sets @error: ; |1 - Steam Install Location Error, sets @extended: (1, Unable to read Registry; 2, Path Invalid) ; |2 - Steam Library File Error, sets @extended: (1, File does not exist; 2, File could not be read) ; Author ........: rcmaehl (Robert Maehl) ; Modified ......: 03/20/19 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GetSteamLibraries($hPath = "None") Local $aLibraries[1] Local $hLibraryFile $aLibraries[0] = 0 If $hPath = "None" Then Local $hSteamDir = RegRead("HKEY_CURRENT_USER\Software\Valve\Steam", "SteamPath") If @error Then SetError(1,0,0) Else $hSteamDir = StringReplace($hSteamDir, "/", "\") EndIf Else If FileExists($hPath) Then Local $hSteamDir = $hPath Else SetError(1,1,0) EndIf EndIf If FileExists($hSteamDir & "\steamapps\libraryfolders.vdf") Then $hLibraryFile = FileOpen($hSteamDir & "\steamapps\libraryfolders.vdf") If @error Then SetError(2,0,0) Else SetError(2,1,0) EndIf Local $iLines = _FileCountLines($hSteamDir & "\steamapps\libraryfolders.vdf") For $iLine = 1 to $iLines Step 1 $sLine = FileReadLine($hLibraryFile, $iLine) If @error = -1 Then ExitLoop $sLine = StringStripWS($sLine, $STR_STRIPLEADING) $sLine = StringRegExpReplace($sLine, '"\s*"', "?") $sLine = StringReplace($sLine, '"', "") $sLine = StringReplace($sLine, "\\", "\") $aLine = StringSplit($sLine, '?') If $aLine[0] = 2 And StringIsInt($aLine[1]) Then ReDim $aLibraries[$aLine[1] + 1] $aLibraries[0] = UBound($aLibraries) - 1 $aLibraries[$aLine[1]] = $aLine[2] EndIf Next FileClose($hLibraryFile) Return $aLibraries EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _SteamGetGamesFromLibrary ; Description ...: Obtains a list of Games from a specified Steam Library ; Syntax ........: _SteamGetGamesFromLibrary($sLibrary) ; Parameters ....: $sLibrary - Path to a valid Steam Library ; Return values .: Success - Returns an array of Steam games ; Failure - Returns 0 and sets @error: ; |1 - Steam Library Empty ; Author ........: rcmaehl (Robert Maehl) ; Modified ......: 03/09/19 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _SteamGetGamesFromLibrary($sLibrary) Local $aGames[1][2] $aGames[0][0] = "0" Local $hSearch = FileFindFirstFile($sLibrary & "\steamapps\appmanifest_*.acf") If $hSearch = -1 Then SetError(1,0,0) While 1 $sFile = FileFindNextFile($hSearch) If @error Then Return $aGames ReDim $aGames[UBound($aGames) + 1][2] $hManifestFile = FileOpen($sLibrary & "\steamapps\" & $sFile) If $hManifestFile = -1 Then ContinueLoop Local $iLines = _FileCountLines($sLibrary & "\steamapps\" & $sFile) For $iLine = 1 to $iLines Step 1 $sLine = FileReadLine($hManifestFile, $iLine) If @error = -1 Then ExitLoop $sLine = StringStripWS($sLine, $STR_STRIPLEADING) $sLine = StringRegExpReplace($sLine, '"\s*"', "?") $sLine = StringReplace($sLine, '"', "") $aLine = StringSplit($sLine, '?') If $aLine[0] = 2 And $aLine[1] = "appid" Then $aGames[UBound($aGames) - 1][0] = $aLine[2] EndIf If $aLine[0] = 2 And $aLine[1] = "name" Then $aGames[UBound($aGames) - 1][1] = $aLine[2] EndIf Next $aGames[0][0] = UBound($aGames) - 1 FileClose($hManifestFile) WEnd EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _SteamGetGamesDetailsFromLibrary ; Description ...: Obtains a list of Details from a specified Steam Library ; Syntax ........: _SteamGetGamesDetailsFromLibrary($sLibrary, $sDetails) ; Parameters ....: $sLibrary - Path to a valid Steam Library ; $sDetails - a Opt("GUIDataSeparatorChar") seperated list of details to get ; Return values .: Success - Returns an array of Steam game details ; Failure - Returns 0 and sets @error: ; |1 - Steam Library Empty ; Author ........: rcmaehl (Robert Maehl) ; Modified ......: 03/09/19 ; Modified ......: ; Remarks .......: Steam manifests do not include the location of the executable ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _SteamGetGamesDetailsFromLibrary($sLibrary, $sDetails) Local $aGames[1][2] $aDetails = StringSplit($sDetails, Opt("GUIDataSeparatorChar"), $STR_NOCOUNT) $aGames[0][0] = "0" Local $hSearch = FileFindFirstFile($sLibrary & "\steamapps\appmanifest_*.acf") ReDim $aGames[0][UBound($aDetails)] If $hSearch = -1 Then SetError(1,0,0) While 1 $sFile = FileFindNextFile($hSearch) If @error Then Return $aGames ReDim $aGames[UBound($aGames) + 1][UBound($aDetails)] $hManifestFile = FileOpen($sLibrary & "\steamapps\" & $sFile) If $hManifestFile = -1 Then ContinueLoop Local $iLines = _FileCountLines($sLibrary & "\steamapps\" & $sFile) For $iLine = 1 to $iLines Step 1 $sLine = FileReadLine($hManifestFile, $iLine) If @error = -1 Then ExitLoop $sLine = StringStripWS($sLine, $STR_STRIPLEADING) $sLine = StringRegExpReplace($sLine, '"\s*"', "?") $sLine = StringReplace($sLine, '"', "") $aLine = StringSplit($sLine, '?') For $iDetail = 0 To UBound($aDetails) - 1 If $aLine[0] = 2 And $aLine[1] = $aDetails[$iDetail] Then $aGames[UBound($aGames) - 1][$iDetail] = $aLine[2] EndIf Next Next $aGames[0][0] = UBound($aGames) - 1 FileClose($hManifestFile) WEnd EndFunc
      CHANGELOG
      3/20/2018 _GetSteamLibraries Fixed: No Longer Crashes if Steam is not installed _SteamGetGamesFromLibrary Updated: Obtains AppID instead of install folder now  
×
×
  • Create New...