CallTipsForAll v2 - 2020/07/31 - a121

Share the finished AutoHotkey v2 Scripts and libraries you made here. Please put the current version of AutoHotkey v2 you used in Square Brackets at the start of the topic title.
User avatar
TheArkive
Posts: 330
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: CallTipsForAll v2 - 2020/06/08 - For AHK v2 (updated) / v1 (shelved)

Post by TheArkive » 09 Jun 2020, 06:52

toralf wrote:
09 Jun 2020, 06:36
Of cause it would be great if user objects would become "explorable". But I assume auto-complete would currently have a larger benefit for the user. Just my 2 cents.
I was thinking the same, just hoped i could get some feedback (of any kind). If I just develop this script for me it won't be as good :-P

One more thing to add to the discussion: I'm able to catalog if a property or method in a class is "Static" or not, so...
  • How should static properties and methods be shown in call tips?
  • Should the static members be listed in the class call-tip, and the non-static listed in the instance call-tip?
  • ... or should there be 4 sections on call tips? 1) Static methods, 2) methods, 3) static properties, and 4) properties
  • ... or should there be perhaps an indicator like (S) appended to the beginning end of each Static member in the comma separated list?
  • Other?
Currently, the display is exactly like the screenshot in the OP, and no indication of Static or not.

User avatar
TheArkive
Posts: 330
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: CallTipsForAll v2 - 2020/06/10 - For AHK v2 (updated) / v1 (shelved)

Post by TheArkive » 10 Jun 2020, 15:12

Update 2020/06/10
  • Added Auto-Complete feature
  • toggle Auto-Complete while typing in Settings window
  • Auto-Complete will dynamically change depending on if you are typing functions/commands or objects/properties/methods
Still need to designate Static class elements somehow. Please read previous post for ideas on this point of discussion and give me your feedback!

toralf
Posts: 792
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: CallTipsForAll v2 - 2020/06/10 - For AHK v2 (updated) / v1 (shelved)

Post by toralf » 10 Jun 2020, 15:38

Which files will you be working one in the near future?
I ask because I would like to avoid merge conflicts, I want to inspect the fileS That you will most likely not work on, and make proposals.
Hence, you could also name a few files that you will most likely not touch.
ciao
toralf

User avatar
TheArkive
Posts: 330
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: CallTipsForAll v2 - 2020/06/10 - For AHK v2 (updated) / v1 (shelved)

Post by TheArkive » 11 Jun 2020, 01:07

@toralf
actually go ahead and make another branch / pull request ... I"ll learn to properly use git hub :P
I'll close the other branch so we can start fresh

but to answer your question, the 4 main files are likely to be modified:
CallTipsForAll_AHKv2.ahk
_gui.ahk
_LoadElements.ahk
_ProcInfo.ahk

EDIT: Should i copy files to the branch and merge it? I'm actually not sure how to get back to one main branch...

User avatar
TheArkive
Posts: 330
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: CallTipsForAll v2 - 2020/06/10 - For AHK v2 (updated) / v1 (shelved)

Post by TheArkive » 11 Jun 2020, 01:58

@toralf
Ok i think i have a better understanding of pull requests now ... I just gotta slow down :P

toralf
Posts: 792
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: CallTipsForAll v2 - 2020/06/10 - For AHK v2 (updated) / v1 (shelved)

Post by toralf » 11 Jun 2020, 05:28

is there a reason that you made oCallTip as a class?
Currently it only contains static properties. Thus, it is essentially only an associated array. Or I think in v2 it is called a map.
Do you plan to add methods to oCalltip?
ciao
toralf

User avatar
TheArkive
Posts: 330
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: CallTipsForAll v2 - 2020/06/10 - For AHK v2 (updated) / v1 (shelved)

Post by TheArkive » 11 Jun 2020, 06:27

@toralf
That was actually an experiment to make an explorable object. It does the same either way of course.

toralf
Posts: 792
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: CallTipsForAll v2 - 2020/06/10 - For AHK v2 (updated) / v1 (shelved)

Post by toralf » 11 Jun 2020, 08:13

I’ll leave it as it is, maybe there is a chance to add methods to it at a later point in time
ciao
toralf

User avatar
TheArkive
Posts: 330
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: CallTipsForAll v2 - 2020/06/10 - For AHK v2 (updated) / v1 (shelved)

Post by TheArkive » 11 Jun 2020, 08:18

@toralf
Yah, it can go any direction. This whole thing is an experiment :P ... and a learning process for me.

User avatar
TheArkive
Posts: 330
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: CallTipsForAll v2 - 2020/06/15 - For AHK v2 (updated) / v1 (shelved)

Post by TheArkive » 15 Jun 2020, 12:40

Update 2020/06/15
  • Auto-Complete automatically closes when user finishes typing a word manually
  • Fixed case-sensitive lookup of objects/classes
  • several lines of code simplified thanks to toralf
  • class comments `; hide` and `; show` are temporarily non-functional, now all methods and properties will show up in classes
  • preparing to implement toralf's parser to get much more diagnostic script info to integrate into the script
  • updated call tips to a111
  • updated hotkeys format and JXON lib for a111
Last edited by TheArkive on 15 Jun 2020, 15:49, edited 1 time in total.

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

Re: CallTipsForAll v2 - 2020/06/15 - For AHK v2 (updated) / v1 (shelved)

Post by boiler » 15 Jun 2020, 15:11

TheArkive wrote:
15 Jun 2020, 12:40
Update 2020/06/15
I'm not finding the new version on GitHub. Where do you get it? I guess I have to go to one of the branches. I see updates there. I would have thought the master branch would have the latest announced update.

User avatar
TheArkive
Posts: 330
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: CallTipsForAll v2 - 2020/06/15 - For AHK v2 (updated) / v1 (shelved)

Post by TheArkive » 15 Jun 2020, 15:24

@boiler
Thanks for letting me know. You should see the updates now. Not sure what happened...

EDIT: Updates should be in master branch, as would be expected.
Last edited by TheArkive on 15 Jun 2020, 15:29, edited 1 time in total.

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

Re: CallTipsForAll v2 - 2020/06/15 - For AHK v2 (updated) / v1 (shelved)

Post by boiler » 15 Jun 2020, 15:28

Great. Thank you.

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

Re: CallTipsForAll v2 - 2020/06/15 - For AHK v2 (updated) / v1 (shelved)

Post by boiler » 15 Jun 2020, 15:32

@TheArkive, I'm still getting errors that are occurring because it's not compatible with the a111 changes. The hotkeys are still old style without braces.

User avatar
TheArkive
Posts: 330
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: CallTipsForAll v2 - 2020/06/15 - For AHK v2 (updated) / v1 (shelved)

Post by TheArkive » 15 Jun 2020, 15:37

@boiler
my bad ... I updated the lang files and forgot that part >_< ... I'm on it

EDIT: @boiler Ok, NOW it should be good.

EDIT2: scratch that ... gotta fix a few more things...

User avatar
TheArkive
Posts: 330
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: CallTipsForAll v2 - 2020/06/16 - AHK v2

Post by TheArkive » 16 Jun 2020, 04:05

Update 2020/06/16
  • somehow StrRepeat() function was removed and blanking out comments for capturing classes was also undone, this puts those functions back
  • fixed settings not loading on first run after filling out settings dialog
  • fixed a few AHK v2 a111 changes:
    array for guiObj.Add()
    gui.pos -> gui.GetPos(x,y,w,h)
Last edited by TheArkive on 16 Jun 2020, 16:09, edited 3 times in total.

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

Re: CallTipsForAll v2 - 2020/06/16 - AHK v2

Post by boiler » 16 Jun 2020, 09:21

Thanks for the update. This is the first time I've downloaded an update since you added the GUI and auto-complete. It's generally working, but I'm having some troubles:
  • Sometimes when I arrow down through the auto-complete list then press Enter, it doesn't accept the Enter as having selected that item. The list disappears, the item isn't sent to my editor, and the Enter gets sent to the editor window to start a new line.
  • It seems to be finicky about when auto-complete will automatically start when I start typing.
  • When I click on a calltip, it's bringing up an empty help window, not my v2 help file. Is that because I don't have v2 as my primary installation, so the only help file in my standard install location is for v1 (which has a different name)? It would be nice if this were configurable to point to a different location for the help file, especially since v2 isn't always the primary AHK installation.
  • The background color for the auto-complete box is white, so I'm getting yellow on white, which I can't see. If I change it to a darker font color, then I can't see it on the dark background of the calltip. Can the background for the auto-complete be selectable, or is the only solution to choose a light background for the calltip so that a dark font color works on both?
Also, a couple suggestions:
  • It would be nice to have it automatically show the calltip for an item when it's selected from the auto-complete box instead of then having to use the hotkey or use the mouse to double-click on it.
  • Could the various hotkeys be user-selectable? I realize I can change them in the script, but then those changes would be lost with updates.
Thanks for your consideration. By the way, I'm using Notepad++ to test it out. I generally use VSCode, but obviously can't for this.

User avatar
TheArkive
Posts: 330
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: CallTipsForAll v2 - 2020/06/16 - AHK v2

Post by TheArkive » 16 Jun 2020, 10:00

boiler wrote:
16 Jun 2020, 09:21
Sometimes when I arrow down through the auto-complete list then press Enter, it doesn't accept the Enter as having selected that item. The list disappears, the item isn't sent to my editor, and the Enter gets sent to the editor window to start a new line.
This is definitely unexpected behavior. How have you filled out your settings in the Settings dialog? A screenshot will suffice if you like.

EDIT: The method I'm using now to try and send text to the scintilla control is not ideal at all. I'm working with SendMessage() now to try and find a better method. I've had mixed results, though it mostly works on my system. Hopefully if I find a SendMessage() solution it will be more reliable on other systems.
It seems to be finicky about when auto-complete will automatically start when I start typing.
What's your PC specs? And what version of windows are you on? I'm on an Intel i7 processor, 2.5 GHz / 8 cores with 16GB of RAM. It's possible I need to find a more efficient method. I have the timer set to 100 ms, so if you type faster than that then you won't see autocomplete until you stop typing. I can probably make this a user setting. Search for SetTimer "LoadAutoComplete", -100 and keep the value below 0, but make it less than 100. It behaves acceptably on my PC. I don't usually feel like I need the auto-complete window to be "ever present" as i type, especially when I'm going fast and don't need any of the suggestions.
When I click on a calltip, it's bringing up an empty help window, not my v2 help file. Is that because I don't have v2 as my primary installation, so the only help file in my standard install location is for v1 (which has a different name)? It would be nice if this were configurable to point to a different location for the help file, especially since v2 isn't always the primary AHK installation.
The help file it searches for is actually in the script folder \Languages folder. Place and overwrite your desired help chm there. I can have the script check for an installation and use that CHM, that shouldn't be an issue.
The background color for the auto-complete box is white, so I'm getting yellow on white, which I can't see. If I change it to a darker font color, then I can't see it on the dark background of the calltip. Can the background for the auto-complete be selectable, or is the only solution to choose a light background for the calltip so that a dark font color works on both?
The background for the autocomplete is definitely supposed to be the same color as the call tips. I use a dark windows custom theme, so I'll disable that and test out auto-complete. I probably just missed something, or something unexpected may have broken in a111.
It would be nice to have it automatically show the calltip for an item when it's selected from the auto-complete box instead of then having to use the hotkey or use the mouse to double-click on it.
Very cool idea! I'll add that to the to-do list.
Could the various hotkeys be user-selectable? I realize I can change them in the script, but then those changes would be lost with updates.
This is a planned feature.
Thanks for your consideration. By the way, I'm using Notepad++ to test it out. I generally use VSCode, but obviously can't for this.
I've been looking for a way to interface this script with VSCode, but haven't been successful yet.

Thanks for the feedback!

EDIT: I've already fixed the background color for auto-complete, haven't pushed the updated yet though.

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

Re: CallTipsForAll v2 - 2020/06/16 - AHK v2

Post by boiler » 16 Jun 2020, 11:08

TheArkive wrote: This is definitely unexpected behavior. How have you filled out your settings in the Settings dialog? A screenshot will suffice if you like.
It doesn't seem like a settings issue.
CallTipsForAll v2 settings.png
CallTipsForAll v2 settings.png (16.35 KiB) Viewed 655 times
TheArkive wrote: What's your PC specs? And what version of windows are you on? I'm on an Intel i7 processor, 2.5 GHz / 8 cores with 16GB of RAM. It's possible I need to find a more efficient method. I have the timer set to 100 ms, so if you type faster than that then you won't see autocomplete until you stop typing. I can probably make this a user setting. Search for SetTimer "LoadAutoComplete", -100 and keep the value below 0, but make it less than 100. It behaves acceptably on my PC. I don't usually feel like I need the auto-complete window to be "ever present" as i type, especially when I'm going fast and don't need any of the suggestions.
I have an Intel i7, 3.6 GHz, 12 GB of RAM, Windows 10 Pro, version 1909. It doesn't seem like that should be the issue. It's not an issue of responsiveness. It seemed like sometimes it wouldn't work at all no matter how slow I typed, but I think I see now it might be because I had the settings window open, and when it's not, it seems to be working fine.
TheArkive wrote: The help file it searches for is actually in the script folder \Languages folder. Place and overwrite your desired help chm there. I can have the script check for an installation and use that CHM, that shouldn't be an issue.
I see what happened there now. It came up blank even when I double-click on the file from that folder. And that was after it asked me if I'm sure I wanted to open that file. When I unchecked the box saying to always ask me, it works.
TheArkive wrote: I've already fixed the background color for auto-complete, haven't pushed the updated yet though.
Thanks. No hurry.

I appreciate the responses!

toralf
Posts: 792
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: CallTipsForAll v2 - 2020/06/16 - AHK v2

Post by toralf » 16 Jun 2020, 11:14

I you need sample code for the configurable hotkeys, let me know. in AHK Projekt Manager I'll added a few:
20200616 AHK Project Manager - 0.2 - 000221.jpg
20200616 AHK Project Manager - 0.2 - 000221.jpg (15.99 KiB) Viewed 639 times
ciao
toralf

Post Reply

Return to “AutoHotkey v2 Scripts and Functions”