romkilla Posted March 3, 2014 Share Posted March 3, 2014 (edited) Hello guys, first i want to apologise for my bad english, i am french. Normaly i have no problems to follow tutorials guides but this time i need to create a script and to compile it has a .exe file. I so deseperate, i am triyng doing this since yesterday and its not working. I am on windows 7 64 and here is the script i have to create: #include <Misc.au3> Opt("WinTextMatchMode", 3) $path = "C:\Users\ROMAN\Documents\Emulateurs\ds\" $app = "DeSmuME_0.9.10_x86.exe" $windows = "DeSmuME 0.9.10 x86" If $CmdLine[0] == 1 Then Run('"' & $path & $app & '" "' & $CmdLine[1] & '"') WinWait ( $windows ) WinActivate ( $windows ) WinWaitActive ( $windows ) Send("!{ENTER}") _MouseTrap(@DesktopWidth, @DesktopHeight, @DesktopWidth, @DesktopHeight) ProcessWaitClose( $app ) EndIf Exit 0 I have make the script, compiled it has a .exe. When i clic on it, sadlly nothing happen. I have fond this script on the forum(edited to fit my config): Local Const $sWndTitle = "DeSmuME 0.9.10 x86" Run("C:\Users\ROMAN\Documents\Emulateurs\ds\DeSmuME_0.9.10_x86.exe") WinWait($sWndTitle) WinActivate($sWndTitle) WinWaitActive($sWndTitle) Send("!{ENTER}") HotKeySet("{Esc}", "CloseWindow") While 1 Sleep(100) WEnd Func CloseWindow() ; ... can do stuff here If WinActive("Microsoft Excel") = 1 Then Send("{Esc}") Else Send("!{F4}") EndIf Exit EndFunc ;==>CloseWindow Its almost working, when i clic on the .exe file that i have created with it, the software start in full screen. But when i drag a file to this .exe the rom don't load. Maybe someone can help me. Thanks guys Edited March 3, 2014 by romkilla Link to comment Share on other sites More sharing options...
FireFox Posted March 3, 2014 Share Posted March 3, 2014 (edited) Hi, I have make the script, compiled it has a .exe. When i clic on it, sadlly nothing happen. You are expecting a parameter in the command line, so the whole script contained in the condition isn't executed. If $CmdLine[0] == 1 Then _ Its almost working, when i clic on the .exe file that i have created with it, the software start in full screen. But when i drag a file to this .exe the rom don't load. Add some debug to check what's working or not. e.g : #include <Misc.au3> #include <Array.au3> Opt("WinTextMatchMode", 3) $path = "C:\Users\ROMAN\Documents\Emulateurs\ds\" $app = "DeSmuME_0.9.10_x86.exe" $windows = "DeSmuME 0.9.10 x86" _ArrayDisplay($CmdLine) If $CmdLine[0] = 1 Then Run('"' & $path & $app & '" "' & $CmdLine[1] & '"') MsgBox(0, "", "Attente de la fenêtre") WinWait($windows) MsgBox(0, "", "Fenêtre trouvée") WinActivate($windows) WinWaitActive($windows) Send("!{ENTER}") _MouseTrap(@DesktopWidth, @DesktopHeight, @DesktopWidth, @DesktopHeight) MsgBox(0, "", "Attente de la fermeture du proc") ProcessWaitClose($app) MsgBox(0, "", "Proc fermé") EndIf Exit 0 I used MsgBox only because you have to debug it in compiled mode, but otherwise use ConsoleWrite. Btw: Welcome to the autoit forum Br, FireFox. Edited March 3, 2014 by FireFox Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 3, 2014 Moderators Share Posted March 3, 2014 @OP - As I see both the word DesMume and Emulators (not to mention your username of Romkilla), have you taken the time to look at the forum rules before you posted this question? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now