; DayTimer ; DayTimer generates an error if there is no last name or company to be transferred. ; In order to continue with the transfer CardScan ignores such error. [info] Name=Day-Timer Organizer 2000 Vendor=CardScan, Inc. Version=Version 2.0 MajorVersion=2 MinorVersion=0 ExeFile=DTO2k.EXE [Send] Call( InitVars ) ; initialize local variables Call(InitializeError) ; standard error handling Call( OpenConnection ) Call( NewCard ) Call( Update_Info ) [NewCard] Call(ClearError) ; Initialize error is already called in FindFirst If( IsEqual( _Connected, 1), , Call( OpenConnection )) Execute(,,CreateAddressEntry,1); [Update] if(IsEqual(%_error, %_Success), Call(Update_Info), ) [Update_Info] Poke(,,LastName,%last_name); Poke(,,FirstName,%First_name); Poke(,,Initial,%middle_name); Poke(,,MrMrsMs,%Name_Prefix); Poke(,,Title,%title,1); Poke(,,Organization,%company); Poke(,,WorkAddressL1,%Address_Line_1,1); Poke(,,WorkAddressL2,%Address_Line_2,1); Poke(,,WorkAddressL3, %Address_Line_3,1); Poke(,,WorkCity,%city,1); Poke(,,WorkState,%state,1); Poke(,,WorkZipCode,%zip,1); Poke(,,WorkCountry,%country,1); Poke(,,HomeAddressL1,%2nd_Address_Line_1,1); Poke(,,HomeAddressL2,%2nd_Address_Line_2,1); Poke(,,HomeCity,%2nd_city,1); Poke(,,HomeState,%2nd_state,1); Poke(,,HomeZipCode,%2nd_zip_code,1); Poke(,,HomeCountry,%2nd_country,1); Poke(,,OfficePhone,%phone,1); Poke(,,OfficeExt,%{phone.extension},1); Poke(,,FaxPhone,%fax,1); Poke(,,HomePhone,%{home$phone},1); Poke(,,EMailAddress1,%email,1) Poke(,,EMailAddress2,%web_page,1) Poke(,,EMailAddress3,%email_1,1) Poke(,,EMailAddress4,%email_2,1) Poke(,,CarPhone,%{mobile$phone\;car$phone},1); Poke(,,OtherPhone1,%other_1,1); Poke(,,OtherPhone2,%other_2,1); Poke(,,Text,%notes,1); Execute(,,CommitEntry,1); [Finish] ; ------------- private procedures ------------------- [InitVars] Set( _Connected, 0 ) ; flag to indicate if connection is live [OpenConnection] Connect(Day-Timer,DTDATA,DTDDEf.EXE); Request(,,OpenDatabaseAndLoginUser,,1); Set( _Connected, 1) ; connected [Wait_If_Busy] Request(DayTimer,System,Status,%busy) If(IsEqual(%busy,"READY"), Call( OpenConnection ), Call(Wait_If_Busy)) ; **************** standard error handling routines ********** ; Error flag values: ; 0 - Success ; -1 - Unknown Error ; InitializeError initializes error codes and resets the error ; flag status. [InitializeError] Set(_success, 0) Set(_UnknownError, -1) Call(ClearError) ; clears/resets the error flag [ClearError] Set(_error, %_success)