← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #142644]: Want to use win32com to access excel sheets - try python package xlrd

 

Question #142644 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/142644

Elyashevskyy Ostap requested more information:
I need to clear up any folder from any email account of Outlook2010 from
Sikuli

I tried to do it via Sikuli but it does not work with win32com.

Now I am using the next solution via Python app and then launching it
via Sikuli / Jython as externall app:


import win32com.client
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
    
fldr = outlook.GetDefaultFolder(6)  // Constant is defined for each default folder
 
messages = fldr.Items
print "number of messages in inbox:", messages.Count
for msg in messages:
       msg.Delete()

Do you know another solutions ? Also I am interesting how to clean up
not only default folders (Inbox, ....)

Thanks,
Ostap

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.