Open/Close specific file with same key Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
asad41163
Posts: 268
Joined: 29 Jul 2014, 14:31

Open/Close specific file with same key

24 Dec 2019, 17:48

Welcome my dear colleagues
I want to open and close this file (SampleSaveFile.ahk) In notepad using the same key,
can someone help me to do that?
Any help would be much appreciated.
Thanks in advance.
scriptor2016
Posts: 590
Joined: 21 Dec 2015, 02:34

Re: Open/Close specific file with same key  Topic is solved

24 Dec 2019, 19:18

Code: Select all

Window=SampleSaveFile.ahk - Notepad
FileLocation=you must enter the full path to your file here. So for example, type    c:\SampleSaveFile.ahk    on this line

z::
IfWinExist, %Window%
Winclose, %Window%
else
run, "notepad.exe" "%FileLocation%"
Return
asad41163
Posts: 268
Joined: 29 Jul 2014, 14:31

Re: Open/Close specific file with same key

25 Dec 2019, 11:18

scriptor2016
Thank you very much, my wonderful colleague. :superhappy:

Return to “Ask For Help”

Who is online

Users browsing this forum: utap2001 and 75 guests