Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Search for Variable anywhere within a string of text?
#1
How can I search for Variable anywhere within a string of text? eg. "*variable*"
#2
To explaina bit better, here's the code i'm using:

Code:
Copy      Help
'Cc
            str rtower
            rtower.getclip
            0.25
            lef 50 91 w6 ;; Cancel Out Of The Hosting Information Page.
            4
            int w7=act(win("ServiceCenter" ""))
            dou 754 257 w7
            dou 754 257 w7
            lef 696 258 w7
            lef+ 717 281 w7
            lef- 334 279 w7
            'Cc
            str agreement
            agreement.getclip
            
            if agreement = "*rtower*"
                
            else
                mes "Please check the Service Commitment and the Resolvers Hosting Tower are the same." "Incorrect Tower SLA?"

So basially i'm looking for the variable rtower, anywhere within the variable agreement.
#3
Does anyone know how I can do this?
#4
if(find(agreement rtover)>=0)
#5
Thanks Ginataras, is it possible to have it find it regardless of whether it is UPPER or lower case?

At the moment if rtower = "TEXT" and assignment = "Some Text" it shows as False.
#6
Yes, read about find in QM help.
#7
I tried setting the flag but it didn't work.

I tired..

if(find(agreement rtower 0 0)>=0)

and

if(find(agreement rtower 0)>=0)

Can you see what i'm doing wrong?

Edit:

Actually I misread it, should have been 1.
Seems to be working now.


Forum Jump:


Users browsing this thread: 1 Guest(s)