Advertisement
Zeporko

Untitled

Oct 3rd, 2015
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.06 KB | None | 0 0
  1.  
  2. VBApath = %emuPath%\VBA
  3. SettingsFile = %VBApath%\settings.ini
  4.  
  5. iniread, GameN, %SettingsFile%, %romName%, Game
  6. iniread, ModeN, %SettingsFile%, %romName%, Mode
  7. iniread, LoadN, %SettingsFile%, %romName%, Load
  8.  
  9.  
  10. If modeN=GGGG
  11. {
  12. GBAconf1 = %VBApath%\vba1\VisualBoyAdvance-M.exe
  13. GBAconf2 = %VBApath%\%GameN%
  14. DolphinConf = /U "%VBApath%\DolphinConfigs\GGGG"
  15. Gui -Caption
  16. Gui, Add, Picture, x0 y0 w1280 h1024 , %VBApath%\GGGG.png
  17. Gui, Font, S20 CDefault Bold, Impact
  18.  
  19. Gui, Add, Button, G1solo x521 y45 w250 h80 , Normal
  20.  
  21. Gui, Add, Button, g1GBA x181 y274 w250 h80, 1 GBA
  22.  
  23. Gui, Add, Button, g2GBA x849 y274 w250 h80, 2 GBA
  24.  
  25. Gui, Add, Button, g3GBA x181 y679 w250 h80 , 3 GBA
  26.  
  27. Gui, Add, Button, g4GBA x849 y679 w250 h80 , 4 GBA
  28.  
  29. Gui, Show, x0 y0 h1024 w1280
  30.  
  31. return
  32.  
  33. }Else If modeN=MMGG
  34. {
  35. GBAconf2 = %VBApath%\%GameN%
  36. DolphinConf = /U "%VBApath%\DolphinConfigs\MMGG"
  37. Gui -Caption
  38. Gui, Add, Picture, x0 y0 w1280 h1024 , %VBApath%\MMGG.png
  39. Gui, Font, S20 CDefault Bold, Impact
  40.  
  41. Gui, Add, Button, G1solo x515 y92 w250 h80, Normal
  42.  
  43. Gui, Add, Button, g2M2G x515 y774 w250 h80, 2 Manettes 2 GBA
  44.  
  45. Gui, Show, x0 y0 h1024 w1280
  46.  
  47. return
  48.  
  49. }Else If modeN=MMMG
  50. {
  51. GBAconf2 = %VBApath%\%GameN%
  52. DolphinConf = /U "%VBApath%\DolphinConfigs\MMMG"
  53. Gui -Caption
  54. Gui, Add, Picture, x0 y0 w1280 h1024 , %VBApath%\MMMG.png
  55. Gui, Font, S20 CDefault Bold, Impact
  56.  
  57. Gui, Add, Button, G1solo x515 y92 w250 h80, Normal
  58.  
  59. Gui, Add, Button, g3M1G x515 y774 w250 h80, 3 Manettes 1 GBA
  60.  
  61. Gui, Show, x0 y0 h1024 w1280
  62.  
  63. return
  64.  
  65. }Else If modeN=PAC
  66. {
  67. GBAconf1 = %VBApath%\vba4\VisualBoyAdvance-M.exe
  68. GBAconf2 = %VBApath%\%GameN%
  69. DolphinConf = /U "%VBApath%\DolphinConfigs\MMMG"
  70. Goto 1GBA
  71. return
  72.  
  73. }Else If modeN=MGGG
  74. {
  75. GBAconf1 = %VBApath%\vba2\VisualBoyAdvance-M.exe
  76. GBAconf2 = %VBApath%\%GameN%
  77. DolphinConf = /U "%VBApath%\DolphinConfigs\MGGG"
  78. Gui -Caption
  79. Gui, Add, Picture, x0 y0 w1280 h1024 , %VBApath%\MGGG.png
  80. Gui, Font, S20 CDefault Bold, Impact
  81.  
  82. Gui, Add, Button, G1solo x515 y92 w250 h80, Normal
  83.  
  84. Gui, Add, Button, g1GBA x515 y774 w250 h80, 1 Manette + GBA
  85.  
  86. Gui, Show, x0 y0 h1024 w1280
  87.  
  88. return
  89.  
  90. }Else
  91. Gui Destroy
  92. FadeInStart()
  93. Run, %executable% "%romPath%%romName%%romExtension%", %emuPath%
  94. sleep, 4000
  95. FadeOutExit()
  96. Gui Destroy
  97. Goto SoloClose
  98.  
  99.  
  100. 1solo:
  101. Gui Destroy
  102. FadeInStart()
  103. Run, %executable% "%romPath%%romName%%romExtension%", %emuPath%
  104. sleep, 4000
  105. FadeOutExit()
  106. Gui Destroy
  107. Goto SoloClose
  108.  
  109. 1GBA:
  110. Gui Destroy
  111. FadeInStart()
  112. Run, %executable% %DolphinConf% /e "%romPath%%romName%%romExtension%", %emuPath%
  113. sleep, 4000
  114. WinSet, Style, -0xC40000,a
  115. WinMove, Dolphin, , 99, 0, 1080, 810
  116. FadeOutExit()
  117. Gui Destroy
  118. Gui -Caption
  119. GUI, Color, 000000
  120. Gui, Show, x0 y0 h1024 w1280
  121.  
  122. Run, %GBAconf1% %GBAconf2%
  123. sleep, 200
  124. WinSet, Style, -0xC40000,a
  125. WinMove, VisualBoyAdvance-M, , 480, 790, 320, 235
  126. sendinput %LoadN%
  127. Goto SoloClose
  128.  
  129.  
  130.  
  131. 2GBA:
  132. Gui Destroy
  133. FadeInStart()
  134. Run, %executable% %DolphinConf% /e "%romPath%%romName%%romExtension%", %emuPath%
  135. sleep, 4000
  136. WinSet, Style, -0xC40000,a
  137. WinMove, Dolphin, , 99, 0, 1080, 810
  138. FadeOutExit()
  139. Gui Destroy
  140. Gui -Caption
  141. GUI, Color, 000000
  142. Gui, Show, x0 y0 h1024 w1280
  143. Run, %GBAconf1% %GBAconf2%
  144. sleep, 200
  145. WinSet, Style, -0xC40000,a
  146. WinMove, VisualBoyAdvance-M, , 99, 790, 320, 235
  147. sendinput %LoadN%
  148. Run, %VBApath%\vba2\VisualBoyAdvance-M.exe %GBAconf2%
  149. sleep, 200
  150. WinSet, Style, -0xC40000,a
  151. WinMove, VisualBoyAdvance-M, , 858, 790, 320, 235
  152. sendinput %LoadN%
  153.  
  154. Goto SoloClose
  155.  
  156. 3GBA:
  157. Gui Destroy
  158. FadeInStart()
  159. Run, %executable% %DolphinConf% /e "%romPath%%romName%%romExtension%", %emuPath%
  160. sleep, 4000
  161. WinSet, Style, -0xC40000,a
  162. WinMove, Dolphin, , 99, 0, 1080, 810
  163. FadeOutExit()
  164. Gui Destroy
  165. Gui -Caption
  166. GUI, Color, 000000
  167. Gui, Show, x0 y0 h1024 w1280
  168. Run, %GBAconf1% %GBAconf2%
  169. sleep, 200
  170. WinSet, Style, -0xC40000,a
  171. WinMove, VisualBoyAdvance-M, , 99, 790, 320, 235
  172. sendinput %LoadN%
  173. Run, %VBApath%\vba2\VisualBoyAdvance-M.exe %GBAconf2%
  174. sleep, 200
  175. WinSet, Style, -0xC40000,a
  176. WinMove, VisualBoyAdvance-M, , 480, 790, 320, 235
  177. sendinput %LoadN%
  178. Run, %VBApath%\vba3\VisualBoyAdvance-M.exe %GBAconf2%
  179. sleep, 200
  180. WinSet, Style, -0xC40000,a
  181. WinMove, VisualBoyAdvance-M, , 858, 790, 320, 235
  182. sendinput %LoadN%
  183.  
  184. Goto SoloClose
  185.  
  186. 4GBA:
  187. Gui Destroy
  188. FadeInStart()
  189. Run, %executable% %DolphinConf% /e "%romPath%%romName%%romExtension%", %emuPath%
  190. sleep, 4000
  191. WinSet, Style, -0xC40000,a
  192. WinMove, Dolphin, , 99, 0, 1080, 810
  193. Run, %GBAconf1% %GBAconf2%
  194. sleep, 200
  195. WinSet, Style, -0xC40000,a
  196. WinMove, VisualBoyAdvance-M, , 0, 790, 320, 235
  197. sendinput %LoadN%
  198. Run, %VBApath%\vba2\VisualBoyAdvance-M.exe %GBAconf2%
  199. sleep, 200
  200. WinSet, Style, -0xC40000,a
  201. WinMove, VisualBoyAdvance-M, , 320, 790, 320, 235
  202. sendinput %LoadN%
  203. Run, %VBApath%\vba3\VisualBoyAdvance-M.exe %GBAconf2%
  204. sleep, 200
  205. WinSet, Style, -0xC40000,a
  206. WinMove, VisualBoyAdvance-M, , 640, 790, 320, 235
  207. sendinput %LoadN%
  208. Run, %VBApath%\vba4\VisualBoyAdvance-M.exe %GBAconf2%
  209. sleep, 200
  210. WinSet, Style, -0xC40000,a
  211. WinMove, VisualBoyAdvance-M, , 960, 790, 320, 235
  212. sendinput %LoadN%
  213. FadeOutExit()
  214. Gui Destroy
  215. Gui -Caption
  216. GUI, Color, 000000
  217. Gui, Show, x0 y0 h810 w1280
  218.  
  219. Goto SoloClose
  220.  
  221. 2M2G:
  222. Gui Destroy
  223. FadeInStart()
  224. Run, %executable% %DolphinConf% /e "%romPath%%romName%%romExtension%", %emuPath%
  225. sleep, 4000
  226. WinSet, Style, -0xC40000,a
  227. WinMove, Dolphin, , 99, 0, 1080, 810
  228. FadeOutExit()
  229. Gui Destroy
  230. Gui -Caption
  231. GUI, Color, 000000
  232. Gui, Show, x0 y0 h1024 w1280
  233.  
  234. Run, %VBApath%\vba3\VisualBoyAdvance-M.exe %GBAconf2%
  235. sleep, 200
  236. WinSet, Style, -0xC40000,a
  237. WinMove, VisualBoyAdvance-M, , 99, 790, 320, 235
  238. Run, %VBApath%\vba4\VisualBoyAdvance-M.exe %GBAconf2%
  239. sleep, 200
  240. WinSet, Style, -0xC40000,a
  241. WinMove, VisualBoyAdvance-M, , 858, 790, 320, 235
  242.  
  243. Goto SoloClose
  244.  
  245. 3M1G:
  246. Gui Destroy
  247. FadeInStart()
  248. Run, %executable% %DolphinConf% /e "%romPath%%romName%%romExtension%", %emuPath%
  249. sleep, 4000
  250. WinSet, Style, -0xC40000,a
  251. WinMove, Dolphin, , 99, 0, 1080, 810
  252. FadeOutExit()
  253. Gui Destroy
  254. Gui -Caption
  255. GUI, Color, 000000
  256. Gui, Show, x0 y0 h1024 w1280
  257.  
  258. Run, %VBApath%\vba4\VisualBoyAdvance-M.exe %GBAconf2%
  259. sleep, 200
  260. WinSet, Style, -0xC40000,a
  261. WinMove, VisualBoyAdvance-M, , 480, 790, 320, 235
  262. Goto SoloClose
  263.  
  264. SoloClose:
  265.  
  266. WinActivate, Dolphin
  267.  
  268. Process, WaitClose, %executable%
  269.  
  270.  
  271.  
  272.  
  273. ExitApp
  274.  
  275. CloseProcess:
  276. FadeOutStart()
  277. Process, Close, VisualBoyAdvance-M.exe
  278. sleep, 100
  279. Process, Close, VisualBoyAdvance-M.exe
  280. sleep, 100
  281. Process, Close, VisualBoyAdvance-M.exe
  282. sleep, 100
  283. Process, Close, VisualBoyAdvance-M.exe
  284. WinClose, FPS ahk_class wxWindowNR ; this needs to close the window the game is running in otherwise dolphin crashes on exit
  285. sleep, 200
  286. Process, Close, Dolphin.exe
  287. FadeOutExit()
  288. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement