Ive attached the reference files below
Thank you!
Chris
1. Remove "P1DeviceName = "
2. Replace all "&" with "&"
3. Copy lines 3 and 7
4. 3 with ###LIGHTGUN1###
5. 7 with ###LIGHTGUN2###
Code: Select all
filecopy, D:\Arcade\Tools\Demul Shooter\config.ini, D:\Arcade\Tools\Demul Shooter\configBU.ini
Sleep 200
fileread, file1, D:\Arcade\Tools\Demul Shooter\config.ini ; fileread, file1, %path2file1%
newtext := strreplace(file1, "P1DeviceName = ", "")
newtext2 := strreplace(file1, "&", "&")
filedelete, D:\Arcade\Tools\Demul Shooter\config.ini
fileappend, %newtext%, D:\Arcade\Tools\Demul Shooter\configA.ini
fileappend, %newtext2%, D:\Arcade\Tools\Demul Shooter\configA.ini
Sleep 200
fileread, fileA, D:\Arcade\Tools\Demul Shooter\configA.ini ; fileread, fileA, %path2file1%
newtext3 := strreplace(fileA, "P2DeviceName = ", "")
newtext4 := strreplace(fileA, "&", "&")
filedelete, D:\Arcade\Tools\Demul Shooter\configA.ini
fileappend, %newtext3%, D:\Arcade\Tools\Demul Shooter\config.ini
fileappend, %newtext4%, D:\Arcade\Tools\Demul Shooter\config.ini
Sleep 200
sourceline := 3
fileread, file2, D:\Arcade\Tools\Demul Shooter\config.ini ; fileread, file1, %path2file1%
fileread, file3, D:\Arcade\Emulators\TechnoParrot\UserProfiles\UserProfilesRAW\Transformers.xml
newtext5 := strreplace(file3, "###LIGHTGUN1###", "%sourceline%")
fileappend, %newtext5%, D:\Arcade\Emulators\TechnoParrot\UserProfiles\Transformers.xml
Sleep 200
sourceline := 7
fileread, file4, D:\Arcade\Tools\Demul Shooter\config.ini ; fileread, file1, %path2file1%
fileread, file5, D:\Arcade\Emulators\TechnoParrot\UserProfiles\UserProfilesRAW\Transformers.xml
newtext6 := strreplace(file5, "###LIGHTGUN2###", "%sourceline%")
fileappend, %newtext6%, D:\Arcade\Emulators\TechnoParrot\UserProfiles\Transformers.xml
Sleep 200
filedelete, D:\Arcade\Tools\Demul Shooter\config.ini
filecopy, D:\Arcade\Tools\Demul Shooter\configBU.ini, D:\Arcade\Tools\Demul Shooter\config.ini
Sleep 200
filedelete, D:\Arcade\Tools\Demul Shooter\configBU.ini
exitapp