On a Win7 machine, the following code works well whether compiled as x64 or x32
On an WinXP machine the code does not work. Whether compiled as x32 on the Win7 machine or locally.
I am getting the "Failed to receive file" message.
Code: Select all
All variables have been globally declared
Procedure FTSE100() ;Get index value from Google Financial
aNS = "https://uk.advfn.com/index/ftse100"
aNS1 = "ErioMM.tmp"
If ReceiveHTTPFile(aNS, aNS1)
If ReadFile(#DATNUM, aNS1) ;Test and read if okay
aNS=""
While Eof(#DATNUM) = 0 : aNS = aNS + ReadString(#DATNUM) : Wend ;Load lines
CloseFile(#DATNUM) ;Close the opened file
Else
MessageRequester("Information","ErioMM.tmp")
EndIf
Else
Debug "Failed to receive file " + aNS
EndIf
X = FindString(aNS, "Piece3") ;Find start of area of interest
aNS = Mid(aNS, X, 300) ;Isolate area of interest
aNS = ReplaceString(aNS , ",", "", 1) ;Remove any comma separators
aNS1 = Mid(aNS, 29, 8) ;Extract the change value
F = ValF(aNS1) ;And set it as required in variable
X = FindString(aNS, "Piece5") ;Point to the FTSE100 value area
aNS2 = Mid(aNS, X + 17, 10) ;Extract the current value
fUPFTSE = ValF(aNS2) ;Allocate it
fSRTFTSE = fUPFTSE - F ;Work out the day start value
EndProcedure
aNS = "http://uk.advfn.com/p.php?symbol=" + aEPIC + "&pid=mquote"
and this works well in both machines. To try it, replace aEPIC with say, VOD or RDSB or LLOY
Any comments appreciated.