Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ShowText - return line number
#1
I wonder whether there exists a quick method to return a ShowText selected line number, as in the case of j=PopupMenu. Actually, I can do it by trigering accessible object on Showtext window, but I am not happy with it, I do not find it elegant.

Best regards in advance

Simos
#2
Function ShowTextAndReturnLineIndex
Code:
Copy      Help
;/
function# $caption $text [hwndowner] [flags]

;Everything is the same as with <tip "#ShowText">ShowText</tip>, except:
;;;returns selected line index.
;;;flag 1 (nonmodal) unavailable.


opt waitmsg 1
int i he=id(3 ShowText(caption text hwndowner flags|1))
rep
,0.01
,if(!IsWindow(he)) break
,i=SendMessage(he EM_LINEFROMCHAR -1 0)
ret i

Macro
Code:
Copy      Help
int i=ShowTextAndReturnLineIndex("test" "one[]two[]three")
out i
#3
Dear Gintaras,
Superb,
Best Regards
Simos


Forum Jump:


Users browsing this thread: 1 Guest(s)