Includes | | | | - Page 1 - |
| | Download.Inc
HTTP-Abruffunktionen for einfacheres inquire of Webserver-expenses.
<!---->
Download/ into Cart4,99 € inkl. MwSt. no Shipping fee
/*
|
|
|
| INC: Download.Inc
| recommended Integration: include download.inc
| **************************
|
| Support: https://XProfan.com/includes
|
| The Urheberrechte this software lying by me (iF, David Strutz).
|
|
| salvo, iF.
| 20070713
|
|____________________________________________________________________________________*/
{$cleq}
/* Download.Inc XPSE Democode
XPSE (XProfan's free PreCompiler) is available under
https://XProfan.com/xpse */
include download.inc
windowstyle ( 8 | 16 | 512 )
cls 0
color 10,0
print
if len(trim$(dw.ip())) {//is.inet.available.ploy
print " INC-Version: ",dw.ver()
print " your IP: ",dw.ip()
print " Http-call: ",dw.get("https://XProfan.com/Help/sheet/xpse/","_testout.html"),"bytes."
print " Image-call: ",dw.get("https://XProfan.com/images/lv.bmp","_lv.bmp"),"bytes."
print " Downloadgeschwindigkeit:~",int(dw.checkspeed()),"bytes/sec"
long hbox=createhtmlbox (hwnd,"file:///"+translate $(getdir$("@"),"\","/")+"/_testout.html",0,180,width(hwnd),(height(hwnd)-180))
loadbmp "_lv.bmp",(width(hwnd)-210),10;0
else
print " it could no Internetverbindung used go."
waitkey
end
endif
do {
waitinput
select key
caseof 2 : break
endselect
}
destroywindow(hbox)
end
|
| 647 kB | 4,99 € inkl. Tax. no Shipping fee | | item: | DE-8 | | Bezeichnung: | Download.Inc | | Version: | 0.1.6 | | Kurzbeschreibung: | Erweiterte HTTP-Abruffunktionen for einfacheres inquire of Webserver-expenses. | | Hochgeladen: | 02/16/09 | | | | Download | | | | 3 kB | | Hochgeladen: | 10/31/20 | | Downloadcounter: | | | | Download |
| | | | |
| | | | | - Page 1 - |
| | @Jacob: have your wish berücksichtigt and new version uploaded.
demonstration thereby - one can now the Long dw.CallerProcAddr a ProcAddr allocate. |
| | | | |
| | Michael Wodrich | | | | Programmieren, das spannendste Detektivspiel der Welt. | 12/01/07 ▲ |
| |
| | | @Dietmar: you should The old Unit from Your XManager herauswerfen and through these INC supplant. The INC is fehlerfreier, unanfälliger and faster there tappt im dunkeln differently operates as The Unit. |
| | | | |
| | marian | Hi, I have unfortunately no Full Version of xProfan 11, would like but nevertheless a File from the internet herunterladen. thereby be I on these Include (Version 0.16) punched, but somehow white I do not moreover. so sees momentarily my Testprogramm for procedure from: CompileMarkSeparation The Interpreter Version 8 gives immediate a Error Message from, that dw.CallerProcAddr no number be. comments one these Line, so follow Fehlermeldungen, that The functions uncharted seien. The Interpreter the Freeversion 11 crashes. removes one $I download.inc comes not to that crash, but even to the usual Fehlermeldungen "Function unbekannt" or. "Klammern not ausgewogen"
What do I do wrong?? |
| | | | |
| | | | | | | |
| | marian | I Have me now XPSE Downloaded and the Path to xpse.exe as Interpreterpfad indicated. if I now so the Beispielprogramm ausführe opens itself one DOS-Window with the informations, that Runtime and compiler found get. Runtime and compiler are both from the Version 8. If I then one "C" eingebe, in order to compilieren, remaining the Compiler in line 6 stand with the Error Message: "Befehl uncharted: VAR" I Have already attempts, in the *.enh-File any var-command through declare To replaced. there coming then The Error Message at Compilieren: "Befehl uncharted: SELECT"
who can help?
the Updatemanagement the Community, bring me nothing, there the program not this senses published go should. |
| | | | |
| | | Ah, understand - "fehlen" the XProfan 8 another couple others Features.
I look (to the evening meal) whether the not simply for XProfan 8 translate can. |
| | | | |
| | | Try time: (ungetestet) CompileMarkSeparationdef $dw.version="0.1.6.x8.0"
var dw.CallerProcAddr&=0
proc dw.ver
return $dw.version
endproc
proc dw.ip
return dw.get("https://ip.mxii.com")
endproc
proc dw.get
parameters url$,target$
if %pCount=1
return dw.DownloadFile(url$,"",dw.CallerProcAddr&)
elseif %pCount=2
return dw.DownloadFile(url,target,dw.CallerProcAddr&)
endif
return ""
endproc
proc dw.checkinternet
var isnet&=0
var dllh&=usedll("wininet.dll")
casenot dllh& : return 0
var hinet&=external("wininet.dll","InternetOpenA",0,0,0,0,0)
if hinet&
isnet&=1
external("wininet.dll","InternetCloseHandle",hInet&)
endif
freedll dllh&
return isnet&
endproc
proc dw.checkspeed
casenot dw.checkinternet() : return 0
var __int_dwspd&=&gettickcount
dw.get("https://ip.mxii.com/speed.get")
__int_dwspd&=1000/((&gettickcount-__int_dwspd&)/150000)
return __int_dwspd&
endproc
######## INTERNAL FUNCTIONS ########
proc dw.DownloadFile
parameters url$,destinationFileName$,downloadCallerProc&
var oel&=set("ErrorLevel",-1)
var ofm&=set("FileMode",2)
var content$=""
var tofile&=if(len(destinationFileName$),1,0)
var dllh&=usedll("wininet.dll")
ifnot dllh&
set("FileMode",ofm&)
set("ErrorLevel",oel&)
return ""
endif
var hInet& = external("wininet.dll","InternetOpenA",0,0,0,0,0)
ifnot hInet&
freedll dllh&
set("FileMode",ofm&)
set("ErrorLevel",oel&)
return ""
endif
var hFile&=external("wininet.dll","InternetOpenUrlA",hInet&,addr(url$),0,0,$80000000,0)
ifnot hFile&
external("wininet.dll","InternetCloseHandle",hInet&)
freedll dllh&
set("FileMode",ofm&)
set("ErrorLevel",oel&)
return ""
endif
declare buf#
dim buf#,1024
if tofile&
if fileexists(destinationFileName)
var delfh&=assign(destinationFileName$)
erase delfh&
assign delfh&,""
endif
var fh&=assign(destinationFileName$)
openrw fh&
endif
case downloadCallerProc& : call(downloadCallerProc&,-1)
var bytesread&=0
var accbytesread&=0
while 1
external("wininet.dll","InternetReadFile",hFile&,buf#,1024,addr(bytesread&))
if bytesread&>0
if tofile
blockwrite fh&,buf#,0,bytesread&
accbytesread&=accbytesread&+bytesread&
else
content$=content$+char$(buf#,0,bytesread&)
endif
case downloadCallerProc& : call(downloadCallerProc&,bytesread&)
else
break
endif
wend
case downloadCallerProc& : call(downloadCallerProc&,-2)
external("wininet.dll","InternetCloseHandle",hFile&)
external("wininet.dll","InternetCloseHandle",hInet&)
dispose buf#
freedll dllh&
set("FileMode",ofm&)
set("ErrorLevel",oel&)
if tofile&
closerw fh&
assign fh&,""
return accbytesread&
end
return content$
endproc
|
| | | | |
| | | Spars you, The Vars must too yet lane... |
| | | | |
| | | | - Page 2 - |
| | | so - and Assign on #99 umgestellt instead of dynamic - please test: CompileMarkSeparationdef $dw.version="0.1.6.x8.0"
declare dw.CallerProcAddr&
dw.CallerProcAddr&=0
proc dw.ver
return $dw.version
endproc
proc dw.ip
return dw.get("https://ip.mxii.com")
endproc
proc dw.get
parameters url$,target$
if %pCount=1
return dw.DownloadFile(url$,"",dw.CallerProcAddr&)
elseif %pCount=2
return dw.DownloadFile(url,target,dw.CallerProcAddr&)
endif
return ""
endproc
proc dw.checkinternet
declare isnet&
isnet&=0
declare dllh&
dllh&=usedll("wininet.dll")
casenot dllh& : return 0
declare hinet&
hinet&=external("wininet.dll","InternetOpenA",0,0,0,0,0)
if hinet&
isnet&=1
external("wininet.dll","InternetCloseHandle",hInet&)
endif
freedll dllh&
return isnet&
endproc
proc dw.checkspeed
casenot dw.checkinternet() : return 0
declare __int_dwspd&
__int_dwspd&=&gettickcount
dw.get("https://ip.mxii.com/speed.get")
__int_dwspd&=1000/((&gettickcount-__int_dwspd&)/150000)
return __int_dwspd&
endproc
######## INTERNAL FUNCTIONS ########
proc dw.DownloadFile
parameters url$,destinationFileName$,downloadCallerProc&
declare oel&,ofm&,content$,tofile&,dllh&,hInet&,hFile&,delfh&,fh&,bytesread&,accbytesread&
oel&=set("ErrorLevel",-1)
ofm&=set("FileMode",2)
content$=""
tofile&=if(len(destinationFileName$),1,0)
dllh&=usedll("wininet.dll")
ifnot dllh&
set("FileMode",ofm&)
set("ErrorLevel",oel&)
return ""
endif
hInet& = external("wininet.dll","InternetOpenA",0,0,0,0,0)
ifnot hInet&
freedll dllh&
set("FileMode",ofm&)
set("ErrorLevel",oel&)
return ""
endif
hFile&=external("wininet.dll","InternetOpenUrlA",hInet&,addr(url$),0,0,$80000000,0)
ifnot hFile&
external("wininet.dll","InternetCloseHandle",hInet&)
freedll dllh&
set("FileMode",ofm&)
set("ErrorLevel",oel&)
return ""
endif
declare buf#
dim buf#,1024
if tofile&
if fileexists(destinationFileName$)
assign #99,destinationFileName$
erase #99
endif
assign #99,destinationFileName$
openrw #99
endif
case downloadCallerProc& : call(downloadCallerProc&,-1)
bytesread&=0
accbytesread&=0
while 1
external("wininet.dll","InternetReadFile",hFile&,buf#,1024,addr(bytesread&))
if bytesread&>0
if tofile
blockwrite #99,buf#,0,bytesread&
accbytesread&=accbytesread&+bytesread&
else
content$=content$+char$(buf#,0,bytesread&)
endif
case downloadCallerProc& : call(downloadCallerProc&,bytesread&)
else
break
endif
wend
case downloadCallerProc& : call(downloadCallerProc&,-2)
external("wininet.dll","InternetCloseHandle",hFile&)
external("wininet.dll","InternetCloseHandle",hInet&)
dispose buf#
freedll dllh&
set("FileMode",ofm&)
set("ErrorLevel",oel&)
if tofile&
closerw #99
return accbytesread&
return content$
endproc
|
| | | | |
| | Dietmar Horn | with XProfan 8.0 weg The Dateinummern not yet To 99, separate only of 1 To 15. |
| | | Multimedia für Jugendliche und junge Erwachsene - MMJ Hoyerswerda e.V. [...] Windows 95 bis Windows 7 Profan² 6.6 bis XProfan X2 mit XPSE Das große XProfan-Lehrbuch: [...] | 05/28/10 ▲ |
| |
| | | Roland!
The Helpfile in the XProfan 8-pkg is a HLP!
Ahhhhhhhhhhhhhhhhhh! *kreuzbandschüttel*
@Dietmar: have on #15 umgestellt and from if tofile if tofile& made: CompileMarkSeparationdef $dw.version="0.1.6.x8.0"
declare dw.CallerProcAddr&
dw.CallerProcAddr&=0
proc dw.ver
return $dw.version
endproc
proc dw.ip
return dw.get("https://ip.mxii.com")
endproc
proc dw.get
parameters url$,target$
if %pCount=1
return dw.DownloadFile(url$,"",dw.CallerProcAddr&)
elseif %pCount=2
return dw.DownloadFile(url,target,dw.CallerProcAddr&)
endif
return ""
endproc
proc dw.checkinternet
declare isnet&
isnet&=0
declare dllh&
dllh&=usedll("wininet.dll")
casenot dllh& : return 0
declare hinet&
hinet&=external("wininet.dll","InternetOpenA",0,0,0,0,0)
if hinet&
isnet&=1
external("wininet.dll","InternetCloseHandle",hInet&)
endif
freedll dllh&
return isnet&
endproc
proc dw.checkspeed
casenot dw.checkinternet() : return 0
declare __int_dwspd&
__int_dwspd&=&gettickcount
dw.get("https://ip.mxii.com/speed.get")
__int_dwspd&=1000/((&gettickcount-__int_dwspd&)/150000)
return __int_dwspd&
endproc
######## INTERNAL FUNCTIONS ########
proc dw.DownloadFile
parameters url$,destinationFileName$,downloadCallerProc&
declare oel&,ofm&,content$,tofile&,dllh&,hInet&,hFile&,delfh&,fh&,bytesread&,accbytesread&
oel&=set("ErrorLevel",-1)
ofm&=set("FileMode",2)
content$=""
tofile&=if(len(destinationFileName$),1,0)
dllh&=usedll("wininet.dll")
ifnot dllh&
set("FileMode",ofm&)
set("ErrorLevel",oel&)
return ""
endif
hInet& = external("wininet.dll","InternetOpenA",0,0,0,0,0)
ifnot hInet&
freedll dllh&
set("FileMode",ofm&)
set("ErrorLevel",oel&)
return ""
endif
hFile&=external("wininet.dll","InternetOpenUrlA",hInet&,addr(url$),0,0,$80000000,0)
ifnot hFile&
external("wininet.dll","InternetCloseHandle",hInet&)
freedll dllh&
set("FileMode",ofm&)
set("ErrorLevel",oel&)
return ""
endif
declare buf#
dim buf#,1024
if tofile&
if fileexists(destinationFileName)
assign #15,destinationFileName$
erase #15
endif
assign #15,destinationFileName$
openrw #15
endif
case downloadCallerProc& : call(downloadCallerProc&,-1)
bytesread&=0
accbytesread&=0
while 1
external("wininet.dll","InternetReadFile",hFile&,buf#,1024,addr(bytesread&))
if bytesread&>0
if tofile&
blockwrite #15,buf#,0,bytesread&
accbytesread&=accbytesread&+bytesread&
else
content$=content$+char$(buf#,0,bytesread&)
endif
case downloadCallerProc& : call(downloadCallerProc&,bytesread&)
else
break
endif
wend
case downloadCallerProc& : call(downloadCallerProc&,-2)
external("wininet.dll","InternetCloseHandle",hFile&)
external("wininet.dll","InternetCloseHandle",hInet&)
dispose buf#
freedll dllh&
set("FileMode",ofm&)
set("ErrorLevel",oel&)
if tofile&
closerw #15
return accbytesread&
return content$
endproc
CompileMarkSeparation functions so with XProfan 8 (tested). |
| | | | |
|
AnswerTopic-Options | 29.084 Views |
Themeninformationenthis Topic has 4 subscriber: |