nwbyy Posted November 17, 2018 Share Posted November 17, 2018 Hi I'm playing beta version of They are billions. There are only "auto saves" and a "save and quit" functions yet. So after a misstake it's not possible to step back to a previos saved game. I created a batch file assigned to F3 key that allows me to copy/paste the saved game to a backup folder. Another batch assigned to F4 to copy the file back in its original folder. It works well, but every time I run one of my batch files, the TheyAreBillions process goes minimized and I have to ALT+TAB or clic back on it. To make it a little smarter, I'd like to run from the .bat a little .exe once the copy/paste finished, to set the focus back to the game. So far I have this working taken from the help file examples: #include <MsgBoxConstants.au3> If ProcessExists("TheyAreBillions.exe") Then ; Check if the process is running. MsgBox($MB_SYSTEMMODAL, "", "Process is running") EndIf Of course I don't want a message box, but focusing back to the game. I tried successfully with the notepad process: #include <MsgBoxConstants.au3> If ProcessExists("notepad.exe") Then ; Check if the process is running. WinActivate("[CLASS:Notepad]", "") EndIf But this does not work: #include <MsgBoxConstants.au3> If ProcessExists("TheyAreBillions.exe") Then ; Check if the process is running. WinActivate("[CLASS:TheyAreBillions]", "") EndIf Can somebody tell me what is wrong with my WinActivate line? Thanks a lot. Link to comment Share on other sites More sharing options...
Nine Posted November 17, 2018 Share Posted November 17, 2018 Not sure if this question is legally acceptable in this forum... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Developers Jos Posted November 17, 2018 Developers Share Posted November 17, 2018 34 minutes ago, Nine said: Not sure if this question is legally acceptable in this forum... Why this cryptic post? Just either report it or at least point the OP to the Forum rules. @nwbyy, This seems to be game related, so after being here for a couple of months, one would think you know our forum rules. So, do read them now and ensure you adhere to them. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts