Jblz619 Posted August 11, 2023 Share Posted August 11, 2023 (edited) Hello does anyone know a way to download my atom feed to my computer. https://gmail.google.com/gmail/feed/atom my work around is expandcollapse popupglobal $aFile_data $file='mail.google.com_mail_feed_atom.xml' $hndl=ShellExecute('https://gmail.google.com/gmail/feed/atom') $refresh=TimerInit() while 1 $R_tiime= TimerDiff($refresh) if ($R_tiime > 10000) then _save() EndIf WEnd func _save() Send("{CTRLDOWN}r{CTRLUP}") Sleep(5000) Send("{CTRLDOWN}s{CTRLUP}") Sleep(1000) Send("{ENTER}") Sleep(1000) Send("{ALTDOWN}y{ALTUP}") $refresh=TimerInit() _Read_loc() EndFunc Func _Read_loc() $read=FileRead($file) $email_count=0 $max_count=_FileCountLines($file) do $email_count+=1 $aArray=_StringBetween($read,"<entry>","</entry>") $Title_ar=_StringBetween($aArray[$email_count],"<title>","</title>") $name_ar=_StringBetween($aArray[$email_count],"<name>","</name") $email_ar=_StringBetween($aArray[$email_count],"<email>","</email") $summary_ar=_StringBetween($aArray[$email_count],"<summary>","</summary") $issued_ar=_StringBetween($aArray[$email_count],"<issued>","</issued") MsgBox(1,"Email: "&$email_count,"Title:"&$Title_ar[0]&@CRLF&"Date:"&$issued_ar[0]&@CRLF&"Sender Name:"&$name_ar[0]&@CRLF&"Sender Email:"&$email_ar[0]&@CRLF&"Summary:"&$summary_ar[0]) Until $email_count+1 = $max_count EndFunc Id like it to every 10 seconds to save the .xml file. And then read and split the .xml with a the delimiter <entry> so I can isolate and read each entry. if anyone could help me it would be much appreciated. Edited August 11, 2023 by Jblz619 Link to comment Share on other sites More sharing options...
Developers Jos Posted August 11, 2023 Developers Share Posted August 11, 2023 Moved to the appropriate AutoIt General Help and Support forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Jblz619 Posted August 11, 2023 Author Share Posted August 11, 2023 (edited) Ty jos for moving so i got the file to read well but i need to find a better work around for getting the .xml expandcollapse popupglobal $aFile_data $file='mail.google.com_mail_feed_atom.xml' $hndl=ShellExecute('https://gmail.google.com/gmail/feed/atom') $refresh=TimerInit() while 1 $R_tiime= TimerDiff($refresh) if ($R_tiime > 10000) then _save() EndIf WEnd func _save() Send("{CTRLDOWN}r{CTRLUP}") Sleep(5000) Send("{CTRLDOWN}s{CTRLUP}") Sleep(1000) Send("{ENTER}") Sleep(1000) Send("{ALTDOWN}y{ALTUP}") $refresh=TimerInit() _Read_loc() EndFunc Func _Read_loc() $read=FileRead($file) $email_count=0 $max_count=_FileCountLines($file) do $email_count+=1 $aArray=_StringBetween($read,"<entry>","</entry>") $Title_ar=_StringBetween($aArray[$email_count],"<title>","</title>") $name_ar=_StringBetween($aArray[$email_count],"<name>","</name") $email_ar=_StringBetween($aArray[$email_count],"<email>","</email") $summary_ar=_StringBetween($aArray[$email_count],"<summary>","</summary") $issued_ar=_StringBetween($aArray[$email_count],"<issued>","</issued") MsgBox(1,"Email: "&$email_count,"Title:"&$Title_ar[0]&@CRLF&"Date:"&$issued_ar[0]&@CRLF&"Sender Name:"&$name_ar[0]&@CRLF&"Sender Email:"&$email_ar[0]&@CRLF&"Summary:"&$summary_ar[0]) Until $email_count+1 = $max_count EndFunc Edited August 11, 2023 by Jblz619 Link to comment Share on other sites More sharing options...
argumentum Posted August 11, 2023 Share Posted August 11, 2023 ..no idea why you're going about this this way but in any case maybe this ( https://www.autoitscript.com/forum/topic/187431-thunderbird-to-tray/_) give's you a way around to whatever you need to get done. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Jblz619 Posted August 11, 2023 Author Share Posted August 11, 2023 (edited) 20 minutes ago, argumentum said: ..no idea why you're going about this this way but in any case maybe this ( https://www.autoitscript.com/forum/topic/187431-thunderbird-to-tray/_) give's you a way around to whatever you need to get done. its a work around because i couldn't get pop 3 to work or imap. I tried third part mail clients like outlook, thunderbird and mailbird. I tried addons and filters nothing would move to a folder and leave in a readable format unless manually done. theimpoertexport addon for thunderbird needed to be manually done. And the rest if the email clients would only move to folder in inbox. Edited August 11, 2023 by Jblz619 Link to comment Share on other sites More sharing options...
argumentum Posted August 11, 2023 Share Posted August 11, 2023 ..about https://www.autoitscript.com/forum/topic/192422-udf-gmail-api-emails-automation-with-autoit/ ? Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Jblz619 Posted August 11, 2023 Author Share Posted August 11, 2023 40 minutes ago, argumentum said: ..about https://www.autoitscript.com/forum/topic/192422-udf-gmail-api-emails-automation-with-autoit/ ? Cool I have Jos smpt email send working already. For sending emails. Just trying to get read mail pop3 or imap to work. I was looking into gmail api previously but there is a lot of inputs i'm not familiar with it yet. I will look more into getting the oautho token and finding out what a json file is so i can enter my client id and client secret. ;======================================================================================================================= ; Date: 2018-02-12, 17:52 ; ; Description: Send email using API to single or group of receipients. ; ; Function(s): gmailUsersMessagesSend() -> example usage ; ; Param(s): $sClientId Your client_id from *json file ; $sClientSecret Your client_secret from *json file expandcollapse popupglobal $aFile_data, $email_count $file='mail.google.com_mail_feed_atom.xml' $hndl=ShellExecute('https://gmail.google.com/gmail/feed/atom') $refresh=TimerInit() while 1 $R_tiime= TimerDiff($refresh) if ($R_tiime > 10000) then _save() EndIf WEnd func _save() Send("{CTRLDOWN}r{CTRLUP}") Sleep(5000) Send("{CTRLDOWN}s{CTRLUP}") Sleep(1000) Send("{ENTER}") Sleep(1000) Send("{ALTDOWN}y{ALTUP}") $refresh=TimerInit() _Read_XML() EndFunc Func _Read_XML() $read=FileRead($file) $email_count=0 $aArray=_StringBetween($read,"<feed","</feed>") if not @error then $count=_StringBetween($aArray[0],"<fullcount>","</fullcount") $aArray=_StringBetween($read,"<entry>","</entry>") do $Title_ar=_StringBetween($aArray[$email_count],"<title>","</title>") $name_ar=_StringBetween($aArray[$email_count],"<name>","</name") $email_ar=_StringBetween($aArray[$email_count],"<email>","</email") $summary_ar=_StringBetween($aArray[$email_count],"<summary>","</summary") $issued_ar=_StringBetween($aArray[$email_count],"<issued>","</issued") MsgBox(1,"Email: "&$email_count,"Title: "&$Title_ar[0]&@CRLF&"Date: "&$issued_ar[0]&@CRLF&"Sender Name: "&$name_ar[0]&@CRLF&"Sender Email: "&$email_ar[0]&@CRLF&"Summary: "&$summary_ar[0]) $email_count+=1 Until $email_count = $count[0] EndIf EndFunc I wrote this to read the .xml file it works great to read and parse. But would like to try another way to get the .xml besides shellexecute and send keys to save file lol. like inetget or inetread or iecreate Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now