Old 1st September 2013, 03:16   #1
didava
Member
 
Join Date: May 2007
Posts: 98
Red face 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 is offline   Reply With Quote
Old 1st September 2013, 11:14   #2
didava
Member
 
Join Date: May 2007
Posts: 98
Professors ؟؟
I'm waiting ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟
didava is offline   Reply With Quote
Old 1st September 2013, 16:43   #3
demiller9
Senior Member
 
Join Date: Mar 2006
Location: Dallas
Posts: 462
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.)
demiller9 is offline   Reply With Quote
Old 1st September 2013, 22:15   #4
didava
Member
 
Join Date: May 2007
Posts: 98
Thanks - I found

You can help with this example...


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

Thanks Full
didava is offline   Reply With Quote
Old 2nd September 2013, 11:26   #5
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
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.
MSG is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump