WebGadget() - "file://"
WebGadget() - "file://"
Unable to load html files in the webgadget.
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
-
- Enthusiast
- Posts: 536
- Joined: Mon Feb 16, 2009 10:42 am
- Location: sweden
- Contact:
Re: WebGadget() - "file://"
But.... without testing this..... Isn't this exactly how the Purebasic Help works? Isn't that a webgadget with a local file?
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: WebGadget() - "file://"
...on Windows the Help files are Microsoft .chm (Compiled HTML). They are displayed by the default Windows chm viewer.
Try passing the full path of the file to the WebGadget, excluding "file://"
Try passing the full path of the file to the WebGadget, excluding "file://"
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: WebGadget() - "file://"
Yes, the help on OS X use the webgadget() with local files
-
- Enthusiast
- Posts: 536
- Joined: Mon Feb 16, 2009 10:42 am
- Location: sweden
- Contact:
Re: WebGadget() - "file://"
Code: Select all
OpenWindow(0,0,0,640,480,"")
WebGadget(0,0,0,640,480,"file://"+GetTemporaryDirectory()+"output.html")
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: WebGadget() - "file://"
...could the issue be the files themselves? Perhaps they are HTML5 and the webgadget cannot interpret them?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: WebGadget() - "file://"
Yeah, it was a HTML5 file.
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
-
- Addict
- Posts: 1309
- Joined: Fri Aug 28, 2015 6:10 pm
- Location: Portugal
Re: WebGadget() - "file://"
Having the same trouble with local files.
The web gadget displays them correctly in the windows version (win xp and win 7.0) but not on the mac.
Is the HTML 5 issue only on the mac?
CD
The web gadget displays them correctly in the windows version (win xp and win 7.0) but not on the mac.
Is the HTML 5 issue only on the mac?
CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
-
- Addict
- Posts: 1309
- Joined: Fri Aug 28, 2015 6:10 pm
- Location: Portugal
Re: WebGadget() - "file://"
Found the problem.
The file I was attempting to load had spaces in. Changed all these to %20 and It worked.
CD
The file I was attempting to load had spaces in. Changed all these to %20 and It worked.
CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
Re: WebGadget() - "file://"
Thats what I mean...
You can try the URLEncoder(URL$ [, Format]) to encode the path to a URL.
You can try the URLEncoder(URL$ [, Format]) to encode the path to a URL.
macOS Catalina 10.15.7
-
- Addict
- Posts: 1309
- Joined: Fri Aug 28, 2015 6:10 pm
- Location: Portugal
Re: WebGadget() - "file://"
URLencoder worked first time. No problems on either platform now.
Must be getting old used that before and forgot.
Thanks for replies.
CD
Must be getting old used that before and forgot.
Thanks for replies.
CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.