Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Locate the rectangle of the icon in a tooltip
#1
I tried to locate the icon in a tooltip created by :

int IconFile=GetIcon("....ico" 0)

mac "ShowTooltip" "" "test[]tooltip" -1 300 100 400 1|2|4 IconFile

using scan, but I failed.

Any advice is mostly welcome. Thanks in advance.
#2
this works for me no problem on windows 10


Code:
Copy      Help
mac "ShowTooltip" "" "test[]tooltip" -1 300 100 400 1|2|4 "Test" "shell32.dll,4"
0.3
int w=win("" "tooltips_class32")
scan "image:hF78E7989" w 0 1|2|16

   

did you forget to add the image as a resource of the function your using? if your create the scan code in a different function need to add image file as a resource of the new function.

what's the error message your getting?
something like this?
Error (RT) in   resource not found. ?

or other?

object not found?
needs a slight delay from when ShowTooltip is called and when you start scan
0.3
was as low as i could go anything less would get object not found error.
#3
Dear Kevin,

Thanks for your advice. The message was "object not found". The delay I have used was 3-5 s, nevertheless it did not work. I will try again, and I will let you know accordingly. Best regards.
#4
I am wondering why the above showtooltip command produces a tooltip without an icon.
#5
you really don't need the mac command when calling  ShowTooltip with flag 2. Flag 2 creates a new thread  mac isn't necessary.
can call  like this instead

Code:
Copy      Help
ShowTooltip "test[]tooltip" -1 300 100 400 1|2|4 "Test" "shell32.dll,4"
#6
Thanks, OK, I get the icon, however I have problem with scan:

resource not found.   

How can I find the resource (image) name? I check with the "resource" toolbar, but I failed.
#7
If you are using  my example  download the attachment  then select  the function that has the example  code in it . Click resources button  on qm main window  then on resources  dialog  click add  then import  from file  then scan code should  work


download this
   
#8
I am sorry, but there is nothing to download. Thank you for your attention.
#9
the attachment is the folder image see picture below

   

here is zip version if you still have trouble

.zip   hF78E7989.zip (Size: 433 bytes / Downloads: 243)
#10
Thank you, just downloaded, .zip version. Still impossible to download from the picture shown. It is very likely I am doing something wrong.

Just run, successfully. Many thanks indeed !
#11
When attachment is an image have to right  click the image. Then  save image

Cool glad you got it working
#12
I understand. Thank you, it works now, following your advice.


Forum Jump:


Users browsing this thread: 1 Guest(s)