Jump to content
LaunchBox Community Forums

Script to full screen and exit nox player


Cnells2000

Recommended Posts

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.

Untitled.jpg

Edited by Cnells2000
Link to comment
Share on other sites

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.image.thumb.png.3530d646816e255b8a92be01098e3b44.png

  • Thanks 1
Link to comment
Share on other sites

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.image.thumb.png.3530d646816e255b8a92be01098e3b44.png

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

Link to comment
Share on other sites

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
}

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

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
}

Link to comment
Share on other sites

 

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. :D)

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
}

  • Game On 1
Link to comment
Share on other sites

  • 2 years later...
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.image.thumb.png.3530d646816e255b8a92be01098e3b44.png

It didn't worked for me. :( I'm using a Bluestacks game:

image.thumb.png.63da7d39f9b4ae44f8f4f85499a3db35.png

Here's the additional app:

image.thumb.png.3508b67adc8d5456a29f94eb934a454a.png

This is my ahk script (F11 for fullscreen and Alt+F4 to close):

image.png.f9d94280aa45fa6e8829e74ba9f599b9.png

This is my AutoHotkey exe:

image.thumb.png.413038c4b06406d65c11041d65d31111.png

Please help me!

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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 by AliMujahid20
Link to comment
Share on other sites

(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. ;) 

Link to comment
Share on other sites

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 by AliMujahid20
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...