Exit app

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
jrachr
Posts: 545
Joined: 01 Mar 2021, 17:33

Exit app

03 May 2024, 07:45

Good Day. All the docs say when I press esc that Calc should close but it is not. Can anyone tell me why so I can fix this code. Tk's

Code: Select all

#NoEnv 
#Persistent 
#SingleInstance, Force
#NoTrayIcon




Run, "D:\Window's Shortcut's\Calculator - Shortcut.lnk"
Sleep 1000
SendInput, ^1
Sleep 1000
Winset, Alwaysontop, , A

Esc::ExitApp

Return
User avatar
mikeyww
Posts: 28871
Joined: 09 Sep 2014, 18:38

Re: Exit app

03 May 2024, 08:18

Which docs? Where are they?

I would have a look at the AHK documentation. ExitApp closes your AHK script.

To close a window, you can use WinClose.

Code: Select all

#Requires AutoHotkey v1.1.33.11
F2::Run calc
F3::WinClose Calculator
jrachr
Posts: 545
Joined: 01 Mar 2021, 17:33

Re: Exit app

03 May 2024, 09:06

By docs I was referring to the documentation. Sorry my bad. Tk's for quick fix. Cheer's
adam43
Posts: 1
Joined: 10 Jun 2024, 04:15
Contact:

Re: Exit app

10 Jun 2024, 04:18

jrachr wrote:
03 May 2024, 09:06
By docs I was referring to the documentation. Sorry my bad. Tk's for quick fix. Cheer's
No worries! Referring to "docs" is common in tech lingo. Quick fixes happen, and it's great that we're back on track. Cheers to smooth communication.
User avatar
boiler
Posts: 17706
Joined: 21 Dec 2014, 02:44

Re: Exit app

10 Jun 2024, 05:52

There really wasn’t any confusion about what “docs” meant. The question was which docs, because the AHK docs wouldn’t say that Esc closes the Calculator app, and that didn’t get answered.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], vanove and 169 guests