Cnells2000 Posted February 9, 2021 Share Posted February 9, 2021 (edited) hello Everyone. I checked the hotkeys for the nox player and it has Ctrl + 0 for full screen and alt + F4 for exit nox. my problem is that im loading the games through shortcuts so i would have no way of pasting these in the script area BC i dont have an emulator set. is there any way i can place them in the section in the picture anywhere so i can use these shortcuts. i would like to run the game, then after like 20 seconds send Ctrl+0 and when i push ESC it send the Alt+F4 keys to close. Thank you In advance. Android Issue.mp4 Edited February 9, 2021 by Cnells2000 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted February 9, 2021 Share Posted February 9, 2021 Create a new text file and save it to somewhere you won't forget nor accidentally delete. Say somewhere like "D:\LaunchBox\ThirdParty\AutoHotkey\MyAHKs\" Inside that text file, put: Sleep, 20000 Send, ^0 $Esc:: { Send, !{F4} ExitApp } Now save the file, but save it with an "ahk" file extension. Say something like "noxScript.ahk". (make sure it doesn't save as "noxScript.ahk.txt") In Edit Game, go to the Additional Apps section and click Add Application... Give it a Name. In the Application Path, Browse to your ../LaunchBox/ThirdParty/AutoHotkey/ folder and select AutoHotkey.exe. In the Application Command-Line Parameters:, type in the full path to where you saved the file you created above. And put quotes around it. Check the box Automatically Run Before Main Application. Click OK and OK. Run your game and wait 20ish seconds and see if it goes fullscreen. 1 Quote Link to comment Share on other sites More sharing options...
Cnells2000 Posted February 10, 2021 Author Share Posted February 10, 2021 20 hours ago, JoeViking245 said: Create a new text file and save it to somewhere you won't forget nor accidentally delete. Say somewhere like "D:\LaunchBox\ThirdParty\AutoHotkey\MyAHKs\" Inside that text file, put: Sleep, 20000 Send, ^0 $Esc:: { Send, !{F4} ExitApp } Now save the file, but save it with an "ahk" file extension. Say something like "noxScript.ahk". (make sure it doesn't save as "noxScript.ahk.txt") In Edit Game, go to the Additional Apps section and click Add Application... Give it a Name. In the Application Path, Browse to your ../LaunchBox/ThirdParty/AutoHotkey/ folder and select AutoHotkey.exe. In the Application Command-Line Parameters:, type in the full path to where you saved the file you created above. And put quotes around it. Check the box Automatically Run Before Main Application. Click OK and OK. Run your game and wait 20ish seconds and see if it goes fullscreen. that worked great! but at times it does'nt escape but instead minimizes to the previous smaller screen and wont escape at all until i use the mouse. maybe im escaping too fast or sumn Quote Link to comment Share on other sites More sharing options...
Your Friendly A.I Overlord Posted February 10, 2021 Share Posted February 10, 2021 I am sorry to butt in, even though JoeViking245 does an excellent job of helping you out. But difficulties can arise by sending key combinations like Alt + F4 in your exit script. For example the Alt + F4 can be send to the wrong window or just not registered at all by the emulator. My preferred method would be by using the WinClose command (if it's possible) because it is much more specific about which window to close. $Esc:: { WinClose, ahk_exe nox.exe ;or whatever nox's executable is called. ExitApp } Or you could try: $Esc:: { Send, {Alt down} {F4 down} Sleep 50 ;or if that doesn't work try Sleep 100 Send, {Alt up} {F4 up} ExitApp } 1 1 Quote Link to comment Share on other sites More sharing options...
Cnells2000 Posted February 12, 2021 Author Share Posted February 12, 2021 On 2/10/2021 at 6:29 AM, Koroth said: I am sorry to butt in, even though JoeViking245 does an excellent job of helping you out. But difficulties can arise by sending key combinations like Alt + F4 in your exit script. For example the Alt + F4 can be send to the wrong window or just not registered at all by the emulator. My preferred method would be by using the WinClose command (if it's possible) because it is much more specific about which window to close. $Esc:: { WinClose, ahk_exe nox.exe ;or whatever nox's executable is called. ExitApp } Or you could try: $Esc:: { Send, {Alt down} {F4 down} Sleep 50 ;or if that doesn't work try Sleep 100 Send, {Alt up} {F4 up} ExitApp } @KorothNeither one of those worked. i changed to 100, didnt work. i think the exe is called noxplayer.exe so i changed it and it didnt work either. They wont even work sometimes like the first script from joe does. $Esc:: { WinClose, noxplayer.exe ExitApp } and $Esc:: { Send, {Alt down} {F4 down} Sleep 100 Send, {Alt up} {F4 up} ExitApp } Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted February 12, 2021 Share Posted February 12, 2021 @Cnells2000 On your 1st one here, you left out "ahk_exe". (kind of important. ) $Esc:: { WinClose, ahk_exe noxplayer.exe ExitApp } Also, if you "think" it's called "noxplayer.exe" and it turns out it's not, it's not going to work. (also kind of important. ) 1 Quote Link to comment Share on other sites More sharing options...
Cnells2000 Posted February 12, 2021 Author Share Posted February 12, 2021 2 minutes ago, JoeViking245 said: @Cnells2000 On your 1st one here, you left out "ahk_exe". (kind of important. ) $Esc:: { WinClose, ahk_exe noxplayer.exe ExitApp } Also, if you "think" it's called "noxplayer.exe" and it turns out it's not, it's not going to work. (also kind of important. ) Its not. its called nox.exe actually @Koroth the first script did actually work my mistake and thank you both. now if i can get my Daphne in order ill be alright lol $Esc:: { WinClose, ahk_exe nox.exe ExitApp } 1 Quote Link to comment Share on other sites More sharing options...
AliMujahid20 Posted March 21, 2023 Share Posted March 21, 2023 On 2/9/2021 at 9:45 AM, JoeViking245 said: Create a new text file and save it to somewhere you won't forget nor accidentally delete. Say somewhere like "D:\LaunchBox\ThirdParty\AutoHotkey\MyAHKs\" Inside that text file, put: Sleep, 20000 Send, ^0 $Esc:: { Send, !{F4} ExitApp } Now save the file, but save it with an "ahk" file extension. Say something like "noxScript.ahk". (make sure it doesn't save as "noxScript.ahk.txt") In Edit Game, go to the Additional Apps section and click Add Application... Give it a Name. In the Application Path, Browse to your ../LaunchBox/ThirdParty/AutoHotkey/ folder and select AutoHotkey.exe. In the Application Command-Line Parameters:, type in the full path to where you saved the file you created above. And put quotes around it. Check the box Automatically Run Before Main Application. Click OK and OK. Run your game and wait 20ish seconds and see if it goes fullscreen. It didn't worked for me. I'm using a Bluestacks game: Here's the additional app: This is my ahk script (F11 for fullscreen and Alt+F4 to close): This is my AutoHotkey exe: Please help me! Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted March 21, 2023 Share Posted March 21, 2023 4 hours ago, AliMujahid20 said: It didn't worked for me. What didn't work? You need to give more details. Or at least one detail. Help me to help you. After 10 seconds does it go fullscreen? Then what? Quote Link to comment Share on other sites More sharing options...
AliMujahid20 Posted March 21, 2023 Share Posted March 21, 2023 2 hours ago, JoeViking245 said: What didn't work? You need to give more details. Or at least one detail. Help me to help you. After 10 seconds does it go fullscreen? Then what? Nothing happens when the script runs (no fullscreen after 10 seconds and the game doesn't close with Alt+F4). Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted March 21, 2023 Share Posted March 21, 2023 If, after the game loaded, can you manually press F11 and it goes fullscreen? BlueStacks may not be able to accept key presses from an AHK script. But you might try: SetKeyDelay, 125, 50 Sleep, 10000 Send, {F11} ..and then add your escape sequence. 1 Quote Link to comment Share on other sites More sharing options...
AliMujahid20 Posted March 21, 2023 Share Posted March 21, 2023 (edited) 10 minutes ago, JoeViking245 said: If, after the game loaded, can you manually press F11 and it goes fullscreen? BlueStacks may not be able to accept key presses from an AHK script. But you might try: SetKeyDelay, 125, 50 Sleep, 10000 Send, {F11} ..and then add your escape sequence. Yeah, after the game loads and while the hotkey is running, nothing happens and I need manually press F11 to go fullscreen. PS: Delay commands didn't work either. Edited March 21, 2023 by AliMujahid20 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted March 21, 2023 Share Posted March 21, 2023 (another "try this") For the fullscreen thing, create a new file ("BSfullscreen" or whatever). In it, put: Set WshShell = WScript.CreateObject("WScript.Shell") WScript.Sleep 10000 WshShell.SendKeys "{F11}" Save the file with a .vbs extension. ("BSfullscreen.vbs") Create an(other) additional app to Run Before. Have the Application Path point to this file. If that works, you can thank @AliMujahid20 (you. lol). If it doesn't, you can blame me. Quote Link to comment Share on other sites More sharing options...
AliMujahid20 Posted March 21, 2023 Share Posted March 21, 2023 (edited) 16 minutes ago, JoeViking245 said: (another "try this") For the fullscreen thing, create a new file ("BSfullscreen" or whatever). In it, put: Set WshShell = WScript.CreateObject("WScript.Shell") WScript.Sleep 10000 WshShell.SendKeys "{F11}" Save the file with a .vbs extension. ("BSfullscreen.vbs") Create an(other) additional app to Run Before. Have the Application Path point to this file. If that works, you can thank @AliMujahid20 (you. lol). If it doesn't, you can blame me. Looks that it doesn't work for Bluestacks (it worked for other games and emulators)... And the Exit game option from Pause Screen doesn't close Bluestacks. Edited March 21, 2023 by AliMujahid20 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.