Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Right-click to get the text of AutoText item
#1
Hi,

I want to get the text of AutoText list item by right-click

The following code sometimes prompts the following error message, Is there a better way?
Error (RT) in <open ":2241: /225">AT_List_Right:  invalid window handle.

Thanks in advance for any advice and help
david

Function AT_List_Right
Trigger !v"" "QM_PopupList"     Help - how to add the trigger to the macro
Code:
Copy      Help
out
int hwnd=TriggerWindow
int hlv=child("" "SysListView32" hwnd)
int mc=wait(5 MR); err
if mc
,_i=SendDlgItemMessage(hwnd 8888 LVM_GETNEXTITEM -1 LVNI_SELECTED)
;,_i=SendMessage(hlv LVM_GETNEXTITEM -1 LVNI_SELECTED) ;;Same effect as above
,GetListViewItemText hlv _i-1 _s 0 2; out _s
#2
Something strange  Huh
1.Sometimes there is an error message, but the value _s has output and the variable is correct
2.Sometimes there is an error message, but the variable _s has no output

Change to the following, still has no effect

Code:
Copy      Help
_i=SendMessage(hlv LVM_GETNEXTITEM -1 LVNI_FOCUSED|LVNI_SELECTED)

Using the above method, when the AutoText list is displayed, it will wait to press the right mouse button, which is inefficient

Is there a way, when the mouse moves over the AutoText list, press the right mouse button and output the text of the item below the mouse cursor?


Forum Jump:


Users browsing this thread: 1 Guest(s)