Help with editing a script Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
hieveryone
Posts: 43
Joined: 28 Nov 2022, 01:31

Help with editing a script

26 Dec 2022, 02:26

i saaved it as an ahk and i cant edit it.
i have notepad but i cant edit it
User avatar
gregster
Posts: 9253
Joined: 30 Sep 2013, 06:48

Re: Help with editing a script

26 Dec 2022, 02:40

Not sure what you are asking.
A script file with AHK extension is just a text file with a different extension. You can edit it with any text editor.
Perhaps you can elaborate. What are you doing exactly? What is happening?
hieveryone
Posts: 43
Joined: 28 Nov 2022, 01:31

Re: Help with editing a script

28 Dec 2022, 00:06

gregster wrote:
26 Dec 2022, 02:40
Not sure what you are asking.
A script file with AHK extension is just a text file with a different extension. You can edit it with any text editor.
Perhaps you can elaborate. What are you doing exactly? What is happening?
Well I'm trying to open it with note pad but it can't. Could someone tell me what I'm supposed to be doing? I've read the docs and tried it it just doesn't work. Like if you want to open it through ahk box thing it just creates a new one.

I wish there was a way to copy the script of an ahk file. Could some one teach me?
User avatar
boiler
Posts: 17696
Joined: 21 Dec 2014, 02:44

Re: Help with editing a script

28 Dec 2022, 02:39

hieveryone wrote: Well I'm trying to open it with note pad but it can't.
You haven’t elaborated as asked. You haven’t described what you are doing and seeing as a result in any detail at all. Be very specific in the steps you are taking when you try to open the file and exactly what you see including error messages that would illustrate what you mean by “I’m trying to open it with note pad” and “it can’t.”

If you are right-clicking on the file in File Explorer, don’t select “Open” since that attempts to run the script. Same if you double-click the file. Right-click on it and select “Edit.”. Another approach is to open it from Notepad from the “File” menu. After selecting that, choose “Open…” then choose your script file.

hieveryone wrote: Like if you want to open it through ahk box thing it just creates a new one.
Again, be very specific. What is the “ahk box thing”?

hieveryone wrote: I wish there was a way to copy the script of an ahk file. Could some one teach me?
There is. Just like you copy any other file. There is nothing special about AHK files, especially in this respect. Like gregster said, they are just text files. Have you copied other files before? You can also select the text in it and copy it for pasting somewhere else once you open it in a text editor like Notepad.
hieveryone
Posts: 43
Joined: 28 Nov 2022, 01:31

Re: Help with editing a script

09 Jan 2023, 23:05

boiler wrote:
28 Dec 2022, 02:39

There is. Just like you copy any other file.
There is nothing special about AHK files,
The special part is when you open it runs the script
especially in this respect. Like gregster said, they are just text files. Have you copied other files before? You can also select the text in it and copy it for pasting somewhere else once you open it in a text editor like Notepad.
how to select text in it?

I also tried opening in note pad , you cant select an ahk file to open so it doesnt work



maybe im just retarded
User avatar
boiler
Posts: 17696
Joined: 21 Dec 2014, 02:44

Re: Help with editing a script

09 Jan 2023, 23:25

I’m not sure why you’re expecting any more replies when we have tried multiple times to get you describe very specifically exactly how you’re trying to open it in Notepad or whatever else, and now you’ve said even less than ever.

hieveryone wrote: I also tried opening in note pad , you cant select an ahk file to open so it doesnt work
That’s not true at all. Did you try going to the File menu in Notepad and selecting Open? Did you try right-clicking on the .ahk file in File Explorer and selecting Edit?
hieveryone
Posts: 43
Joined: 28 Nov 2022, 01:31

Re: Help with editing a script

09 Jan 2023, 23:34

boiler wrote:
09 Jan 2023, 23:25
I’m not sure why you’re expecting any more replies when we have tried multiple times to get you describe very specifically exactly how you’re trying to open it in Notepad or whatever else, and now you’ve said even less than ever.

hieveryone wrote: I also tried opening in note pad , you cant select an ahk file to open so it doesnt work
That’s not true at all. Did you try going to the File menu in Notepad and selecting Open? Did you try right-clicking on the .ahk file in File Explorer and selecting Edit?
yep i pressed open in note pad it can only open .txt not .ahk maybe its just my note pad?
User avatar
boiler
Posts: 17696
Joined: 21 Dec 2014, 02:44

Re: Help with editing a script

09 Jan 2023, 23:36

There's a dropdown list in the lower-right corner where you can change it from "Text Documents" to "All Files".
hieveryone
Posts: 43
Joined: 28 Nov 2022, 01:31

Re: Help with editing a script

14 Jan 2023, 04:24

boiler wrote:
09 Jan 2023, 23:36
There's a dropdown list in the lower-right corner where you can change it from "Text Documents" to "All Files".
how to do that ive already saved it as an ahk pls help
User avatar
boiler
Posts: 17696
Joined: 21 Dec 2014, 02:44

Re: Help with editing a script  Topic is solved

14 Jan 2023, 07:25

1. Open Notepad.
2. Click on the "File" menu.
3. Select "Open..'"
4. In the dropdown menu in the lower-right, change it from "Text Documents (*.txt)" to "All Files (*.*)".
5. Navigate to your file in the main part of the screen and click on it to select it.
6. Click the "Open" button.
hieveryone
Posts: 43
Joined: 28 Nov 2022, 01:31

Re: Help with editing a script

21 Jan 2023, 01:44

boiler wrote:
14 Jan 2023, 07:25
1. Open Notepad.
2. Click on the "File" menu.
3. Select "Open..'"
4. In the dropdown menu in the lower-right, change it from "Text Documents (*.txt)" to "All Files (*.*)".
5. Navigate to your file in the main part of the screen and click on it to select it.
6. Click the "Open" button.
thanks alot
Stefan0
Posts: 7
Joined: 02 Jun 2023, 04:14

Re: Help with editing a script

19 Sep 2024, 18:58

As soon as I saw and read this post, I thought, or I knew what this user meant. For a moment I felt like him/her, in the sense that sometimes you wish people would understand what you want to say or specify. And usually, any file in most languages (vb, vbs, c++, ahk) and so on​​, can be edited with Notepad. But nevertheless, I feel that what this person wanted to say is that when he/she right clicked the file, such option was not there. I mean, the right-click option in windows explorer contextual menu. Now, most of us use notepad to edit a .html page or any other code file. And you do it by first opening notepad and then dragging and dropping the file on it. But as we get used to something that disappears with the passing of something, then we miss it. In my case, I've been using AHK for a while to multitask a couple of times, but a couple of days ago, I noticed that the option to edit AHK scripts had disappeared from the explorer context menu. I only get two options now. The: 'Compile Script' and 'Compile Script (GUI)...'. But not the 'Edit script'. Since I started using AHK, I also started using Adventure as the default AHK editor. But from one moment to another, I don't know what happened, but the contextual menu that I already talked about disappeared. I wonder if this is or was the case with hieveryone.
Attachments
Example.png
Example.png (38.72 KiB) Viewed 1729 times
Sir MR potatohead
Posts: 47
Joined: 16 Jan 2024, 22:31

Re: Help with editing a script

20 Sep 2024, 07:44

1- Install SciTE4AutoHotkey from here https://www.autohotkey.com/scite4ahk/
2- Right click on a AHK script
3- Hover your mouse pointer on Open With
4- you should see SciTE4AutoHotkey in the list
5- click on the SciTE4AutoHotkey icon and it opens the script.

to choose Notepad as your preferred editor, do step 2 and 3; click on Choose another app; you should see Notepad in the suggested app list

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: emmanuel d, Stem75 and 176 guests