CallTipsForAll v2 - 2020/07/31 - a121

Post your working scripts, libraries and tools.
toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

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

16 Jun 2020, 11:20

To interact with NPP I use wrapper functions. You might find something useful in there that you could use to make interaction with NPP more robust.
Attachments
NPPM.ahk
(47.28 KiB) Downloaded 159 times
ciao
toralf
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

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

16 Jun 2020, 12:12

boiler wrote:
16 Jun 2020, 11:08
It doesn't seem like a settings issue.
Yah, your settings are fine. I know those settings aren't complex. just had to be sure :-P
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.
Yah, because of how this is trying to hook into another program, it was simpler to disable the call tips and auto-complete when the Settings window was open. This was intentional.
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.
That's weird. I don't get that dialog on my system. If you can possibly replicate that and take a screenshot of that dialog that would help. I think that might be an ActiveX security thing. I actually have a saved .reg file that sets a list of "trusted" files so I don't keep getting those kinds of dialogs. I use this .reg file every time I reinstall windows.

Ok, I'll be pushing an update soon-ish. I'm having steady progress with WM_ messages and the scintilla control. I'm close to improving the auto-complete response when selecting an item.

BTW, please try auto-complete again with Settings window closed. Does it at least perform the auto-complete? Currently auto-complete isn't proper, and won't fix case of the fragment that was typed before selection of the auto-complete keyword. I'm trying to resolve that now.

Can you give me a specific instance of how you want the auto-complete to show the calltip right after selection? That only makes sense if the selected item is a method, function, or command, generally speaking... Is that what you meant?
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

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

16 Jun 2020, 12:14

@toralf
I could use a few code examples for setting hotkeys dynamically. I know it most likely will use the Hotkey command to set/clear hotkeys based on the user's selection.

THANK YOU for the wrapper functions! I'm going for a minimalist approach first, but these functions will likely save me a ton of time :-D thank you!!!
User avatar
boiler
Posts: 16915
Joined: 21 Dec 2014, 02:44

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

16 Jun 2020, 12:37

TheArkive wrote: Yah, your settings are fine. I know those settings aren't complex. just had to be sure :-P
I understand. You never know until you check.
TheArkive wrote: That's weird. I don't get that dialog on my system. If you can possibly replicate that and take a screenshot of that dialog that would help. I think that might be an ActiveX security thing. I actually have a saved .reg file that sets a list of "trusted" files so I don't keep getting those kinds of dialogs. I use this .reg file every time I reinstall windows.
It looks like a standard Windows dialog discussed here:
https://answers.microsoft.com/en-us/ie/forum/all/open-file-security-warning/5add01b0-7663-4524-b8e8-21e1f706da83
I had to download the file again to get a fresh version of it before I could replicate it, but here it is.:
open file security warning.png
open file security warning.png (19.85 KiB) Viewed 7405 times
TheArkive wrote: BTW, please try auto-complete again with Settings window closed. Does it at least perform the auto-complete? Currently auto-complete isn't proper, and won't fix case of the fragment that was typed before selection of the auto-complete keyword. I'm trying to resolve that now.
It seems to work very well now. I was trying different settings regarding the font and background colors, so that's why I had the settings window open for a while before.
TheArkive wrote: Can you give me a specific instance of how you want the auto-complete to show the calltip right after selection? That only makes sense if the selected item is a method, function, or command, generally speaking... Is that what you meant?
Yes, that's exactly what I mean. So if I start typing "Control..." and then arrow down and select "ControlSetExStyle" by pressing Enter, for example, then it would be nice if it automatically did the auto-complete (as it currently does) and also popped up the calltip at the same time. I'd rather have it show the calltip by default than to have to double-click the function name or to press a hotkey. I suppose not everyone would want that, so perhaps it could be an option. Just a suggestion, of course. It's up to you whether you feel that's worth implementing.
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

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

16 Jun 2020, 13:25

@boiler
Ok cool I'm glad it's working :-)

Adding that option for convenience shouldn't be too hard. I almost have a proper auto-complete working too.

I thought that was the dialog you were getting. I'm afraid that's not something I can directly fix, unless I try to auto-detect an AHK installation. My original intent was to make this a call tip solution for multiple languages, but the deeper i get into this, the more that seems like a pipe dream :P ...

I should be able to store user-specified help files per language. I'll find a way to do that too. Thanks for the feedback!
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

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

16 Jun 2020, 16:08

Update 2020/06/16 (part 2):
  • auto-complete improved with SendMessage() for scintilla
  • selection in auto-complete now has proper case
  • auto-complete selection now opens a call tip if selection is a command, function, object, method, or property
  • fixed background color of auto-complete
User avatar
boiler
Posts: 16915
Joined: 21 Dec 2014, 02:44

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

16 Jun 2020, 16:17

Love it! Keep up the good work! :clap:
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

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

16 Jun 2020, 16:24

@boiler
Thanks! There's certainly more to come :D
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

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

16 Jun 2020, 23:17

boiler wrote:
16 Jun 2020, 12:37
It looks like a standard Windows dialog
Yes, it's a common issue with CHM files that came from the Internet. You can also "unblock" the file from within the file's properties dialog. I think you might only occur if you launch the file via the shell; i.e. not if you run the equivalent command line (with hh.exe and parameters) directly.
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

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

17 Jun 2020, 00:27

lexikos wrote:
16 Jun 2020, 23:17
I think you might only occur if you launch the file via the shell; i.e. not if you run the equivalent command line (with hh.exe and parameters) directly.
Sadly I do use the cmd line directly:

Code: Select all

cmd := "hh.exe mk:@MSITStore:" helpFile "::" Trim(link,"`r`n")
Run cmd,, "maximize"
EDIT: Any other ideas?
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

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

17 Jun 2020, 03:41

Delete all streams marked ":Zone.Identifier:$DATA" for the selected files to get rid of the security blocks.
Source: windows - "This file came from another computer..." - how can I unblock all the files in a folder without having to unblock them individually? - Super User
So this does the job in v2, supposing the file is AutoHotkey.chm, in the working directory:

Code: Select all

if FileExist(fp := "AutoHotkey.chm:Zone.Identifier:$DATA")
{
    FileDelete fp
    MsgBox "File unblocked"
}
else
    MsgBox "File was not blocked"
...or you could just try FileDelete.
Spoiler
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

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

17 Jun 2020, 05:40

@lexikos
Woah, thanks! I didn't know I could do that :)

I'll be looking into that for sure.
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

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

20 Jun 2020, 16:01

Update 2020/06/20
  • fixed issue with displaying call tips for built-in properties
  • a few more a112 fixes
  • made MultiClickDetect() into a class, easier to use now
  • added regex to recognize new keywords as objects: gui, menu, menubar
  • cleaned up some old code that did nothing
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

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

22 Jun 2020, 15:32

Update 2020/06/22
  • inputHook is now global. Found that when the user holds a key down, it ends up making dupe input hooks, and caused performance issues. This is now fixed.
  • Improved handling of {Enter} and {Tab}. Seems that these keys are properly suppressed and reactivated now when using Auto-Complete.
  • Improved flexibility of Auto-Complete, word fragment doesn't have to start with selected Auto-Complete entry to function properly now.
  • User can now use {Tab} to scroll through Auto-Complete. {Tab} will also cycle to the top when selection reaches the bottom.
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

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

24 Jun 2020, 05:42

Update 2020/06/24
  • added user-defined hotkeys in SettingsGUI
  • found a glitch when typing at the end of a document, one char is truncated, this should be fixed, may need further testing
  • every captured keypress now checks active window, this allows user to no longer be required to click on the text editor to "activate" the control as long as it has the focus
  • script detects ALT+Tab and changes .ctlActive to false
  • fixed a few issues where Auto-Complete was closing as expected but {Enter} suppression was still on
  • added user-defined hotkeys in SettingsGUI
  • found a glitch when typing at the end of a document, one char is truncated, this should be fixed, may need further testing
  • user functions now show up in auto-complete
  • selecting a user function brings up the call tip for that user-defined function
User avatar
boiler
Posts: 16915
Joined: 21 Dec 2014, 02:44

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

24 Jun 2020, 06:09

TheArkive wrote:
24 Jun 2020, 05:42
  • user functions now show up in auto-complete
  • selecting a user function brings up the call tip for that user-defined function
Nice!
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

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

24 Jun 2020, 06:40

@boiler

Glad ya like it :D

Let me know if the user-defined hotkeys do/don't work as expected. Also, I'm a little fuzzy on some of the more advanced uses of classes, so the display of class info could probably be improved, but I'm not really sure where to start, or what should/could be changed.
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

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

26 Jun 2020, 01:49

Update 2020/06/26
  • fixed unintentional breakage of Notepad.exe compatibility
  • ensured all call tips, auto-complete, and ProcInput() are disabled when Settings dialog is open
  • fixed string function parameters showing up as *******
  • added AHK_H v2 commands/functions/objects (as best I could, please post feedback!)
  • improved editor control detection for more reliability
    - using the multi-file search in Notepad++ shouldn't be an issue now
  • added "Try" in InputHook to avoid errors when trying to detect current window/control
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

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

28 Jun 2020, 06:37

Update 2020/06/28
  • Added WIN32API functions to AHK_H v2
  • accidental breakage of scanning libs fixed
  • fixed a missing reset of IncludesList on reload
  • fixed issue showing call tips for some classes
Known Issue: Extended running of CallTipsForAll sometimes results in errors, mostly related to window focus. Trying to fix these little-by-little as I come across them.

Please report errors! Just press CTRL+C when you get an error dialog (click on the dialog first to give it focus) and paste the error in a reply in this thread.
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

Re: CallTipsForAll v2 - 2020/07/01 - a113

01 Jul 2020, 07:12

Update 2020/07/01
  • updated lang files for v2-a113
  • after selecting Auto-Complete, call tip now shows (as intended) for all except properties without params (class properties can have params)
  • updated a few lines of code for the new commands in a113

Return to “Scripts and Functions (v2)”

Who is online

Users browsing this forum: No registered users and 18 guests