Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read YouTube links/numbers
#4
Macro Macro2822
Code:
Copy      Help
int w=wait(3 WV win(" - YouTube - Google Chrome" "Chrome_WidgetWin_1"))

;find the nearest common ancestor object, not DOCUMENT
Acc aParent.Find(w "STATICTEXT" "Links" "" 0x3001 3 0 "parent next")

ARRAY(Acc) aa; int i
ARRAY(str) aURL
;aParent.GetChildObjects(aa -1 "LINK" "^\S+ (Facebook|Twitter|Twitch|Instagram)$" "" 2) ;;by link name
aParent.GetChildObjects(aa -1 "LINK" "^\w+://www\.(facebook|twitter|twitch)\." "" 2) ;;by URL. Here it works because URL is in object Name, which is rare, usually URL is Value.
for i 0 aa.len
,Acc& r=aa[i]
,str name=r.Name
,str url=r.Value
,out "%-35s %s" aa[i].Name aa[i].Value
,aURL[]=url

Quote:As for the numbers, I cant get it to work.
That part does not work with newest Chrome installations because now is installed Chrome 64-bit. Need 32-bit.
But it is only one of ways of finding objects. Try this:
Macro Macro2824
Code:
Copy      Help
int w=wait(3 WV win(" - YouTube - Google Chrome" "Chrome_WidgetWin_1"))
Acc a.Find(w "PUSHBUTTON" "Subscribe" "" 0x3001 3 0 "next first")


Messages In This Thread

Forum Jump:


Users browsing this thread: 7 Guest(s)