Skip to content
⌘ NSIS Forum Archive

test internet multiLanguage

5 posts

didava#

test internet multiLanguage

Hi this code right?

Function .onInit
${if} $LANGUAGE == ${LANG_Ger}
    inetc::head /silent "https://www.yahoo.com" "$SYSDIR\test.txt"
    Pop $0 # return value = exit code, "OK" if OK
    ${If} $0 != OK
    GOTO Done
    ${Else}
    Messagebox MB_ICONSTOP|MB_OK "no internet"
    ${EndIf}
${if} $LANGUAGE == ${LANG_ENGLISH}
    inetc::head /silent "https://www.yahoo.com" "$SYSDIR\test.txt"
    Pop $0 # return value = exit code, "OK" if OK
    ${If} $0 != OK
    GOTO Done
    ${Else}
MessageBox MB_ICONSTOP|MB_OK "no internet"
    ${EndIf}
ClearErrors
     Done:
FunctionEnd 
Plz Sample code ! 🙂

thanks.
didava#
Professors ؟؟
I'm waiting ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟
😢😢😢😢😢😢😢
demiller9#
No, its not right. You should make the indentation of the Else and the EndIf match the If. There may be other errors, too, I've never used inetc. It looks like you have the Ok test backward, saying there is no internet when inetc tells you it worked.

Perhaps you could ask a more detailed question what you think may be wrong in your code, or tell what it isn't doing right. (And a little more patience would help; you posted less than 8 hours ago.)
didava#
Thanks - I found

You can help with this example...


forums.winamp.com/showthread.php?p=2960273#post2960273

Thanks Full
MSG#
Originally Posted by demiller9 View Post
You should make the indentation of the Else and the EndIf match the If.
This is complete nonsense. Indentations are ignored by the compiler.