Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   test internet multiLanguage (http://forums.winamp.com/showthread.php?t=370048)

didava 1st September 2013 03:16

test internet multiLanguage
 
Hi this code right?

PHP Code:

Function .onInit
${if} $LANGUAGE == ${LANG_Ger}
    
inetc::head /silent "https://www.yahoo.com" "$SYSDIR\test.txt"
    
Pop $# return value = exit code, "OK" if OK
    
${If} $!= 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 $# return value = exit code, "OK" if OK
    
${If} $!= OK
    
GOTO Done
    
${Else}
MessageBox MB_ICONSTOP|MB_OK "no internet"
    
${EndIf}
ClearErrors
     Done
:
FunctionEnd 

Plz Sample code ! :)

thanks.

didava 1st September 2013 11:14

Professors ؟؟
I'm waiting ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟
:cry::cry::cry::cry::cry::cry::cry:

demiller9 1st September 2013 16:43

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 1st September 2013 22:15

Thanks - I found

You can help with this example...


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

Thanks Full

MSG 2nd September 2013 11:26

Quote:

Originally Posted by demiller9 (Post 2960361)
You should make the indentation of the Else and the EndIf match the If.

This is complete nonsense. Indentations are ignored by the compiler.


All times are GMT. The time now is 17:21.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.