Old Game Transformers (Fall/War) of Cybertron Topic is solved

Ask gaming related questions (AHK v1.1 and older)
KINGLIFER
Posts: 6
Joined: 26 Jan 2022, 16:15

Old Game Transformers (Fall/War) of Cybertron

Post by KINGLIFER » 26 Jan 2022, 16:24

I need some help. I been trying to get this idea working all weekend.
MY kids love Transformers. The two hottest games they like is old. War and Fall of CyberTron. I have the PC versions.
They play on the TV not the computer.

The problem is the game starts windowed on my PC. I tried using Displaytools, DisplayFusion and all fail one way or another.

I got the AHK file to work with Launchbox but the coding is wrong.

Code: Select all

#NoEnv

Send ^!{Up}  ;Send Ctrl+Alt+Up
Return
if WinActive("TRANSFORMERS: Fall of Cybertron") 
    Send ^!{Up}  ;Send Ctrl+Alt+Up
Return
Now the Ctrl alt up is from Display Fusion but if AHK can move the window to Display 1 I could uninstall that.


Lastly. (Don't get upset guys) These two games have a bug. They both save in the same spot. Activision and Hasbro are no longer working together so I cannot change this or get an update. So what I would love is once the game ends a script takes the folder and moves it to another location. This way the saves won't be corrupted.

Of course, if I could move the save into the default folder once the game starts would be AWESOME as well.
The two games won't start at the same time. SO that is a relief.

ANY help would be appreciated. Thank you!!!

User avatar
mikeyww
Posts: 26877
Joined: 09 Sep 2014, 18:38

Re: Old Game Transformers (Fall/War) of Cybertron  Topic is solved

Post by mikeyww » 26 Jan 2022, 18:09

Unlabeled code following Return is unreachable and will never execute. You can prove it by inserting a MsgBox line following your Return.

KINGLIFER
Posts: 6
Joined: 26 Jan 2022, 16:15

Re: Old Game Transformers (Fall/War) of Cybertron

Post by KINGLIFER » 26 Jan 2022, 18:30

Ok could you be a bit more specific? I been using this for only a few days. I think I pur return twice. Typo. Sorry

User avatar
mikeyww
Posts: 26877
Joined: 09 Sep 2014, 18:38

Re: Old Game Transformers (Fall/War) of Cybertron

Post by mikeyww » 26 Jan 2022, 19:24

Yes. Your script is executed starting at the top, line by line. After #NoEnv, The script sends Ctrl+Alt+Up, as you have indicated. The next line is Return, which causes the script to exit.

Explained: Return

KINGLIFER
Posts: 6
Joined: 26 Jan 2022, 16:15

Re: Old Game Transformers (Fall/War) of Cybertron

Post by KINGLIFER » 26 Jan 2022, 19:28

That was a typo. Again sorry. However my code without the typo does not work. Again thank you but I would love if you could help or direct me to an example because do not know what to do to fix.

User avatar
mikeyww
Posts: 26877
Joined: 09 Sep 2014, 18:38

Re: Old Game Transformers (Fall/War) of Cybertron

Post by mikeyww » 26 Jan 2022, 20:03

It's not at all clear to me what your script should do. Details are lacking. To move a window, you can use WinMove. To move a directory, you can use FileMoveDir.

KINGLIFER
Posts: 6
Joined: 26 Jan 2022, 16:15

Re: Old Game Transformers (Fall/War) of Cybertron

Post by KINGLIFER » 26 Jan 2022, 20:11

Ok I am sorry. I would like when a program starts to goto the secondary monitor. copy a folder and thats it.
When the program ends I wanted another script to copy the same folder back to where it came from.
Is there any examples I could look at? I do not code. First time.

User avatar
mikeyww
Posts: 26877
Joined: 09 Sep 2014, 18:38

Re: Old Game Transformers (Fall/War) of Cybertron

Post by mikeyww » 26 Jan 2022, 20:47

Welcome to coding.

Code: Select all

source = %A_MyDocuments%\test
target = %A_ScriptDir%\test
SysGet, mon2, MonitorWorkArea, 2
WinWait, ahk_exe notepad.exe
SoundBeep, 1500
WinMove, %mon2Left%, %mon2Top%
FileMoveDir, %source%, %target%
If ErrorLevel
 MsgBox, 48, Source to target, An error occurred while moving.
WinWaitClose
SoundBeep, 1000
FileMoveDir, %target%, %source%
If ErrorLevel
 MsgBox, 48, Target to source, An error occurred while moving.
If you click on a command in the posted script, you can learn more about it. Reading the documentation helps. It provides details, information about limitations, and additional examples.

This is not necessarily an easy first script, so I would suggest starting with one simple task instead of two or three.

KINGLIFER
Posts: 6
Joined: 26 Jan 2022, 16:15

Re: Old Game Transformers (Fall/War) of Cybertron

Post by KINGLIFER » 26 Jan 2022, 20:56

I did not realize I could click on a command and read more up on it! That is cool!

Ok. One at a time. Sadly I need all to work but I understand. I will try this now. Thank you for your patience.

User avatar
mikeyww
Posts: 26877
Joined: 09 Sep 2014, 18:38

Re: Old Game Transformers (Fall/War) of Cybertron

Post by mikeyww » 26 Jan 2022, 23:08

Happy learning!

Post Reply

Return to “Gaming Help (v1)”