10-06-2009, 04:24 AM
i have change the array part for label since i didnt know how to add multiple labels into my path. Any ideas?
I now have sth like this:
so it works as i wanted. Although it would be cool to have multiple labels working. But i think for this i need to have ech label (lets say up to 3 labels) in str var like label1 label2 label3. Or myabe there is a way to do it with array too.
Is it a problem to also get the date and message body to string (maybe msg body to txt)?
I now have sth like this:
;In Internet Explorer, Gmail message view, move mouse on Download link and run this macro.
;It extracts sender name and message labels.
str path
str filename
str pfile
Acc a alab afrom
a=acc(mouse) ;;Download link
str s=a.Name
if(s!"Download") mes- "Mouse pointer must be on Download link." "" "x"
a.Navigate("parent3") ;;table containing Download link
rep ;;search for beginning of message (there is no separate parent object for a message)
,a.Navigate("previous"); err mes- "Failed." "" "x"
,a.Role(s)
,if(s="GROUPING") break ;;the down arrow in the top-right corner of the message
,;note: I don't know, maybe message body also sometimes contains GROUPING. Then need more testing here.
a.Navigate("next first3 child3" afrom) ;;navigate from the down arrow to sender name
str from=afrom.Name
a.Navigate("parent child") ;;navigate from the down arrow to subject
str subject=a.Name
a.Navigate("next")
str k=a.Name
a.Navigate("next child7 first" alab) ;;get label
k=alab.Name
out "-- From --"
out from
out "-- Subject --"
out subject
out "-- Label(s) --"
out k
;Now you have sender, subject and labels.
;Mouse pointer is on Download link...
path.from("C:\gmail\" k "\" from "\")
out path
mkdir path
lef
wait 0 WE win("File Download" "#32770")
int w1=act(win("File Download" "#32770"))
's
wait 0 WC win("另存为" "#32770")
filename.getsel
out filename
pfile.from(path filename)
out pfile
outp pfile
'Y
so it works as i wanted. Although it would be cool to have multiple labels working. But i think for this i need to have ech label (lets say up to 3 labels) in str var like label1 label2 label3. Or myabe there is a way to do it with array too.
Is it a problem to also get the date and message body to string (maybe msg body to txt)?