Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get correct text from capture..
#1
Hi Gintaras,

i use WindowText capture method to put mouse over some controls, found by their text.

So far so good, but this one messes the system

I want the second #, the alone one, not Disque # text...

Capturetotext sample:

Disque # # Artiste

My code is this



Code:
Copy      Help
WindowText x.Init(w2)
x.Capture
x.Mouse(0 x.Find("#" 1 1) 0);err x.End
x.End

works but i'd like the way to find *exactly* what I ask, without the need to give the index,
so it finds directly the '#' caracter alone, and not find "Disque #" a match...

Thanks

Thanks
#2
If the second # always is at a known x offset, try to capture in a rectangle that includes only the second #. It should work if Disque # # Artiste are four text items in four table columns.

If Disque # # Artiste is single text item, use regular expression.
#3
yes, these are 4 distincts item .
no regex is possible to parse only # character???

As QM is non stantard regex using, i have trouble finding the right way...
#4
Regex will not help, it compares each item, not text Disque # # Artiste.

Another way - get array, then compare each item. You can compare text, position. You can compare items in reverse order, then will find the second # first. Can join text of several items if need.
#5
nope, don't worth extra work.
I can manage to have it always at the same position, and then use index in x.find function.

Thanks


Forum Jump:


Users browsing this thread: 1 Guest(s)