Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
htm text find next ..second question
#1
I would like to create a macro in the following way.

Quote:For example:

Tag name:
"apple" SPAN "cash" TD
1. apple 1,000cash
2 Pineapple 1,000cash
3 apple 900cash
4 Pineapple 1,3000cash
5 apple 800cash
6 apple 850cash
1. If find the text Less than "1,000cash" and "apple"
2. 1 line text name nonClick and 3 text "apple","900cash" Click
3. if next 5line text name"apple" 3line non click 5line Click
..
..
...
if not found
out "not found"



Please advise if there is any way.
#2
Just try this and see ...

Macro Macro13
Code:
Copy      Help
str s=
;Tag name: Span TD
;1. apple 1,000cash
;2. Pineapple 1,000cash
;3. apple 900cash
;4. Pineapple 1,3000cash
;5. apple 800cash
;6. apple 850cash

str line
ARRAY(str) a
int good_price=1000
foreach line s
,tok(line a -1 " " 0x2000)
,if (a[1]="apple")
,,a[2].findreplace("," "")
,,a[2].findreplace("cash" "")
,,if (val(a[2]) < good_price)
,,,good_price=val(a[2])
,,,_s = line

if(_s.len) out _s
else out "not found"
#3
Code:
Copy      Help
int IEFrame = win("" "IEFrame"); ;;mov+ 1080 0 840 990 IEFrame

lpstr keyword = "apple"
str price = 1000
Htm eSpan eParent

eParent=htm("BODY" "" "" IEFrame)

MSHTML.IHTMLElement2 e2=+eParent.el
MSHTML.IHTMLElement2 e3=+eParent.el
foreach eSpan.el e2.getElementsByTagName("TD")
foreach eSpan.el e2.getElementsByTagName("SPAN")

    str s=eSpan.Text
    out s
    if find(s keyword 0 1)>=0
        act IEFrame
            out "keyword find"
                eSpan.Mouse(0); wait 1

Thank you for good information.
Using the source of the web page in the
Only information about the keywords I want to click.


Forum Jump:


Users browsing this thread: 1 Guest(s)