View Single Post
  #300 (permalink)  
Old 12-14-2009, 03:11 PM
studentjunk's Avatar
studentjunk
PPCGeeks Regular
Offline
 
Join Date: Sep 2007
Posts: 204
Reputation: 185
studentjunk is keeping up the good workstudentjunk is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: User Customization Backup for Touch Pro using sashimi

I finally got around to updating my script to download email. I got the original idea from here

I have 3 accounts, so I copied the script 3 times. Note that you must replace the "PDa name..." with your account names. I use the script during my autoinstall, and I also periodically use it just to check the email (I have a shortcut in the start menu). Please note that it is run on a touch pro, so it is designed for that screen resolution.

Quote:
Run( "\windows\tmail.exe")
Sleep(1000)
eMailAccount1 = "PDA name of 1st email account"
eMailAccount2 = "PDA name of 2nd email account"
eMailAccount3 = "PDA name of 3rd email account"
Sleep(1000)

#sync the first email account
Run( "\windows\tmail.exe", "-Service """ & eMailAccount1 & """ -Sync" )
Sleep(3000)

#"testvalue" lists the text in the bottom left corner of screen
testvalue = Windowtext(49,557)

#"items" takes the last 6 letters of testvalue.
items=SubStr(testvalue,-6)

#At the end of a send/receive, the text either tells you the number of unread items or it tells you the number of items total. It doesn't have that text while it is downloading. So when it has one or the other, the script knows to proceed.
While ((items ne "nread.") AND (items ne "Items."))
testvalue = Windowtext(49,557)
items=SubStr(testvalue,-6)
Sleep(1000)
endwhile
Sleep(1000)

Run( "\windows\tmail.exe", "-Service """ & eMailAccount2 & """ -Sync" )
Sleep(3000)
testvalue = Windowtext(49,557)
items=SubStr(testvalue,-6)

While ((items ne "nread.") AND (items ne "Items."))
testvalue = Windowtext(49,557)
items=SubStr(testvalue,-6)
Sleep(1000)
endwhile
Sleep(3000)

Run( "\windows\tmail.exe", "-Service """ & eMailAccount3 & """ -Sync" )
Sleep(3000)
testvalue = Windowtext(49,557)
items=SubStr(testvalue,-6)

While ((items ne "nread.") AND (items ne "Items."))
testvalue = Windowtext(49,557)
items=SubStr(testvalue,-6)
Sleep(1000)
endwhile
Sleep(1000)
SleepMessage(3,"end of script",Mortscript,1)
exit

Last edited by studentjunk; 12-14-2009 at 03:17 PM.
Reply With Quote