10-05-2009, 08:15 AM
thanks, i have ended up with sth like this
When i open email and click attachment to download i trigger this macro and it creates folders and then saves file to this folder.
But i have a problem with
sometimes it doesnt get the from name and sometimes macro stops and i get error "failed". Any ideas why? Cant really figure when this happens, maybe when the from name is unusual or sth. Also when email has more than 1 label it doesnt get the second label. Can i assign second label to another string?
Thanks,
PS. Out`s in the code just for my information.
str path
str filename
str pfile
Acc a=acc("More actions" "STATICTEXT" win("Gmail - *" "OpWindow" "" 1) "id=0 OpWindow" "" 0x1001)
Acc alab afrom
a.Navigate("next first3 next2 first3" alab)
a.Navigate("next2 first17" afrom)
str label=alab.Name
out label
str from=afrom.Name
out from
path.from("C:\gmail\" label "\" from "\")
out path
mkdir path
int w1=act(win("Save As" "#32770"))
filename.getsel
out filename
pfile.from(path filename)
out pfile
outp pfile
When i open email and click attachment to download i trigger this macro and it creates folders and then saves file to this folder.
But i have a problem with
sometimes it doesnt get the from name and sometimes macro stops and i get error "failed". Any ideas why? Cant really figure when this happens, maybe when the from name is unusual or sth. Also when email has more than 1 label it doesnt get the second label. Can i assign second label to another string?
Thanks,
PS. Out`s in the code just for my information.