Possible to exit app from Desktop? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Evil-e
Posts: 262
Joined: 04 Sep 2018, 11:09

Possible to exit app from Desktop?

09 Nov 2018, 13:06

I have all my scripts with WinWait & WinClose , but those do not work on one particular window and forget to use my exit app hot key to shut it down manually, prior to closing window :(

Can I add something like...
----------------------------------------------------------------
$F12::
send C:\Documents and Settings\Eric\Desktop\exit app
return
----------------------------------------------------------------

:morebeard:

PS> I tried this and several variations with no success
I have a bit of experience opening and sending commands to game console and CMD.exe... just ask :)
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: Possible to exit app from Desktop?

10 Nov 2018, 02:24

WinWait & WinClose both have timeout parameters. Also if WinClose fails to work on an existing window you probably need to run the script elevated. (as admin)
Evil-e
Posts: 262
Joined: 04 Sep 2018, 11:09

Re: Possible to exit app from Desktop?

10 Nov 2018, 03:46

WinWait & WinClose fail, as the games executable cycles off / on during loading process and when it passes through the menu. Depending
on how long I spend in menu, there is no way to know how long a timeout is necessary.

This particular games Window Spy code has characters that AHK does not like, so will not launch with this:
-----------------------------------------------------------------------------------------------------------------------------
BF1942 (Ver:24821/2002-08-14, 22:04) ahk_class BF1942 (Ver:24821/2002-08-14, 22:04)
-----------------------------------------------------------------------------------------------------------------------------
I get: "Error: A ":" is missing its "?" message, AHK will now close, so Window Spy is not an option.

I have F12 mapped to ExitApp, but since all my other games will terminate via WinWait & WinClose, I just forget to use it :(


So that leaves me with the next best option is to look for a way to terminate AHK, via key stroke, once I have returned to Desktop :)

:morebeard:
I have a bit of experience opening and sending commands to game console and CMD.exe... just ask :)
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: Possible to exit app from Desktop?  Topic is solved

10 Nov 2018, 04:41

You can use partial wintitles:
BF1942 (Ver
Evil-e
Posts: 262
Joined: 04 Sep 2018, 11:09

Re: Possible to exit app from Desktop?

10 Nov 2018, 05:07

Image


maybe you're a babe.... I dunno. But either way your help is much appreciated :thumbup:

But, out of curiosity.... is there a way to terminate AHK when at desktop?

inquiry beards want to know :morebeard:
I have a bit of experience opening and sending commands to game console and CMD.exe... just ask :)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 122 guests