; Act3.s is OBSOLETE. ; Keep this file to prevent it from appearing in upgrade installs ;[info] Name=ACT! 3.0 Vendor=Corex Technologies Corporation Version=Version 1.0 MajorVersion=1 MinorVersion=0 ExeFile=ACT.EXE ; 3.0 script ; ---------------------------------------------------------- [Send] Execute(ACTWIN3, Database, "New_Contact") Poke(,,Contact, "%Name") Poke(,,Name, "%Company") Poke(,,Title, "%Title") Poke(,,Address, "%Address_Line_1") Poke(,,Addr1, "%Address_Line_2") Poke(,,Addr2, "%Address_Line_3") Poke(,,City, "%City") Poke(,,State, "%State") Poke(,,Zip_Code, "%Zip") Poke(,,Phone, "%Phone") Poke(,,Fax, "%Fax") Poke(,,Pager, "%Pager") Poke(,,Home_Phone, "%Home") Poke(,,Car_Phone, "%Mobile") Poke(,,Alt_Phone, "%Alt") Poke(,,Asst_Phone, "%Asst") Poke(,,User_4, "%Email") Poke(,,User_5, "%Email_1") Poke(,,User_6, "%Email_2") Poke(,,URL, "%Email_1") [GetSelectInfo] Request(ACTWIN3,Database,Contact,%name) Request(,,Name,%company) ; 4.0 script ; ---------------------------------------------------------- ; [FindFirst] and [FindNext] are called to search for a card in ; the contact database. If this sectio is present, CardScan uses ; [FindFirst] and [FindNext] to avoid creating duplicate records. ; The [FindFirst] section searchs the target application's ; database for a card with the same name or company and, if it ; finds a match saves the contact information in the %Name, ; %First_Name, %Last_Name or %Company variables. ; The script does not have to find an exact match. CardScan will ; inspect the contact information and call [FindFirst]/[FindNext] ; to determine the best match. ; If posible, the script should set the %_total variable to ; the number of matching contacts. This prevents CardScan from ; calling [FindNext] unnecessarily. Otherwise, CardScan calls ; [FindNext] until one of the script commands fails. [FindFirst] Connect(ACTWIN3, Database) Call(Find_Contact) If(IsNull(%_total), Request(,,TotalLookup, %_total)) If(IsEqual(%_total, 0),, Call(Get_Contact_Info)) [FindNext] Execute(ACTWIN3, Database, NextRec) Call(Get_Contact_Info) ; [NewCard] is called to create a new, empty contact record. [NewCard] Execute(ACTWIN3, Database, New_Contact) ; [Update] is called to fill in the contact information on a new ; or pre-existing card [Update] Poke(,,Contact, "%Name") Poke(,,Name, "%Company") Poke(,,Title, "%Title") Poke(,,Address, "%Address_Line_1") Poke(,,Addr1, "%Address_Line_2") Poke(,,Addr2, "%Address_Line_3") Poke(,,City, "%City") Poke(,,State, "%State") Poke(,,Zip_Code, "%Zip") Poke(,,Country, "%Country") Poke(,,Alt_Address1, "%2nd_Address_Line_1") Poke(,,Alt_Address2, "%2nd_Address_Line_2") Poke(,,Alt_City, "%2nd_City") Poke(,,Alt_State, "%2nd_State") Poke(,,Alt_Zip, "%2nd_Zip_Code") Poke(,,AltCountry, "%2nd_Country") Poke(,,Phone, "%Phone") Poke(,,Fax, "%Fax") Poke(,,Pager, "%Pager") Poke(,,Home_Phone, "%Home") Poke(,,Car_Phone, "%Mobile") Poke(,,Alt_Phone, "%Alt") Poke(,,Asst_Phone, "%Asst") Poke(,,User_4, "%Email") Poke(,,User_5, "%Email_1") Poke(,,User_6, "%Email_2") Poke(,,URL, "%Email_1") ; [Finish] is called after the last card has been transferred ; If the last card's Unique ID is not empty, then it was ; found via a lookup that must be cancelled. [Finish] Request(ACTWIN3, Database, CurrentUniqueID, %uid) If(IsEqual(%uid, "\" \""),,Call(End_Lookup)) ; Private sub-routines ; -------------------- [Find_Contact] If(IsNull(%last_name), Call(No_Last_Name), Execute(,,Lookup Last_Name \"%last_name\")) [No_Last_Name] If(IsNull(%first_name), Call(No_First_Name), Execute(,,Lookup Last_Name \"%first_name\")) [No_First_Name] If(IsNull(%company), Set(_total, 0), Execute(,,Lookup Company \"%company\")) [End_Lookup] Execute(,,Lookup Everyone) Execute(,,Goto UniqueID %uid) [Get_Contact_Info] Request(,,Contact, %name) Request(,,Name, %company)