Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
getwintext help
#1
Hello, im trying to use this code to getwintext of a window then subtract part of it and OSD the part thats left but i have no idea how i would do this, this is all ive come up with so far and is far from working...thanks in advance.

Code:
Copy      Help
str s.getwintext(win("Quick Macros"))
str x = "Quick Macros - "
s-x
OnScreenDisplay s


A normal QM window says Quick Macros - File Name Here

I want it to subtract the Quick Macros - part and OSD the part thats left which would be the file name, hope this is possible Thanks!
#2

Look up "get" for a refernce in the QM help.


Code:
Copy      Help
str s.getwintext(win("Quick Macros"))
s.get(s 14)
OnScreenDisplay s
Taking on Quick Macros one day at a time
#3
thanks! that worked perfect with what i am doing!
#4
How would i go about to only get the text needed, im trying to cut it short by 1 letter at the end. its not for the window name but child text.

my example

"Thank you for choosing to stay with us at"

str s.getwintext(id(5434 "Exit"))
s.get(s 15)
out s

using that Im left with the " at the end and dont need it how would i go about to taking it out.
using this method if possible. ty
#5
s.fix(s.len-1)

or

s.get(s 0 s.len-1)
#6
ty works perfect.


Forum Jump:


Users browsing this thread: 1 Guest(s)