Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
gmail attachment manager
#10
thanks, i have ended up with sth like this

Code:
Copy      Help
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

Code:
Copy      Help
a.Navigate("next2 first17" afrom)

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.


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)