Estructure Decision



  • how do I check if a variable has been filled in to be able to save txt in a different way

    if var = "" then
    UTILITY File "validosComCep.txt" Append "<USER>:<PASS> - CEP: <Cep> - #By Kapuzinn \r\n"
    endif

    if var = "121212" then
    UTILITY File "validosNotCep.txt" Append "<USER>:<PASS> - CEP: <Cep> - #By Kapuzinn \r\n"
    endif;


  • Admin

    IF "<MYVAR>" EqualTo ""
    blablah
    ELSE
    blablah2
    ENDIF
    


  • I did it and it didn't work

    IF "<Cep>" EqualTo ""
    #Gravar_Validos_Com_CEP UTILITY File "validosSemCep.txt" Append "<USER>:<PASS> - #By Kapuzinn \r\n"
    ELSE
    #Gravar_Validos_Com_CEP UTILITY File "validosComCep.txt" Append "<USER>:<PASS> - CEP: <Cep> - #By Kapuzinn \r\n"
    ENDIF


  • Admin

    Was your "Cep" variable ever created? If it wasn't created at all you need to use

    IF "<Cep>" Exists
    

    or

    IF "<Cep>" DoesNotExist
    


  • yes

    #CAPTURA_CEP PARSE "<SOURCE>" JSON "zipCode" CreateEmpty=FALSE -> CAP "Cep"

    IF "<Cep

    " EqualTo ""
    #Gravar_Validos_Com_CEP UTILITY File "validosSemCep.txt" Append "<USER>:<PASS> - #By Kapuzinn \r\n"
    ELSE
    #Gravar_Validos_Com_CEP UTILITY File "validosComCep.txt" Append "<USER>:<PASS> - CEP: <CEP> - #By Kapuzinn \r\n"
    ENDIF


  • Admin

    If you use create empty = false, then you have to do what I wrote in my last post and it will work


Log in to reply