Jump to content
  • Advertisement
Sign in to follow this  
HunterSimms

Best route to take for automatically going through a program

This topic is 1107 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey everyone, I'm trying to make a script that if I launch it it will go through the process of automatically selecting a map I am working on in Men of War assault squad's Gem 2 editor. If anyone here is familiar with using Gameranger to play multiplayer games then that would be a visual example of what I'm trying to perform. For those not familiar with Gameranger, what I mean is when it launches a multiplayer game for you, a lot of times without clicking yourself it will automatically start the game, select multiplayer, and then create a lobby. 

I am trying to create something like this so I don't have to dig through different files just to get to a map I've been working on. It would be much easier to execute a script that automatically started the editor, navigated through the map I want, and then load it without me having to do anything. I've tried doing this with a .bat file and I've only managed to start the program but I can't figure out how to make it automatically dig through the folders and select the map to load automatically. Should I look for different .bat commands or abandon the batch file method and look at a different scripting language and code?

Thanks for any info or any push in the right direction.

Share this post


Link to post
Share on other sites
Advertisement
Games typically have command line arguments that allow you to launch the game in various ways. The goldsrc and source engines (half-life and half-life 2 respectively) have command line options to launch a single player or multiplayer game from the command line. I can't remember what the parameters were exactly, but it probably went something like this:

hl2.exe --console +sv_cheats 1 +developer 2 +map path/to/your/map.bsp


If your editor doesn't have a button to launch the game with your map (as does worldcraft/hammer), then check the game's documentation and see if it has any command line options.

Share this post


Link to post
Share on other sites

Wow, thank you very much, I will check that out for sure!

[*EDIT*]
The console has different commands that are possible to execute, though I can't seem to find a list explaining what they are anywhere. Anyways, that's more of a personal problem though, not one that the community would be able to help me on. Regardless, I thought I'd update just for the sake of being updated. In the mean time I may just test out all the commands or keep researching online.

Edited by HunterSimms

Share this post


Link to post
Share on other sites

SikuliX is a scriptable system that lets you automate desktop interaction using image-recognition and OCR, so you can cope with unpredictable positions of windows and GUI elements.

 

http://www.sikuli.org/

 

It's ideal for automating simple GUI processes when AutoHotKey doesn't suffice.

Share this post


Link to post
Share on other sites

Alright so Sikuli seems to be exactly what I need! That being said when I use the autocapture hot-key my program in full-screen turns black for the duration of me trying to capture the region I need clicked. I'm going to see if it'll work if maybe I run the program through a 3rd party software that keeps it windowed (I tried all the window commands in the target line and none seem to work.) I'll keep you updated.

[EDIT] Sikuli doesn't work with games in full screen mode so that answers my question as to why it is doing that, I'll look for another program though and see how that works.

Edited by HunterSimms

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!