10-05-2009, 09:07 AM
This is how to get all labels.
Macro opera label2
Getting sender name fails when there are multiple messages displayed. Then I don't know how macro can detect from which message you are downloading attachment.
Gmail web page structure is complex and dynamic. Difficult to find accessible elements. Easier if you use internet explorer.
Macro opera label2
out
Acc a=acc("More actions" "STATICTEXT" win("Gmail - *" "OpWindow" "" 1) "id=0 OpWindow" "" 0x1001)
Acc alab afrom asub
ARRAY(str) k ;;will store all labels here
a.Navigate("next first3" asub) ;;navigate from "More actions" to subject
int i
for i 2 1000
,_s.from("next" i " first3")
,asub.Navigate(_s alab) ;;navigate from subject to label
,err break ;;no more labels
,k[]=alab.Name
a.Navigate("next2 first17" afrom) ;;navigate from "More actions" to sender name
str from=afrom.Name
out "-- Labels --"
for i 0 k.len
,out k[i]
out "-- From --"
out from
Getting sender name fails when there are multiple messages displayed. Then I don't know how macro can detect from which message you are downloading attachment.
Gmail web page structure is complex and dynamic. Difficult to find accessible elements. Easier if you use internet explorer.