there is a function return me if is a win Seven ?
now I made If val(cWinVersion())=7 but I not know if it's correct
this because I have problem to download a file from a website with Windows Seven
with GETURLTOFILE(cUrl,cZipFile)
while on win10 I can use GETURLTOFILE(cUrl,cZipFile)
on widows seven I must use
only I cannot copy the file into a my folder but it save the file on folder download of window
is there a solution ?
now I made If val(cWinVersion())=7 but I not know if it's correct
this because I have problem to download a file from a website with Windows Seven
with GETURLTOFILE(cUrl,cZipFile)
STATIC FUNCTION GETURLTOFILE( cUrl, cFile, cUsr, cPsw )
LOCAL lOk := .F.
LOCAL oHtp, oStr, ex
DEFAULT cFile := CFILENAME( STRTRAN( cUrl, "/", "\" ) )
//TRY
oHtp = CREATEOBJECT( "Msxml2.XMLHTTP.6.0" )
oHtp:Open( "POST", cUrl, .F., cUsr, cPsw )
oHtp:Send()
IF oHtp:Status != 200 THEN BREAK
MemoWrit(cFile,oHtp:ResponseBody)
//oStr = CREATEOBJECT( "ADODB.Stream" )
//oStr:Open()
//oStr:Type = 1
//oStr:Write( oHtp:ResponseBody )
//oStr:SaveToFile( cFile, 2 )
//oStr:Close()
lOk = .T.
//CATCH ex
// ? ex:message
//END
RETURN lOkwhile on win10 I can use GETURLTOFILE(cUrl,cZipFile)
on widows seven I must use
FUNCTION Download( cUrl )
cUrl := IF( "@" $ cUrl, "mailto:" + cUrl, cUrl )
// ? cUrl
IF Empty( cUrl )
MsgInfo( "Introdurre URL Correta", "Attenzione" )
ELSE
CURSORWAIT()
IF IsWinNT() .OR. isWin2000() // XP/2000/NT
WinExec( "rundll32.exe url.dll, FileProtocolHandler " + cUrl, 0 )
ELSE
WinExec( "Start " + cUrl, 0 )
ENDIF
CURSORARROW()
ENDIF
RETURN NILonly I cannot copy the file into a my folder but it save the file on folder download of window
is there a solution ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com