New AHK file is empty, why? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Krd
Posts: 405
Joined: 10 Mar 2020, 02:46

New AHK file is empty, why?

Post by Krd » 26 May 2022, 14:50

Hello,

Windows 10 64 bits.

Latest current version is showing this when a new files is created on my personal PC:

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.


But my work PC wich have the current autohotkey version from MS Store shows nothing when a new file is created. It happened when it got updated from the version 1.1.33.10.

Any Idea what is wrong? I have no access to the directory nore uninstalling and reinstalling of ahk without customer support :roll: .

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

Re: New AHK file is empty, why?

Post by mikeyww » 26 May 2022, 15:15

You can create scripts with any text editor. Perhaps you had set up your editor with a template of some kind. That is up to you.

User avatar
WalkerOfTheDay
Posts: 710
Joined: 24 Mar 2016, 03:01

Re: New AHK file is empty, why?

Post by WalkerOfTheDay » 26 May 2022, 15:15

You probably are using an editor like AHK Studio at home which creates those lines automatically.

If you don't have it installed at work you are probably using notepad?

BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: New AHK file is empty, why?

Post by BoBo » 26 May 2022, 15:22

https://www.autohotkey.com/board/topic/39420-where-is-the-new-autohotkey-scriptahk-template/

It might be related to access permissions/restrictions regarding the Windows directory ("… ShellNew\Template.ahk ") ? :think:

Krd
Posts: 405
Joined: 10 Mar 2020, 02:46

Re: New AHK file is empty, why?

Post by Krd » 26 May 2022, 15:51

So in other words there is no hope?

I am using notpad and notpad++ as I don't have access to site4u ect because of security. Had to beg for ahk from store editon in the first place:D

I can create files and they run fine but suddently they are emtpy and I don't like it.

Is there a spesefic thing I could report to IT guys to fix this? As itwas working before the update. They have missed up some other stuff too like encoding standard ...

BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: New AHK file is empty, why?  Topic is solved

Post by BoBo » 26 May 2022, 15:54

Well, they should simply drop your individual template file here: "C:\Windows\ShellNew\Template.ahk".
Regarding Notepad++ inspect the link I've provided above, and its registry settings.
That should do the trick. Good luck.

User avatar
boiler
Posts: 16768
Joined: 21 Dec 2014, 02:44

Re: New AHK file is empty, why?

Post by boiler » 26 May 2022, 16:33

mikeyww wrote: Perhaps you had set up your editor with a template of some kind.
WalkerOfTheDay wrote: You probably are using an editor like AHK Studio at home which creates those lines automatically.
Just so there's no confusion about an editor necessarily being the cause of this (although some might)... The standard installation of AHK creates the file with those lines in it when you create a new AHK file using the right-click context menu "New" > "AutoHotkey Script" in File Explorer without even having touched an editor. When that newly created file is then viewed in any editor including no-frills Notepad, it will be apparent that those lines are already in the file.

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

Re: New AHK file is empty, why?

Post by mikeyww » 26 May 2022, 20:17

Thanks, boiler. I never tried that!

Krd
Posts: 405
Joined: 10 Mar 2020, 02:46

Re: New AHK file is empty, why?

Post by Krd » 27 May 2022, 05:00

Thanks!

I will now report :)

Im bad at explaining clearly, it is as Boiler states.

Post Reply

Return to “Ask for Help (v1)”