Xojo url file return
- #Xojo url file return how to#
- #Xojo url file return mac os#
- #Xojo url file return full#
- #Xojo url file return code#
If f.Exists then // Be aware that TextInputStream.
#Xojo url file return code#
I tested successfully the code below :į=(“index.html”) You may want to load the page into a string and then LoadPage the source into your HTMLViewer. Mac OS X has issues showing local files addressed through file:// in desktop, this maybe the same phenomenon hitting Web Edition.
#Xojo url file return mac os#
PS: this is on Mac OS 10.8.5, and Xojo 2014 r2.1 If fnil and f.Exists then me.URL="file://"+f.ShellPathįile:///Users/locvac/Desktop/TestSite/index.htmlĪnd if I use the above URL straight in Safari the page is properly shown. The web page is shown in the HTMLViewer and if I click on the WebLink named URLfield1 the page opens in the browser.īut this code doesn’t show anything in the HTMLViewer and if I click on the WebLink URLfield nothing happens:į=(“TestSite”).Child(“index.html”) This code placed in the Open event of a HTMLViewer properly works for showing the external page: All Rights Reserved.In trying to setup a help system in my web app, preparing the help pages in RapidWeaver, I’m apparently unable to show them in a HTMLViewer. WriteEntireTextFile( "qa_data/tokens/microsoftGraph.json",json. Save the JSON to a file for future requests. HasMember( "expires_on") True) Then Dim dtExpire As New Chilkat. This way we'll know when the token expires. EmitCompact = False // The JSON response looks like this: // // If an "expires_on" member does not exist, then add the JSON member by // getting the current system date/time and adding the "expires_in" seconds.
#Xojo url file return full#
Get the full JSON response: Dim json As New Chilkat. System.DebugLog( "Access Token = " + oauth2. System.DebugLog( " OAuth2 authorization granted!") System.DebugLog( "Unexpected AuthFlowState:" + Str(oauth2. NumMsWaited = 0 While (numMsWaited 3) Then Add the code to load the url in a web browser here. For example, // in C#: (url) // in Java: Desktop.getDesktop().browse(new URI(url)) // in VBScript: Set wsh=WScript.CreateObject("WScript.Shell") // wsh.Run url // in Xojo: ShowURL(url) (see ) // in Dataflex: Runprogram Background "c:\Program Files\Internet Explorer\iexplore.exe" sUrl // The Microsoft account owner would interactively accept or deny the authorization request. Return End If // At this point, your application should load the URL in a browser. This returns a URL that should be loaded in a browser. Scope = "openid profile offline_access user.readwrite mail.readwrite nd files.readwrite" // Begin the OAuth2 three-legged flow. See // Important: To get a refresh token in the final response, you have to ask for "offline_access" scope CodeChallenge = False // Provide a SPACE separated list of scopes. Mac App Name: The actual file name for the macOS app. The macOS section allows you to specify settings for the macOS web app. Domain Name: The full domain or subdomain used to access this app from a browser. To make permanent changes, use SETX Variables can be displayed using either SET or ECHO. ClientSecret = "MICROSOFT-GRAPH-CLIENT-SECRET" Last URL: The previously assigned URL for accessing this app from a browser. Environment variables are mainly used within batch files, they can be created, modified and deleted for a session using the SET command. ClientId = "MICROSOFT-GRAPH-CLIENT-ID" // This is your app password: TokenEndpoint = "" // Replace these with actual values. The callback URL would look like " if the port number is 3017. This should be the port in the localhost callback URL for your app. Just tell oauth2 to use the socket which has the HTTP proxy properties. OAuth2 Dim success As Boolean // We don't need to connect the socket beforehand. HttpProxyForHttp = True Dim oauth2 As New Chilkat. HttpProxyPort = 808 // Specify login/password if needed. HttpProxyHostname = "" // Change this to the listening port of your HTTP proxy server (if necessary) Socket // Use your HTTP proxy server domain or IP address. To use an HTTP proxy with OAuth2, create a Chilkat socket object and specify the details. See Global Unlock Sample for sample code. This example requires the Chilkat API to have been previously unlocked. Xojo Plugin for Windows, Linux, Mac OS X, and ARM This one happens to demonstrate for Microsoft Graph. The technique is the same for all OAuth2 applications.
#Xojo url file return how to#
(Xojo Plugin) OAuth2 using an HTTP Proxy (for a Desktop Application)ĭemonstrates how to send OAuth2 communications through an HTTP proxy for a desktop application.