|
Post by angelo2449 on Apr 11, 2022 6:38:26 GMT -5
Hi guys,
I can't open a file remotely, the syntax should be this:
nomainwin
open "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe " +_
"https://onedrive.live.com/?id=DF3B4D5AB539076B%2120981&cid=DF3B4D5AB539076\" +_
"Gestione110\Configurazione\Config.dat" for input as #11
input #11, A$
input #11, B$
close #11
but there is a mistake
, thank you
|
|
|
Post by Rod on Apr 11, 2022 8:41:25 GMT -5
Well you cant use the browser AND link to the file. You can open the file in a browser OR open the file for input. Look at httpget$ this gets web based data. If you are logged in on one drive try this.
b$ = "https://onedrive.live.com/?id=DF3B4D5AB539076B%2120981&cid=DF3B4D5AB539076\Gestione110\Configurazione\Config.dat" RUN "rundll32.exe url.dll,FileProtocolHandler ";b$
That should open a browser with your file as the content, but it probably isn't what you want to do because you will not be able to deal with the file within Liberty BASIC.
|
|
|
Post by tenochtitlanuk on Apr 11, 2022 11:41:57 GMT -5
Thie following code retrieves a file from my site; saves it; and displays it. Something similar should work for you- but no idea if it works from cloud storage- Onedrive is not directly available to me as I work in Linux/Wine/LB.
remote$ = httpget$( "https://www.diga.me.uk/isWordInSowpods.bas") open "localSOWPODS.bas" for output as #fOut #fOut, remote$; close #fOut run "Notepad localSOWPODS.bas", MINIMIZE
EDIT Similarly, downloading and displaying an html page...
URLFile$ ="https://www.diga.me.uk/index.html" lpOperation$ = "open" lpParameters$ = "" lpDirectory$ = DefaultDir$ nShowCmd = _SW_SHOWNORMAL
calldll #shell32, "ShellExecuteA", _ hWindow as ulong, _ 'parent window lpOperation$ as ptr, _ 'open or print URLFile$ as ptr, _ 'file name lpParameters$ as ptr, _ 'null lpDirectory$ as ptr, _ 'default directory nShowCmd as long, _ 'show window flag result as long
if result <= 32 then print "Error, Address Failure!": print "Done"
remote$ = httpget$( "https://www.diga.me.uk/index.html") open "localIndex.html" for output as #fOut #fOut, remote$; close #fOut
|
|