Hallo,
Ik heb voor Filemaker een script geschreven om door middel van een plug-in alle records naar het adres boek te schrijven. Dit gaat alleen heel erg traag. De snelheid ligt momenteel op de 1 record per 2 seconden. Ik moet ca. 6000 records weg schrijven. Weet iemand waarom mijn script zo langzaam is? Of zal het nooit sneller kunnen.
Ik heb voor Filemaker een script geschreven om door middel van een plug-in alle records naar het adres boek te schrijven. Dit gaat alleen heel erg traag. De snelheid ligt momenteel op de 1 record per 2 seconden. Ik moet ca. 6000 records weg schrijven. Weet iemand waarom mijn script zo langzaam is? Of zal het nooit sneller kunnen.
C++:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
| Froodware: Insert all contacts in Address Book without FWAB_UID #Hint: resize this window to full-screen to improve readability of the script(s)! # Perform Script [ "Address Book Selector Availability Check" ] # # Show All Records Sort Records [ Keep records in sorted order; Specified Sort Order: Contacts::Sort List Key; ascending Contacts::Contact Name; ascending ] [ Restore; No dialog ] Go to Record/Request/Page [ First ] Loop If [ IsEmpty( Contacts::FWAB_UID ) ] Set Variable [ $Result; Value:FWAB_PutSingleValue( Contacts::FWAB_UID ; "LastName" ; Contacts::Last ) ] #Create Contact and store UID Set Field [ Contacts::FWAB_UID; GetValue ( $Result; 1 ) ] # Set Variable [ $Result; Value:FWAB_PutSingleValue( Contacts::FWAB_UID ; "FirstName" ; Contacts::First ) ] Set Variable [ $Result; Value:FWAB_PutSingleValue( Contacts::FWAB_UID ; "MiddleName" ; Contacts::Middle ) ] Set Variable [ $Result; Value:FWAB_PutSingleValue( Contacts::FWAB_UID ; "Title" ; Contacts::Title ) ] Set Variable [ $Result; Value:FWAB_PutSingleValue( Contacts::FWAB_UID ; "Organization" ; Contacts::Company ) ] Set Variable [ $Result; Value:FWAB_PutSingleValue( Contacts::FWAB_UID ; "Department" ; Contacts::Department ) ] Set Variable [ $Result; Value:FWAB_PutSingleValue( Contacts::FWAB_UID ; "JobTitle" ; Contacts::Job Title ) ] Set Variable [ $Result; Value:FWAB_PutSingleValue( Contacts::FWAB_UID ; "HomePage" ; Contacts::Website) ] Set Variable [ $Result; Value:FWAB_PutSingleValue( Contacts::FWAB_UID ; "Note" ; Contacts::Notes) ] # If [ not IsEmpty ( Contacts::Work Phone ) ] Set Variable [ $Result; Value:FWAB_PutMultiValue_Phone(Contacts::FWAB_UID; ""; Contacts::Work Phone; "_$!<Work>!$_"; ""; "NO" ) ] End If If [ not IsEmpty ( Contacts::Home Phone ) ] Set Variable [ $Result; Value:FWAB_PutMultiValue_Phone(Contacts::FWAB_UID; ""; Contacts::Home Phone; "_$!<Home>!$_"; ""; "NO" ) ] End If If [ not IsEmpty ( Contacts::Mobile Phone ) ] Set Variable [ $Result; Value:FWAB_PutMultiValue_Phone(Contacts::FWAB_UID; ""; Contacts::Mobile Phone; "_$!<Mobile>!$_"; ""; "NO" ) ] End If If [ not IsEmpty ( Contacts::Fax ) ] Set Variable [ $Result; Value:FWAB_PutMultiValue_Phone(Contacts::FWAB_UID; ""; Contacts::Fax ; "_$!<WorkFAX>!$_"; ""; "NO" ) ] End If If [ not IsEmpty ( Contacts::General Phone ) ] Set Variable [ $Result; Value:FWAB_PutMultiValue_Phone(Contacts::FWAB_UID; ""; Contacts::General Phone ; "General Phone"; ""; "NO" ) ] End If # If [ not IsEmpty ( Contacts::Work Email ) ] Set Variable [ $Result; Value:FWAB_PutMultiValue_Email(Contacts::FWAB_UID; ""; Contacts::Work Email; "_$!<Work>!$_"; ""; "NO" ) ] End If If [ not IsEmpty ( Contacts::Home Email ) ] Set Variable [ $Result; Value:FWAB_PutMultiValue_Email(Contacts::FWAB_UID; ""; Contacts::Home Email; "_$!<Home>!$_"; ""; "NO" ) ] End If # If [ not IsEmpty ( Contacts::Work Address 1 ) or not IsEmpty ( Contacts::Work City ) or not IsEmpty ( Contacts::Work Province ) or not IsEmpty ( Contacts::Work Postal Code ) or not IsEmpty ( Contacts::Work Country) ] Set Variable [ $Result; Value:FWAB_PutMultiValue_Address(Contacts::FWAB_UID; ""; Contacts::Work Address 1; Contacts::Work Postal Code; Contacts::Work City; Contacts::Work Province; Contacts::Work Country; ""; "_$!<Work>!$_"; ""; "NO" ) ] End If If [ not IsEmpty ( Contacts::Home Address 1 ) or not IsEmpty ( Contacts::Home City ) or not IsEmpty ( Contacts::Home Province ) or not IsEmpty ( Contacts::Home Postal Code ) or not IsEmpty ( Contacts::Home Country) ] Set Variable [ $Result; Value:FWAB_PutMultiValue_Address(Contacts::FWAB_UID; ""; Contacts::Home Address 1; Contacts::Home Postal Code; Contacts::Home City; Contacts::Home Province; Contacts::Home Country; ""; "_$!<Home>!$_"; ""; "NO" ) ] End If If [ not IsEmpty ( Contacts::Postal Address 1 ) or not IsEmpty ( Contacts::Postal City ) or not IsEmpty ( Contacts::Postal Province ) or not IsEmpty ( Contacts::Postal Postal Code ) or not IsEmpty ( Contacts::Postal Country) ] Set Variable [ $Result; Value:FWAB_PutMultiValue_Address(Contacts::FWAB_UID; ""; Contacts::Postal Address 1; Contacts::Postal Postal Code; Contacts::Postal City; Contacts::Postal Province; Contacts::Postal Country; ""; "Postal"; ""; "NO" ) ] End If Set Variable [ $Result; Value:FWAB_SaveAddressBook ] End If If [ IsEmpty (Contacts::First) and IsEmpty(Contacts::Last) ] Set Variable [ $Result; Value:FWAB_PutSingleValue( Contacts::FWAB_UID ; "ShowAsFlags" ; "1") ] End If Go to Record/Request/Page [ Next; Exit after last ] End Loop |