CREATE CURSOR contact; (email c(75)) #INCLUDE main.h profilepath = SYSTEMPATHS(CSIDL_APPDATA)+"\thunderbird\profiles.ini" *profilepath = "C:\Documents and Settings\kevin\Application Data\Thunderbird\profiles.ini" xxx = FILETOSTR(profilepath) zzz = ATC('Path=',xxx) thunderbirdpath = ALLTRIM(STRTRAN(SUBSTR(xxx,zzz+5,100),CHR(13)+CHR(10)," ")) CD &thunderbirdpath seedfile = SYS(2000,'*.mab') filetest = ADDBS(thunderbirdpath)+seedfile DO WHILE LEN(ALLTRIM(seedfile)) <> 0 &&& IF there is an address book file test = filetostr(filetest) x = 1 DO WHILE AT("@",test,x) > 0 .and. AT("@",test,x)+5 < LEN(test) IF !EMPTY(SUBSTR(test,AT("@",test,x)-1,1)) startat = 2 DO WHILE SUBSTR(test,AT("@",test,x)-(startat+1),1) <> "=" startat = startat + 1 ENDDO endat = 2 DO WHILE RIGHT(SUBSTR(test,AT("@",test,x)-startat+1,startat+endat),1) <> ")" endat = endat + 1 ENDDO address = SUBSTR(test,AT("@",test,x)-startat,startat+endat) dupe = 'N' SELECT contact GO top DO WHILE .not. EOF() IF ALLTRIM(UPPER(address)) == ALLTRIM(upper(contact.email)) dupe = 'Y' ENDIF SELECT contact SKIP ENDDO IF dupe = 'N' IF ATC('$',address) = 0 INSERT INTO contact VALUES (address) ENDIF ENDIF ENDIF x = x + 1 ENDDO seedfile = SYS(2000,'*.mab',1) filetest = ADDBS(thunderbirdpath)+seedfile ENDDO BROWSE