AHK Studio

Editor for AutoHotkey written completely in AutoHotkey.

Moderator: maestrith

joshatt
Posts: 151
Joined: 07 Dec 2014, 08:41

Re: AHK Studio

Post by joshatt » 09 Apr 2019, 23:46

No problem. You can also use DebugWindow() for whatever you need it for like debugging or to put up random messages of encouragement (if you get bored)
Roger that.

User avatar
DuyMinh
Posts: 40
Joined: 05 May 2017, 08:34

Re: AHK Studio

Post by DuyMinh » 15 Apr 2019, 02:49

Hi maestrith.
I can't write unicode character in AHK Studio. Can you fix it? Thank you.

freespacing
Posts: 150
Joined: 28 Sep 2016, 11:14
Contact:

Re: AHK Studio

Post by freespacing » 15 Apr 2019, 05:15

DuyMinh wrote:
15 Apr 2019, 02:49
I can't write unicode character in AHK Studio.
Did you try Alt-M, then "Force UTF-8"?

freespacing
Posts: 150
Joined: 28 Sep 2016, 11:14
Contact:

Re: AHK Studio

Post by freespacing » 15 Apr 2019, 11:13

Three questions all related to the fabulous Project Explorer!

1. In the Project's File Browser, is it possible to sort the files by name?
They show up in order of having been opened. Refreshing the project explorer doesn't fix this.

2. When the included files are specifically open, they show up below, each with their Function explorer, which is great!!! But when refreshing the project, the function list of each included file doesn't refresh... So you go to refresh each file individually, but then Studio shows errors when these files reference functions in other files. Any way to do a Global Refresh that will repopulate the individual Functions browser of each file in the project (not just the project Functions browser)?

3. The Function navigator shows ALL functions in the project, even those of included files. That yields a humongous list. Is there an option to only show the function for that specific file — letting us use the specific Function browsers of included files to get there? I can imaging a Function browser for ALL files, then one for each file, including the main file.

Thanks in advance for considering these questions, @@maestrith !
Looking forward to your thoughts.

User avatar
DuyMinh
Posts: 40
Joined: 05 May 2017, 08:34

Re: AHK Studio

Post by DuyMinh » 15 Apr 2019, 12:20

freespacing wrote:
15 Apr 2019, 05:15
DuyMinh wrote:
15 Apr 2019, 02:49
I can't write unicode character in AHK Studio.
Did you try Alt-M, then "Force UTF-8"?
Thanks, i'l try it...
Can i ask another question? Do you know how to add calltip to ahk studio like scite (just add function to ahk.api)... Thank you.
Sorry my english is not good.

EDIT1: I try Force-UTF-8 but i can't using unicode character

freespacing
Posts: 150
Joined: 28 Sep 2016, 11:14
Contact:

Re: AHK Studio

Post by freespacing » 16 Apr 2019, 10:53

Howdy @maestrith ,

Hope this finds you in the middle of a great week.

Wonder if you could advise us users about whether you can think of a set of "safe settings" that one can flip so that the editor doesn't mess with saved files?

When working with multiple files in the editor (all included in one main project file, but all specifically opened independently so that they each display their own Function tree in the Project Explorer), I notice that quite often when I save changes in one of the library files then jump to the main file and back, the changes are gone… A bit of pain there, my man! ;)

Would love to know how to switch off every little setting that might cause AHK Studio to behave that way. Basically I'm looking for a set of "safe settings" so that AHK Studio never, ever reverts to a previous version of a file without being explicitly told to.

Thanks in advance for any thoughts!

User avatar
maestrith
Posts: 825
Joined: 16 Oct 2013, 13:52

Re: AHK Studio

Post by maestrith » 21 Apr 2019, 08:22

DuyMinh wrote:
15 Apr 2019, 02:49
Hi maestrith.
I can't write unicode character in AHK Studio. Can you fix it? Thank you.
Please let me know what UTF characters you are having trouble with.
John H Wilson III 05/29/51 - 03/01/2020. You will be missed.AHK Studio OSDGUI Creator
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32

User avatar
maestrith
Posts: 825
Joined: 16 Oct 2013, 13:52

Re: AHK Studio

Post by maestrith » 21 Apr 2019, 08:26

freespacing wrote:
16 Apr 2019, 10:53
Howdy @maestrith ,

Hope this finds you in the middle of a great week.

Wonder if you could advise us users about whether you can think of a set of "safe settings" that one can flip so that the editor doesn't mess with saved files?

When working with multiple files in the editor (all included in one main project file, but all specifically opened independently so that they each display their own Function tree in the Project Explorer), I notice that quite often when I save changes in one of the library files then jump to the main file and back, the changes are gone… A bit of pain there, my man! ;)

Would love to know how to switch off every little setting that might cause AHK Studio to behave that way. Basically I'm looking for a set of "safe settings" so that AHK Studio never, ever reverts to a previous version of a file without being explicitly told to.

Thanks in advance for any thoughts!
Studio is not really designed to do that. It is designed to open up a main project and then have all of the files that are included within it to be opened up below it. I do not have anything in place that keeps the files updated across multiple instances of a file being open so the issue you reported would be a problem.
John H Wilson III 05/29/51 - 03/01/2020. You will be missed.AHK Studio OSDGUI Creator
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32

User avatar
DuyMinh
Posts: 40
Joined: 05 May 2017, 08:34

Re: AHK Studio

Post by DuyMinh » 22 Apr 2019, 02:44

maestrith wrote:
21 Apr 2019, 08:22
DuyMinh wrote:
15 Apr 2019, 02:49
Hi maestrith.
I can't write unicode character in AHK Studio. Can you fix it? Thank you.
Please let me know what UTF characters you are having trouble with.
I cannot write vietnamese languague in this editor...
Like: tiếng việt
It can display ok when copy and paste but not when i code.
It will show look like: tieng viet

User avatar
maestrith
Posts: 825
Joined: 16 Oct 2013, 13:52

Re: AHK Studio

Post by maestrith » 22 Apr 2019, 04:28

DuyMinh wrote:
22 Apr 2019, 02:44
maestrith wrote:
21 Apr 2019, 08:22
DuyMinh wrote:
15 Apr 2019, 02:49
Hi maestrith.
I can't write unicode character in AHK Studio. Can you fix it? Thank you.
Please let me know what UTF characters you are having trouble with.
I cannot write vietnamese languague in this editor...
Like: tiếng việt
It can display ok when copy and paste but not when i code.
It will show look like: tieng viet
I only have access to an English keyboard so I can not test entering these keystrokes :( Copy/Paste works fine for me as well but I have no idea how to enter these characters without doing so to test and fix the issue. Let me know what sort of keyboard you use and how you are entering these characters and maybe I will be able to find something to help me replicate the issue.
John H Wilson III 05/29/51 - 03/01/2020. You will be missed.AHK Studio OSDGUI Creator
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32

freespacing
Posts: 150
Joined: 28 Sep 2016, 11:14
Contact:

Re: AHK Studio

Post by freespacing » 22 Apr 2019, 05:03

maestrith wrote:
21 Apr 2019, 08:26
Studio is not really designed to do that. It is designed to open up a main project and then have all of the files that are included within it to be opened up below it. I do not have anything in place that keeps the files updated across multiple instances of a file being open so the issue you reported would be a problem.
Thank you very much for explaining, @maestrith
I will do things differently.

Wishing you a great week.

User avatar
maestrith
Posts: 825
Joined: 16 Oct 2013, 13:52

Re: AHK Studio

Post by maestrith » 22 Apr 2019, 05:29

freespacing wrote:
15 Apr 2019, 11:13
Three questions all related to the fabulous Project Explorer!

1. In the Project's File Browser, is it possible to sort the files by name?
They show up in order of having been opened. Refreshing the project explorer doesn't fix this.

2. When the included files are specifically open, they show up below, each with their Function explorer, which is great!!! But when refreshing the project, the function list of each included file doesn't refresh... So you go to refresh each file individually, but then Studio shows errors when these files reference functions in other files. Any way to do a Global Refresh that will repopulate the individual Functions browser of each file in the project (not just the project Functions browser)?

3. The Function navigator shows ALL functions in the project, even those of included files. That yields a humongous list. Is there an option to only show the function for that specific file — letting us use the specific Function browsers of included files to get there? I can imaging a Function browser for ALL files, then one for each file, including the main file.

Thanks in advance for considering these questions, @@maestrith !
Looking forward to your thoughts.
1. As I use XML for storing the opened files it is a bit easier for me to have the order as you open them but I suppose there would be a way to have them alphabetized or to possibly make it so that you can move them up and down using a GUI or something. Drag/Drop within a TreeView and the way that I have Studio setup would be a coding nightmare...

2. How are you refreshing each file individually? Are you opening them one by one? If so then there will be error messages every time you refresh the Project/Code Explorer. I suppose I could make it so that it doesn't show the errors if that would be helpful but Studio is designed to help try to show errors and using an #Include outside of a Project without including all of the other files that that #Include relies on will cause an error as though you were trying to run that file individually. I'm curious to know why you would want to open each file individually?

3. The Code Explorer is something that I have not used myself since I wrote the Omni-Search window (Ctrl+Alt+O). You can easily search for your Functions, Classes, Labels...etc by using the Prefixes that are shown within it (^ for Files,: for Labels, ( for Functions). I suppose it would be possible to split up the Code Explorer by #Include but that'd be quite a bit of work, and for larger projects or multiple projects with a large amount of #Includes that could introduce not only lag, but confusion not to mention if you have a lot of #Includes (Like I do) then it really wouldn't clean up the Code Explorer much. I tried to keep it alphabetized by type (I think, I have not used it in years) but I really don't know how to keep that window useful for anyone who codes more than a couple files at a time. I'd be open to suggestions but I am not too sure how you are wanting to implement "letting us use the specific Function browsers of included files to get there?"
John H Wilson III 05/29/51 - 03/01/2020. You will be missed.AHK Studio OSDGUI Creator
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32

User avatar
DuyMinh
Posts: 40
Joined: 05 May 2017, 08:34

Re: AHK Studio

Post by DuyMinh » 23 Apr 2019, 08:09

maestrith wrote:
22 Apr 2019, 04:28
I only have access to an English keyboard so I can not test entering these keystrokes :( Copy/Paste works fine for me as well but I have no idea how to enter these characters without doing so to test and fix the issue. Let me know what sort of keyboard you use and how you are entering these characters and maybe I will be able to find something to help me replicate the issue.
I'm using Unikey, you can download it from here... https www.unikey.org /en/ Broken Link for safety
Encoding: Unicode
Input Method: Telex

You can try it in another editor and ahk studio
khoong theer code bawngf tienges vietej duowcj → it will display: không thể code bằng tiếng việt được

Thanks for rep my comment. :D

User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: AHK Studio

Post by jeeswg » 23 Apr 2019, 08:50

@DuyMinh/@maestrith:
From:
tiếng việt
to:
tieng viet
This would commonly occur when saving Unicode text as ANSI.
Often Unicode to ANSI replaces non-ANSI characters with ?.
But it is possible to specify to use best-fit characters where possible (similar-looking characters).
The question is: are you saving your files as Unicode or ANSI?

See also:
WC_NO_BEST_FIT_CHARS := 0x400
WideCharToMultiByte
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: AHK Studio

Post by SOTE » 23 Apr 2019, 23:43

DuyMinh wrote:
15 Apr 2019, 02:49
I can't write unicode character in AHK Studio.
One simple way, is to paste the script in Windows Notepad, and save the file as UTF-8.

1) When you click "Save As" in Notepad, at the bottom, you will see "Encoding"

2) Select "UTF-8"

3) With "Save as type", select "All Files"

4) Type in the name of your script, and use .ahk as the extension

Note- very important that you save it as a .ahk file and not as a .txt file. If you screw up, rename the file from .txt to .ahk later.

5) When you open the script in AHK Studio, you should not have a problem with encoding, as things will be UTF-8

User avatar
DuyMinh
Posts: 40
Joined: 05 May 2017, 08:34

Re: AHK Studio

Post by DuyMinh » 24 Apr 2019, 18:13

SOTE wrote:
23 Apr 2019, 23:43
DuyMinh wrote:
15 Apr 2019, 02:49
I can't write unicode character in AHK Studio.
One simple way, is to paste the script in Windows Notepad, and save the file as UTF-8.

1) When you click "Save As" in Notepad, at the bottom, you will see "Encoding"

2) Select "UTF-8"

3) With "Save as type", select "All Files"

4) Type in the name of your script, and use .ahk as the extension

Note- very important that you save it as a .ahk file and not as a .txt file. If you screw up, rename the file from .txt to .ahk later.

5) When you open the script in AHK Studio, you should not have a problem with encoding, as things will be UTF-8
Wel, i don't think it a good idea, i need to code using unicode in ahk studio. If follow your way, use scite will be better.

SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: AHK Studio

Post by SOTE » 24 Apr 2019, 23:06

Maybe you are not understanding. The point was to make sure that your script has the correct encoding (UTF-8 or unicode), and not to use Notepad as an editor or IDE. You would be using Notepad to make sure the encoding is what you need.

Also, it will help clarify the type of unicode encoding. Are you using UTF-8, UTF-16, or UTF-32? Unicode has different standards, which are not compatible with each other. By being sure which standard of unicode that you are using, it might help resolve the issue you are having in AHK Studio.

User avatar
DuyMinh
Posts: 40
Joined: 05 May 2017, 08:34

Re: AHK Studio

Post by DuyMinh » 25 Apr 2019, 11:39

SOTE wrote:
24 Apr 2019, 23:06
Maybe you are not understanding. The point was to make sure that your script has the correct encoding (UTF-8 or unicode), and not to use Notepad as an editor or IDE. You would be using Notepad to make sure the encoding is what you need.

Also, it will help clarify the type of unicode encoding. Are you using UTF-8, UTF-16, or UTF-32? Unicode has different standards, which are not compatible with each other. By being sure which standard of unicode that you are using, it might help resolve the issue you are having in AHK Studio.
Ah, sorry... i'm try with your step... Also it's UTF-8, i don't use UTF-16 or UTF-32 as you said... I think this error like jeeswg said.

Testertime
Posts: 7
Joined: 22 Aug 2017, 16:44

Re: AHK Studio

Post by Testertime » 01 May 2019, 08:36

Hello dear community. Can anyone please point me into the right direction where I can set and find breakpoints? Maybe even with a picture? I spent the last two hours to somehow find this feature, but I honestly haven't found it yet. Even after searching the forums. Thank you!

User avatar
maestrith
Posts: 825
Joined: 16 Oct 2013, 13:52

Re: AHK Studio

Post by maestrith » 01 May 2019, 10:29

Testertime wrote:
01 May 2019, 08:36
Hello dear community. Can anyone please point me into the right direction where I can set and find breakpoints? Maybe even with a picture? I spent the last two hours to somehow find this feature, but I honestly haven't found it yet. Even after searching the forums. Thank you!
Currently to add a BreakPoint you can put in a line ;*[BreakPoint Name] but then you have to do Alt+M Refresh Code/Project Explorer {Enter}
You can Shift+Click on the area to the right the line number but you will still have to Refresh the Code/Project Explorer
John H Wilson III 05/29/51 - 03/01/2020. You will be missed.AHK Studio OSDGUI Creator
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32

Post Reply

Return to “AHK Studio”