Lailoken Posted February 7, 2012 Posted February 7, 2012 Too bad we have to click the mouse in Abobo game to work, have a way to make the script give this mouse click to start game Abobo? Yes, as long as you don't mind that it will click on every game. For the 2 games you have it doesn't look like it will cause any problems, but it might for some games. Before the part of the module that waits for the program to close ("WinWaitClose" or "Process, WaitClose") put something like this: Sleep, 500 Send {Click 100, 300}
gamesmame Posted February 8, 2012 Posted February 8, 2012 For example this???? ;------------------------------------------------------------------------ ; Flash ; FlashPlayer v11 ; by Lailoken (with parts shamelessly stolen from djvj and zerojay) ; 1.0 ; ; Notes: ; This script uses Adobe Flash Player and Display Changer. There is also a Settings.ini which should be ; in the same folder as this module. Settings.ini will be created on the first run and each game entry ; will be automatically added with default settings on each game's first run. The settings will need to ; be adjusted manually to suit each game. ; ; There are 4 options that can be adjusted: ; 1. Fullscreen - If true then the fullscreen feature in Flash Player will be turned on. If false it will ; create a pseudo-fullscreen mode which will take up the entire screen, but borders will be hidden. ; 2. Resolution - If you cannot run the game in fullscreen under normal display resolution you can insert ; a new resolution here. The resolution will be changed when the program starts and revert back when ; the program closes. Syntax is widthxheight[@refresh] (e.g. 640x480@60). Refresh is optional. ; 3. HideMouse - If true then your mouse curser will be hidden if idle for a specified number of seconds ; and reappear when the mouse cursor is moved again. The number of seconds is specified by IdleTime ; at the top of Settings.ini ; 4. Delay - The delay is the number of seconds in which a loading screen will show while the game is ; queuing up in the background. Some games have intro videos or advertisements which break the ; fullscreen feature unless a delay is added. ; ; The default settings will play the games in fullscreen, under normal resolution with HideMouse turned off ; and a 0 second delay. ;------------------------------------------------------------------------ DisplayChanger := CheckFile(A_ScriptDir . "\Modules\" . systemName . "\dc.exe") settingsFile := CheckFile2(A_ScriptDir . "\Modules\" . systemName . "\Settings.ini") IniRead, fullscreen, %settingsFile%, %romName%, Fullscreen If (fullscreen = "ERROR") fullscreen := CreateSection(settingsFile, romName) IniRead, idletime, %settingsFile%, Settings, IdleTime, 0 IniRead, hidemouse, %settingsFile%, %romName%, HideMouse, false IniRead, resolution, %settingsFile%, %romName%, Resolution, IniRead, delay, %settingsFile%, %romName%, Delay, 0 fullscreen := %fullscreen% ;convert to boolean hidemouse := %hidemouse% ;convert to boolean idletime := idletime * 1000 ;convert to milliseconds delay := delay * 1000 ;convert to milliseconds StringSplit, res_array, resolution, x@ ;convert to array Gui, 1:Color, 000000 Gui, 1:-Caption +ToolWindow +AlwaysOnTop Gui, 1:Font, s36, Gui, 1:Add, Text, cWhite w%A_ScreenWidth% h%A_ScreenHeight% 0x200 Center, Loading... Gui, 1:Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight% , LoadScreen if Not (fullscreen) { WinMinimizeAll Gui, 2:Color, 000000 Gui 2:-Caption +ToolWindow Gui, 2:Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%, BlackScreen WinSet, ExStyle, +0x08000000L, BlackScreen ;makes the GUI not clickable } If (res_array1) { if (res_array3) parameters = -width=%res_array1% -height=%res_array2% -refresh=%res_array3% Else parameters = -width=%res_array1% -height=%res_array2% Run, %DisplayChanger% %parameters% "%emuPath%%Executable%" "%romPath% %romName%%romExtension%" } Else Run, %executable% "%romPath%%romName%%romExtension%", %emuPath% WinWait, AHK_class ShockwaveFlash, , 5 WinActivate, LoadScreen If (ErrorLevel) Goto, EndProcess WinActivate, AHK_class ShockwaveFlash Send {Volume_Mute} ;mute sound while loading Sleep, %delay% WinMenuSelectItem, AHK_class ShockwaveFlash, , View, Show All ;set to Show All Send ^h ;set to High Quality If (fullscreen) Send ^f Else ExpandWindow("AHK_class ShockwaveFlash") Gui, 1:Destroy ;destroy LoadScreen Send {Volume_Mute} ;unmute sound If (hidemouse) { lastmove := A_TickCount mousevisible := true SetTimer MouseCheck, 1 } Process, WaitClose, %executable% Sleep, 500 ;--- ?????????????????? Send {Click 100, 300} ;--- ?????????????????? EndProcess: WinActivate, Hyperspin ExitApp ;---------------------------------------------------------------------------- ; Functions ;---------------------------------------------------------------------------- CreateSection(file,sectionname) { FileAppend,`n[%sectionname%]`nFullscreen=true`nResolution=`nHideMouse=false`nDelay=0`n, %file% Return "true" } CheckFile2(file) { IfNotExist, %file% { MsgBox, 48, Error, Cannot find %file%.`nA default Settings.ini has been created. Open it to edit your game options., 8 FileAppend, [settings]`nIdleTime=5`n, %file% } Return %file% } ExpandWindow(title) { WinSet, Style, -0xC00000, %title% ;Removes the titlebar of the game window WinSet, Style, -0x40000, %title% ;Removes the border of the game window DllCall("SetMenu", uint, WinExist(title), uint, 0) ;Removes the MenuBar WinGetPos, x, y, width, height, %title% width := width - 16 ;change width to actual Flash dimensions height := height - 58 ;change height to actual Flash dimensions If (width/height > A_ScreenWidth/A_ScreenHeight) ;for games with wider ratio than your monitor { h := ( A_ScreenWidth / width ) * height w := A_ScreenWidth x := 0 y := ( A_ScreenHeight / 2 ) - ( h / 2 ) } Else { h := A_ScreenHeight w := (A_ScreenHeight / height) * Width x := ( A_ScreenWidth / 2 ) - ( w / 2 ) y := 0 } WinMove, %title%, , x, y, w, h } SystemCursor(OnOff=1) ;INIT = "I","Init"; OFF = 0,"Off"; TOGGLE = -1,"T","Toggle"; ON = others { static AndMask, XorMask, $, h_cursor ,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13 ;system cursors , b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13 ;blank cursors , h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13 ;handles of default cursors if (OnOff = "Init" or OnOff = "I" or $ = "") ;init when requested or at first call { $ = h ;active default cursors VarSetCapacity( h_cursor,4444, 1 ) VarSetCapacity( AndMask, 32*4, 0xFF ) VarSetCapacity( XorMask, 32*4, 0 ) system_cursors = 32512,32513,32514,32515,32516,32642,32643,32644,32645,32646,32648,32649,32650 StringSplit c, system_cursors, `, Loop %c0% { h_cursor := DllCall( "LoadCursor", "uint",0, "uint",c%A_Index% ) h%A_Index% := DllCall( "CopyImage", "uint",h_cursor, "uint",2, "int",0, "int",0, "uint",0 ) b%A_Index% := DllCall("CreateCursor","uint",0, "int",0, "int",0 , "int",32, "int",32, "uint",&AndMask, "uint",&XorMask ) } } if (OnOff = 0 or OnOff = "Off" or $ = "h" and (OnOff < 0 or OnOff = "Toggle" or OnOff = "T")) $ = b ; use blank cursors else $ = h ; use the saved cursors Loop %c0% { h_cursor := DllCall( "CopyImage", "uint",%$%%A_Index%, "uint",2, "int",0, "int",0, "uint",0 ) DllCall( "SetSystemCursor", "uint",h_cursor, "uint",c%A_Index% ) } } MouseCheck: MouseGetPos, Mouse_x, Mouse_y If (Mouse_x != Last_x || Mouse_y != Last_y) { If Not (mousevisible) { SystemCursor("On") mousevisible := true } lastmove := A_TickCount } Else If (A_TickCount > lastmove + idletime && mousevisible) { SystemCursor("Off") mousevisible := false } Last_x := Mouse_x Last_y := Mouse_y Return CloseProcess: WinClose, AHK_class ShockwaveFlash Gui, 2:Destroy ;destroy BlackScreen SystemCursor("On") WinMinimizeAllUndo Return I input correct??? because dont send the clic Process, WaitClose, %executable% Sleep, 500 ;--- ?????????????????? Send {Click 100, 300} ;--- ?????????????????? EndProcess: WinActivate, Hyperspin ExitApp ???
Lailoken Posted February 9, 2012 Posted February 9, 2012 Before "Process, WaitClose" not after. If (hidemouse) { lastmove := A_TickCount mousevisible := true SetTimer MouseCheck, 1 } Sleep, 500 Send {Click 100, 300} Process, WaitClose, %executable% I tested it with mine and it works for Abobo's Big Adventure. Keep in mind, though, that the "100, 300" part is like coordinates for the mouse click in pixels (100 pixels down from the top of your screen and 300 pixels from the left of your screen). So, if you see the mouse move, but it's not clicking inside the window then adjust those numbers.
gamesmame Posted February 9, 2012 Posted February 9, 2012 Lailoken BIG THANK YOU!!! works correct!!! I your FAN! =)
rholloran Posted February 9, 2012 Posted February 9, 2012 Can someone tell me the ideal way to remap the controls for each flash game? Modify the flash.ahk script? Could it be done in the settings.ini file? An example would really help. Thanks.
gamesmame Posted February 9, 2012 Posted February 9, 2012 Can someone tell me the ideal way to remap the controls for each flash game? Modify the flash.ahk script? Could it be done in the settings.ini file? An example would really help.Thanks. [2] I also have this doubt, if it is possible to change the commands and buttons in a flash game individually, with like it changing the resolution of each game individually in settings.ini
zerojay Posted February 10, 2012 Posted February 10, 2012 I've been playing around with using scripts to launch each game and have them change my xpadder mapping. Also, Super Mario Crossover 2 is out now and does allow you to change the keys.
KyoKusagani1999 Posted February 10, 2012 Posted February 10, 2012 Oh.... My... Word. They Put Demon From GameCenter CX / Retro Game Challenge! YEAAAAHHHH!! That tribute to the golden age of gaming needs more cherish from all the retro gamers from around the world. Also, I'd love to hear what the Kacho himself has to say about this game, let alone react to it in the first place!
gamesmame Posted February 14, 2012 Posted February 14, 2012 I've been playing around with using scripts to launch each game and have them change my xpadder mapping. Also, Super Mario Crossover 2 is out now and does allow you to change the keys. Where have Super Mario Crossover 2 for download with to change the keys?? thanks!
KyoKusagani1999 Posted February 14, 2012 Posted February 14, 2012 Where have Super Mario Crossover 2 for download with to change the keys?? thanks! Well, I don't know if there's a download link or not, but here's your proof it exists. http://www.explodingrabbit.com/games/super-mario-bros-crossover
Tribe Fan Posted May 16, 2013 Posted May 16, 2013 Sorry to resurrect this thread, but I'm struggling to make this work. I used zerojay's ahk script but I keep getting this error: Error at line 35 Line Text: ; Error: The leftmost character above is illegal in an expression. Any ideas?
SORHP Posted May 19, 2013 Author Posted May 19, 2013 Hey guys, I know I used to be heavily involved in this thread, but I have lost my SuperMarioCrossover exe, can someone pm me with version 1-2, standalone exe, pretty please! My Arcade Machines...
zerojay Posted May 19, 2013 Posted May 19, 2013 I'll try to up one for you soon. Crossover 3 is on the way. EDIT: I uploaded the standalone's .exe for you to my FTP folder.
jeepguy81 Posted May 19, 2013 Posted May 19, 2013 All over it! :thumbup: Sent from my SPH-L710 using Tapatalk 2 - Vertical-Cocktail Cab Theme Project
SORHP Posted May 20, 2013 Author Posted May 20, 2013 I tried to run the exe in win7, and its a no go, it just runs a batch for just a sec, and then nothing...?, sorry, its been too long (2 kids later) to know what the problem is My Arcade Machines...
Tribe Fan Posted May 20, 2013 Posted May 20, 2013 Same problem here. Thanks a lot for the exe zerojay.
zerojay Posted May 20, 2013 Posted May 20, 2013 Remember, you asked for the EXE, not the full installation. That may be your problem here. You need more than just an exe.
SORHP Posted May 20, 2013 Author Posted May 20, 2013 oh boy!!!, lol, zerojay, can you get me the full install, sorry, I feel like a tool My Arcade Machines...
zerojay Posted May 20, 2013 Posted May 20, 2013 Google is your friend. Try this: http://www.bestfreewaredownload.com/download/t-free-super-mario-crossover-freeware-mjschzou.html
SORHP Posted May 20, 2013 Author Posted May 20, 2013 , lol... yu da man, youre right I coulda done that, thank you homeslice My Arcade Machines...
Tribe Fan Posted May 20, 2013 Posted May 20, 2013 Man, I'm totally lost... I got the installation working, but when I switch to full screen, only the upper left hand corner of the game shows up. Also, is there some way to use version 2.1? It's not a big deal, but they included some nice features in the latest installment. And finally, how do I go about loading through HyperLaunch? Can I just set it as a PC game? Thanks a lot.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.