AutoContacts Exclude a contact from result

Discussion in 'AutoApps' started by Maxime, Aug 1, 2016.

  1. Maxime

    Maxime New Member

    I created a profile with autoremote and autocontact in order to retreive a contact information.

    If I ask for Mike, the information for Mike Brown will be sent.
    I would like to be able to ask for Mike information and get the result for Mike Williams.

    Is there a way to start a new search excluding the first result I received in order to get the information for the next name in the list ?

    Thank you
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    When you get information about contacts you probably get multiple results back right? You can just access the second result and it should contain another contact :)
     
  3. Maxime

    Maxime New Member

    I'm not sure I have multiple results and if so, I don't know how to see them.

    Here is my profile.

    Profile: SMS Contact Request (22)
    Event: AutoRemote [ Configuration:Contact Request (exact) ]
    Enter: Request Contact (23)
    A1: AutoContacts [ Configuration:Contact Name or Nickname: %arfiles()
    Name as Nickname: true Timeout (Seconds):1000 ]
    A2: AutoContacts Details [ Configuration:Contact Id: %acid
    Get Picture: true Timeout (Seconds):1000 ]
    A3: AutoRemote Notification [ Configuration:Recipient: Last Sender
    Title: Envoyer sms à %acname
    Text: %acnumber
    Action on Touch: sendsms=:=%acnumber=:=
    Icon: %acpicturefile
    Status Bar Icon: ic_action_users
    Persistent: false
    Share: false
    Button 1: sendsms=:=%acnumber=:=
    Button 1 Popup: Envoyé sms à *%acname
    Label 1: Envoyé le sms à %acname
    Icon 1: ic_launcher
    Icon 2: AutoRemote
    Icon 3: AutoRemote Timeout (Seconds):200 ]

    I created a popup with each variable, and I only see 1 contacts

    is there something i'm missing ?
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    The action in A1 should return an array for each variable :) Check out how many results you got by flashing %acid(#) for example.
     
  5. Maxime

    Maxime New Member

    When I flash %acid(#), the flash always show 0
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    What does %acname show? Are you sure you meant to use %arfiles() in A1 and not %armessage?
     
  7. Maxime

    Maxime New Member

    OK, I managed to get exactly what I wanted.

    The only thing I cannot manage to do is to send the ACPICTURE for any other contacts other than the first one.

    Can you help me with that?

    here is what I have.



    Profile: SMS Contact Request (22)
    Event: AutoRemote [ Configuration:Contact Request (exact) ]
    Enter: Request Contact (23)
    A1: AutoContacts [ Configuration:Contact Name or Nickname: %arfiles()
    Name as Nickname: true Timeout (Seconds):20 ]
    A2: If [ %acnames(1) ~ *%arfiles()* ]
    A3: AutoContacts Details [ Configuration:Contact Id: %acids(1)
    Get Picture: true Timeout (Seconds):1000 ]
    A4: AutoRemote Notification [ Configuration:Recipient: Last Sender
    Title: Envoyer sms à %acname
    Text: %acnumber
    Action on Touch: sendsms=:=%acnumber=:=
    Icon: %acpicturefile
    Status Bar Icon: ic_action_users
    Persistent: false
    Share: false
    Button 1: sendsms=:=%acnumber=:=
    Button 1 Popup: Envoyé sms à *%acname
    Label 1: Envoyé le sms à %acname
    Icon 1: ic_launcher
    Icon 2: AutoRemote
    Icon 3: AutoRemote Timeout (Seconds):200 ]
    A5: Else
    A6: Goto [ Type:Action Label Number:1 Label:NoContact ]
    A7: End If
    A8: If [ %acnames(2) ~ %arfiles()* ]
    A9: AutoContacts Details [ Configuration:Contact Id: %acids(2)
    Get Picture: true Timeout (Seconds):1000 ]
    A10: AutoRemote Notification [ Configuration:Recipient: Last Sender
    Title: Envoyer sms à %acnames(2)
    Text: %acnumbers(2)
    Action on Touch: sendsms=:=%acnumbers(2)=:=
    Icon: %acpicturefiles(2)
    Status Bar Icon: ic_action_users
    Persistent: false
    Share: false
    Button 1: sendsms=:=%acnumbers(2)=:=
    Button 1 Popup: Envoyé sms à *%acnames(2)
    Label 1: Envoyé le sms à %acnames(2)
    Icon 1: ic_launcher
    Icon 2: AutoRemote
    Icon 3: AutoRemote Timeout (Seconds):200 ]
    A11: Else
    A12: Goto [ Type:Action Label Number:1 Label:NoContact ]
    A13: End If
    A14: If [ %acnames(3) ~ %arfiles()* ]
    A15: AutoContacts Details [ Configuration:Contact Id: %acids(3)
    Get Picture: true Timeout (Seconds):1000 ]
    A16: AutoRemote Notification [ Configuration:Recipient: Last Sender
    Title: Envoyer sms à %acnames(3)
    Text: %acnumbers(3)
    Action on Touch: sendsms=:=%acnumbers(3)=:=
    Icon: %acpicturefiles(3)
    Status Bar Icon: ic_launcher
    Persistent: false
    Share: false
    Button 1: sendsms=:=%acnumbers(3)=:=
    Button 1 Popup: Envoyé sms à *%acnames(3)
    Label 1: Envoyé le sms à %acnames(3)
    Icon 1: ic_launcher
    Icon 2: AutoRemote
    Icon 3: AutoRemote Timeout (Seconds):200 ]
    A17: Else
    A18: Goto [ Type:Action Label Number:1 Label:NoContact ]
    A19: End If
    A20: If [ %acnames(4) ~ %arfiles()* ]
    A21: AutoContacts Details [ Configuration:Contact Id: %acids(4)
    Get Picture: true Timeout (Seconds):1000 ]
    A22: AutoRemote Notification [ Configuration:Recipient: Last Sender
    Title: Envoyer sms à %acnames(4)
    Text: %acnumbers(4)
    Action on Touch: sendsms=:=%acnumbers(4)=:=
    Icon: %acpicturefiles(4)
    Status Bar Icon: ic_action_users
    Persistent: false
    Share: false
    Button 1: sendsms=:=%acnumbers(4)=:=
    Button 1 Popup: Envoyé sms à *%acnames(4)
    Label 1: Envoyé le sms à %acnames(4)
    Icon 1: ic_launcher
    Icon 2: AutoRemote
    Icon 3: AutoRemote Timeout (Seconds):200 ]
    A23: Else
    A24: Goto [ Type:Action Label Number:1 Label:NoContact ]
    A25: End If
    A26: If [ %acnames(5) ~ %arfiles()* ]
    A27: AutoContacts Details [ Configuration:Contact Id: %acids(5)
    Get Picture: true Timeout (Seconds):1000 ]
    A28: AutoRemote Notification [ Configuration:Recipient: Last Sender
    Title: Envoyer sms à %acnames(5)
    Text: %acnumbers(5)
    Action on Touch: sendsms=:=%acnumbers(5)=:=
    Icon: %acpicturefiles(5)
    Status Bar Icon: ic_action_users
    Persistent: false
    Share: false
    Button 1: sendsms=:=%acnumbers(5)=:=
    Button 1 Popup: Envoyé sms à *%acnames(5)
    Label 1: Envoyé le sms à %acnames(5)
    Icon 1: ic_launcher
    Icon 2: AutoRemote
    Icon 3: AutoRemote Timeout (Seconds):200 ]
    A29: Else
    A30: Goto [ Type:Action Label Number:1 Label:NoContact ]
    A31: End If
    A32: If [ %acnames(6) ~ %arfiles()* ]
    A33: AutoContacts Details [ Configuration:Contact Id: %acids(6)
    Get Picture: true Timeout (Seconds):1000 ]
    A34: AutoRemote Notification [ Configuration:Recipient: Last Sender
    Title: Envoyer sms à %acnames(6)
    Text: %acnumbers(6)
    Action on Touch: sendsms=:=%acnumbers(6)=:=
    Icon: %acpicturefiles(6)
    Status Bar Icon: ic_action_users
    Persistent: false
    Share: false
    Button 1: sendsms=:=%acnumbers(6)=:=
    Button 1 Popup: Envoyé sms à *%acnames(6)
    Label 1: Envoyé le sms à %acnames(6)
    Icon 1: ic_launcher
    Icon 2: AutoRemote
    Icon 3: AutoRemote Timeout (Seconds):200 ]
    A35: Else
    A36: Goto [ Type:Action Label Number:1 Label:NoContact ]
    <NoContact>
    A37: AutoRemote Notification [ Configuration:Recipient: Last Sender
    Title: No contact found
    Text: Sorry, no contact was found.
    Status Bar Icon: AutoRemote
    Persistent: false
    Share: false
    Icon 1: AutoRemote
    Icon 2: AutoRemote
    Icon 3: AutoRemote Timeout (Seconds):200 ]
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    If I'm not mistaken you should always use %acpicturefile for all contact pictures :)
     
  9. Maxime

    Maxime New Member

    IT is what I use but I get a message telling me to make sure that I don't use any other variable then %acid. I will try some other things ans post it here if I find something.

    Thank you!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice