Re: timer / doevents / inet problem
Marting,
try the following, change from:
[code=thinbasic] function = UTF8ToAnsi$(strdata)[/code]
to
[code=thinbasic] function = acode$(UTF8ToWideChar$(strdata))[/code]
in function "download"
Mainly you need to pass from UTF8 to Unicode to Ansi.
I'm still studying how those conversions take place, to be honest I'm not an expert of this field.
Ciao
Eros
Re: timer / doevents / inet problem
Martin,
I just saw your example. Why are you making that DO/LOOP like:
[code=thinbasic]
do
hInternet = INET_Internet_Open("test", %INTERNET_OPEN_TYPE_DIRECT)
IF hInternet <> %NULL THEN EXIT DO
loop
[/code]
Problem is that if function fails and hInternet will be zero, ode will enter into an infinite loop.
Re: timer / doevents / inet problem
whoohoo that works perfect! :eusadance:
I know that this loop can be endless. What my script does is testing a lot of internetpages and then it put the results in a listview. So this download-function is called from a timer routine. So the main script is still running and my thought was that the loop will end if the internet connection is restored. But I agree I must think about a better way.
Re: timer / doevents / inet problem
Quote:
Originally Posted by martin
whoohoo that works perfect! :eusadance:
Seems a good start ;)