0
votes

I am using AutoHotkey to display the intellisense tooltip by using Ctrl+Space. When no more members can be listed, Ctrl+Space doesn't display the tooltip anymore and when that happen, I want to be able to detect it and stop my script.

I thought about using an offset of the caret position to detect a pixel color matching with the wrench icon color, but unfortunately it appears that AutoHotkey can't give the caret position coming from visual studio. I also tried using image and pixel search, without success :

Using this image enter image description here and this code

ImageSearch, OutputVarX, OutputVarY, 0, 0, 1920, 1080, C:\Users\slariviere\Pictures\wrench.jpg

enter image description here

I also tried looking for difference with the spy window. The first image shows a class when my mouse was on VS background.

enter image description here

When my mouse hover on the Intellisense tooltip, I don't have a class, could I leverage this ? enter image description here

Is there any other AutoHotkey functionality I could use ? Or is there any other way to detect for remaining class Properties in visual studio?

1
From what I have seen, the Intellisense tooltip is the only thing that doesn't have a a class name in VS. I could I use that to my advantage ?Simon ML
How could I use that to my advantage ? ***Simon ML
A few ideas: 1) Play around with WinGet and ControlGet, e.g. WinGet, list, ControlList, or maybe some other command option. For example, the number of controls before and after IntelliSense may give you what you need. 2) A long shot, but maybe WinGetText reveals the existence of the tooltip. 3) I don't see why ImageSearchfor the wrench symbol shouldn't work. Can you provide the code you came up with?MCL
You can always edit your question and add further information. I think it would be helpful to others if you provided the code that didn't work directly in your question (and also every other useful info like the tooltip not having a ClassNN etc.), and not just in the comments. To your code: Try saving the wrench symbol in a lossless format (e.g. BMP/PNG), this will increase the chances of ImageSearch finding it. Also, try to crop it as much as possible, so the (white) border is as small as possible.MCL
What is the window text about? "Find Symbol Results - 2 matches found" Does that correspond to the IntelliSense function?MCL

1 Answers

1
votes

MCL solution worked for me :

Try saving the wrench symbol in a lossless format (e.g. BMP/PNG), this will increase the chances of ImageSearch finding it. Also, try to crop it as much as possible, so the (white) border is as small as possible.

I saved the file as a PNG and the image I used was enter image description here to differentiate between the tooltip and the other places this image is used.