<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Custom URI URL Protocol &#8211; Xojo Programming Blog</title>
	<atom:link href="https://blog.xojo.com/tag/custom-uri-url-protocol/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.xojo.com</link>
	<description>Blog about the Xojo programming language and IDE</description>
	<lastBuildDate>Thu, 02 Apr 2026 16:10:25 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.5</generator>
	<item>
		<title>Using Custom URI to Compliment your Web Application</title>
		<link>https://blog.xojo.com/2026/04/06/using-custom-uri-to-compliment-your-web-application/</link>
		
		<dc:creator><![CDATA[Wayne Golding]]></dc:creator>
		<pubDate>Mon, 06 Apr 2026 14:10:00 +0000</pubDate>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Custom URI URL Protocol]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=16094</guid>

					<description><![CDATA[There are times when you will want to use the resources of your web application’s user computer, for example, printing a sales docket for a&#8230;]]></description>
										<content:encoded><![CDATA[
<p>There are times when you will want to use the resources of your web application’s user computer, for example, printing a sales docket for a Point-Of-Sale site. In this article, I will expand on William Yu’s blog post <a href="https://blog.xojo.com/2016/08/16/custom-uri-schemes-on-windows/">Custom URI Schemes On Windows</a> from 2016. Again, I’m going to use a simple alert-type application, add an Inno Setup script to install the client app, and show how to invoke that app from your web application.</p>



<p>First, I’m going to create a headless desktop application. A console application would work, but shows a command box.</p>



<p>In the Xojo IDE, create a new desktop project and delete Window1 and MainMenuBar. Then add the Opening Event Handler to App and add this code:</p>



<pre class="wp-block-code"><code>Self.AllowAutoQuit = True</code></pre>



<p>This will allow the application to quit when done.</p>



<p>Add the DocumentOpened Event Handler to App and add this code:</p>



<pre class="wp-block-code"><code>If item _ ' Using item
 .NativePath _ ' property NativePath
 .NthField(":", 1) &lt;> "AlertDemo" Then ' Compare the value left of the ":"
 Return ' If invalid return (quit)
End If
Var alert As String ' Define the variable
alert = item _ ' Using Item
 .NativePath _ ' property NativePath
 .NthField(":", 2) ' Extract the contents to the right of the ":"

alert = DecodeURLComponent(alert) ' Convert the content to plain text
MessageBox(alert) ' Show the alert
' The app will now quit</code></pre>



<p>To test you can select Shared in Build Settings.</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="366" height="183" src="https://blog.xojo.com/wp-content/uploads/2026/03/image.png" alt="" class="wp-image-16095" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/image.png 366w, https://blog.xojo.com/wp-content/uploads/2026/03/image-300x150.png 300w" sizes="(max-width: 366px) 100vw, 366px" /></figure>



<p><br>And enter a value into Command Line Arguments:</p>



<figure class="wp-block-image size-full"><img decoding="async" width="595" height="126" src="https://blog.xojo.com/wp-content/uploads/2026/03/image-1.png" alt="" class="wp-image-16096" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/image-1.png 595w, https://blog.xojo.com/wp-content/uploads/2026/03/image-1-300x64.png 300w" sizes="(max-width: 595px) 100vw, 595px" /></figure>



<p><br>Running the app in debug mode will show:</p>



<figure class="wp-block-image size-full"><img decoding="async" width="231" height="237" src="https://blog.xojo.com/wp-content/uploads/2026/03/image-2.png" alt="" class="wp-image-16097"/></figure>



<p><br>Now build the project and create an installer using <a href="https://jrsoftware.org/isinfo.php">Inno Setup</a>.</p>



<pre class="wp-block-preformatted">[Setup]<br>AppId={{B4D9ABDA-9F58-4FE0-A5F3-3E39C28EAB59}<br>AppName=Alert Demo<br>AppVersion=1.0<br>DefaultDirName={commonpf64}\Axis Direct Ltd\Alert Demo<br>DefaultGroupName=Axis Direct<br>OutputDir=C:\Xojo Projects\Alert Demo\Installer<br>OutputBaseFilename=AlertDemoInstaller<br>Compression=lzma<br>SolidCompression=yes<br>ChangesEnvironment=yes<br>[Languages]<br>Name: "english"; MessagesFile: "compiler:Default.isl"<br>[Tasks]<br>[Dirs]<br>Name: "{app}\Alert Demo Libs"<br>[Files]<br>Source: "C:\Xojo Projects\Alert Demo\Project\Builds - Alert<br>Demo\Windows 64 bit\Alert Demo*"; DestDir: "{app}"; Flags:<br>ignoreversion<br>Source: "C:\Xojo Projects\Alert Demo\Project\Builds - Alert<br>Demo\Windows 64 bit\Alert Demo\Alert Demo Libs*"; DestDir:<br>"{app}\Alert Demo Libs"; Flags: ignoreversion<br>[Icons]<br>[Run]<br>[Registry]<br>Root: HKCR; Subkey: "AlertDemo"; Flags: uninsdeletekey<br>Root: HKCR; Subkey: "AlertDemo"; ValueType: "String";<br>ValueData: "URL:AlertDemo Protocol"; Flags: uninsdeletekey<br>Root: HKCR; Subkey: "AlertDemo"; ValueName: "URL Protocol";<br>ValueType: "String"; ValueData: ""; Flags: uninsdeletekey<br>Root: HKCR; Subkey: "AlertDemo\shell"; Flags: uninsdeletekey<br>Root: HKCR; Subkey: "AlertDemo\shell\open"; Flags:<br>uninsdeletekey<br>Root: HKCR; Subkey: "AlertDemo\shell\open\command"; Flags:<br>uninsdeletekey<br>Root: HKCR; Subkey: "AlertDemo\shell\open\command";<br>ValueType: String; ValueData: "{app}\Alert Demo.exe %1";<br>Flags: uninsdeletekey</pre>



<p>The registry section creates the registry entries per <a href="https://blog.xojo.com/2016/08/16/custom-uri-schemes-on-windows/">William’s blog post</a>.</p>



<p>Now that the application Is installed, we’ll look at the Web Application. For the sake of testing, I’m just adding a Button to a WebPage and adding the following code into the pressed event.</p>



<pre class="wp-block-code"><code>Var s As String = "Hello World"
Var Alert As String
Alert = EncodeURLComponent(s) ' Make the string URL safe
GoToURL("AlertDemo:" + Alert, True) ' Launch the app in a new tab</code></pre>



<p>And that is it!</p>



<p>For printing a docket, I would pass a unique identifier for the transaction using this method then access the data using URLConnection &amp; HandleURL.</p>



<p><em>Wayne Golding has been a Xojo developer since 2005 and is a Xojo MVP. He operates the IT Company <a href="http://www.axisdirect.nz">Axis Direct Ltd </a>which primarily develops applications using Xojo that integrate with Xero www.xero.com. Wayne’s hobby is robotics where he uses Xojo to build applications for his Raspberry Pi, often implementing IoT for remote control.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Custom URI Schemes On Windows</title>
		<link>https://blog.xojo.com/2016/08/16/custom-uri-schemes-on-windows/</link>
		
		<dc:creator><![CDATA[William Yu]]></dc:creator>
		<pubDate>Tue, 16 Aug 2016 18:30:48 +0000</pubDate>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[Custom URI URL Protocol]]></category>
		<guid isPermaLink="false">http://blog.xojo.com/?p=1595</guid>

					<description><![CDATA[Learn to customize URI schemes on Windows with Xojo applications.]]></description>
										<content:encoded><![CDATA[<p>Have you ever wondered how entering <strong>mailto:blah@spam.com</strong> into the URL field in your web browser automatically brings up your mail app (i.e. Outlook for most Windows users)? Well you&#8217;re in luck because <a href="https://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx">this article</a> explains it all. Enjoy!</p>
<p>Ok, now that you&#8217;ve read that article let&#8217;s take a closer look at how you, as a Xojo developer, can handle this. Well, as you&#8217;ve diligently read in the above article, the first step is to register your application to handle a particular URI scheme by modifying the registry. The preferred approach is to do this as part of your Application&#8217;s installation process because at that point the user has given access rights to install your app and access rights therefore to modify the registry. This is the general structure as discussed in the MSDN article:</p>
<pre>HKEY_CLASSES_ROOT
    alert
        (Default) = "URL:Alert Protocol"
        URL Protocol = ""
        DefaultIcon
            (Default) = "alert.exe,1"
        shell
            open
                command
                    (Default) = "C:\Program Files\Alert\alert.exe" "%1"</pre>
<p>Where &#8220;alert&#8221; is your URI scheme, so if you navigate to a URI like <strong>alert:Hello</strong>, your web browser will launch your application with an extra command line argument: &#8220;alert:Hello&#8221;</p>
<p>The MSDN article goes into detail about how spaces, quotes, or backslashes affect your command line arguments depending on how the URI is invoke (i.e. Web Browser vs. ShellExecute/Run command). The take home message is just to avoid spaces, quotes, or backslashes in your URI if possible.</p>
<p>If you simply want to create a quick test to see how this works, you could execute the following Xojo code to add this URI scheme to the registry:</p>
<pre><span style="color: #0000ff;">Dim</span> reg <span style="color: #0000ff;">As New</span> RegistryItem(<span style="color: #6500fe;">"HKEY_CLASSES_ROOT"</span>)
reg = reg.AddFolder(<span style="color: #6500fe;">"alert"</span>)
reg.DefaultValue = <span style="color: #6500fe;">"URL:Alert Protocol"</span>
reg.Value(<span style="color: #6500fe;">"URL Protocol"</span>) = <span style="color: #6500fe;">""</span>

<span style="color: #0000ff;">Dim</span> defaultIcon <span style="color: #0000ff;">As</span> RegistryItem = reg.AddFolder(<span style="color: #6500fe;">"DefaultIcon"</span>)
defaultIcon.DefaultValue = <span style="color: #6500fe;">""""</span> + App.ExecutableFile.NativePath + <span style="color: #6500fe;">""",1"</span>

<span style="color: #0000ff;">Dim</span> commandItem <span style="color: #0000ff;">As</span> RegistryItem = reg.AddFolder(<span style="color: #6500fe;">"shell"</span>).AddFolder(<span style="color: #6500fe;">"open"</span>).AddFolder(<span style="color: #6500fe;">"command"</span>)
commandItem.DefaultValue = <span style="color: #6500fe;">""""</span> + App.ExecutableFile.NativePath + <span style="color: #6500fe;">""" ""%1"""</span></pre>
<p>Because you&#8217;re modifying the registry, you will need to run your application as administrator (i.e. contextual/right click your app and select &#8220;Run as administrator&#8221; in the menu). This will add the necessary registry entries.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-1597" src="https://blog.xojo.com/wp-content/uploads/2016/08/regentry.png" alt="regentry" width="773" height="142" /></p>
<p>After this is done, your URI scheme is ready to be tested. Launch Internet Explorer and enter &#8220;alert:hello&#8221; in the URL field. After pressing Enter, your Application that added those registry entries will be launched. Now all you need to do is check the System.CommandLine property to see what alert message was passed. For example, if I added a MsgBox System.CommandLine to my App.Open event, I&#8217;d get something like this after entering &#8220;alert:how cool isXojo&#8221; in the URL field in Internet Explorer.</p>
<p><img loading="lazy" decoding="async" class=" wp-image-1596 aligncenter" src="https://blog.xojo.com/wp-content/uploads/2016/08/alertcommandline.png" alt="alertcommandline" width="580" height="192" /></p>
<p>As you can see it&#8217;s very easy to set this up and handle the custom URI schemes in your application.  Just be aware of the potential security issues that malicious people could be passing to your command line and handle those appropriately.</p>
<p>To use custom URIs on Mac OS X visit this post: <a href="http://blog.xojo.com/2016/05/09/let-your-os-x-desktop-app-react-to-custom-uris/">Let Your OS X Desktop App React to Custom URIs </a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Let Your OS X Desktop App React to Custom URIs</title>
		<link>https://blog.xojo.com/2016/05/09/let-your-os-x-desktop-app-react-to-custom-uris/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Mon, 09 May 2016 00:00:00 +0000</pubDate>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[AprendeXojo]]></category>
		<category><![CDATA[Custom URI URL Protocol]]></category>
		<guid isPermaLink="false">http://blogtemp.xojo.com/2016/05/09/let-your-os-x-desktop-app-react-to-custom-uris/</guid>

					<description><![CDATA[The truth is that implementing Uniform Resource Identifiers in your OS X apps is not rocket science! Follow these simple steps in order to register a custom URI from your app. ]]></description>
										<content:encoded><![CDATA[<p>Have you ever wondered how the magic behind the &#8220;mailto://&#8221; or other similar <em><a href="https://en.wikipedia.org/wiki/Uniform_Resource_Identifier" target="_blank" rel="noopener">Uniform Resource Identifiers</a> (URI) </em>work? Whether&nbsp;from the web browser URL field or from Xojo via&nbsp;the <a href="http://documentation.xojo.com/api/deprecated/showurl.html" target="_blank" rel="noopener">ShowURL</a> function, when URIs are executed the registered app opens showing the passed parameters (for example, in the Mail app for the &#8216;To&#8217;, &#8216;Subject&#8217; and &#8216;Body&#8217; fields).</p>
<p>Implementing this kind of behavior&nbsp;in your OS X apps is not rocket science! Follow these simple steps in order to register a custom URI from your app.</p>
<p><span id="more-297"></span></p>
<h2><img decoding="async" style="width: 320px;margin: 0px auto" title="hearing.jpg" src="https://blog.xojo.com/wp-content/uploads/2016/05/hearing.jpgt1466486449161ampwidth320" alt="hearing.jpg" width="320"></h2>
<h2>Register the custom URI you want to manage</h2>
<p>You&#8217;ll need to modify&nbsp;the &#8220;info.plist&#8221; file generated by Xojo every time the app is compiled, so it necessarily involves the use of the powerful <a href="/2013/12/18/build_automation/" target="_blank" rel="noopener">Build Steps</a>! To smooth the road, follow these steps first:</p>
<ol>
<li>Control + Click the OS X item under the <strong>Build Settings</strong> section of the Project Browser panel (the leftmost column in the Xojo IDE)</li>
<li>Select the option Add to &#8220;Build Settings&#8221; &gt; Build Step &gt; Script.</li>
<li>Paste the following code (make sure PlistBuddy from Apple&#8217;s Developer Tools is installed on your Mac!):</li>
</ol>
<pre>Dim App As String = CurrentBuildLocation + "/" + CurrentBuildAppName
call DoShellCommand("/usr/libexec/PlistBuddy -c ""add :CFBundleURLTypes array"" " + App + "/Contents/Info.plist" )
call DoShellCommand("/usr/libexec/PlistBuddy -c ""add :CFBundleURLTypes:0 dict"" " + App + "/Contents/Info.plist" )
call DoShellCommand("/usr/libexec/PlistBuddy -c ""add :CFBundleURLTypes:0:CFBundleURLName string 'Demo'"" " + App + "/Contents/Info.plist" )
call DoShellCommand("/usr/libexec/PlistBuddy -c ""add :CFBundleURLTypes:0:CFBundleURLSchemes array"" " + App + "/Contents/Info.plist" )
call DoShellCommand("/usr/libexec/PlistBuddy -c ""add :CFBundleURLTypes:0:CFBundleURLSchemes:0 string 'demo'"" " + App + "/Contents/Info.plist" )</pre>
<p>Observe the use of the strings &#8216;Demo&#8217; and &#8216;demo&#8217; for the CFBundleURLName and CFBundleURLSchemes keys, respectively. The second one, CFBundleURLSchemes, is the customized URI that anyone will be able to use to pass information to our application.</p>
<p>Make sure to select the option &#8220;Both&#8221; on the Inspector for this build step, and type a name to identify this script&nbsp; (for example, &#8220;Insert URI on Plist&#8221;). This way the URI will be registered every time&nbsp;you run the app from the Debugger or once it is compiled for deployment (release or standalone app).</p>
<h2>Let your app react to the URI</h2>
<p>The second main step is letting your Xojo app react to the URI, this is something you can do by adding the <a href="http://documentation.xojo.com/api/deprecated/application.html#application-handleappleevent" target="_blank" rel="noopener">HandleAppleEvent</a> event to the App Object.</p>
<p>As for the code, you&nbsp;will probably want to to use inside this Event, the main point is to identify the received Event and compare it to the &#8220;GURL&#8221; string, because this is the identifier used by OS X for sending an URI event:</p>
<pre>&nbsp;&nbsp;&nbsp; if eventClass = "GURL" then
&nbsp;&nbsp; &nbsp;  //do your thing
&nbsp;&nbsp; &nbsp;  return true
&nbsp;&nbsp; &nbsp;end if
&nbsp;&nbsp; &nbsp;return false</pre>
<p>This way the app doesn&#8217;t interferes with the events we are not interested in.</p>
<p>It is very important to point out&nbsp;that the HandleAppleEvent event should exit with Return False for the ignored Events. Otherwise the user of your app probably will&nbsp;experience malfunctions using keyboard shortcuts on TextFields or TextAreas among other problems.</p>
<h2>Getting the information</h2>
<p>The final step is to extract the passed information along the &#8220;GURL&#8221; event. <a href="http://documentation.xojo.com/api/language/app.htmlleEvent" target="_blank" rel="noopener">Xojo provides several methods</a> that helps you do this; but for this example we are going to provide the code for the most common uses: getting the information sent as a text String.</p>
<pre>&nbsp;&nbsp;&nbsp; dim s() as string = DecodeURLComponent(theEvent.StringParam("----")).DefineEncoding(encodings.UTF8).Split(":")
&nbsp;&nbsp;&nbsp; s.Remove(0)</pre>
<p>The main point here is the &#8216;theEvent.StringParam(&#8220;&#8212;-&#8220;)&#8217; code. This gets the string available and that is associated with the keyDirectObject key of the Dictionary (the value of that constant is the &#8220;&#8212;-&#8221; string used here.)</p>
<p>The second thing to highlight is that you have to assign a Text Encoding for the received string and use the <a href="http://documentation.xojo.com/api/text/encoding_text/decodeurlcomponent.html" target="_blank" rel="noopener">DecodeURLComponent</a> function to restore the original text sent along the URI (&#8220;demo:&#8221;, for this example).</p>
<p>Lastly, you can use the Split function to get an Array of strings so you can discard the first component from the received string (the URI itself) and join the remaining elements to get the final string.</p>
<p>You can <a href="https://www.youtube.com/watch?v=N-WLwbfp7Nw" target="_blank" rel="noopener">watch the video</a> (in Spanish only) that&nbsp;talks you though this example.</p>
<p>Visit this post to&nbsp;learn how to <a href="http://blog.xojo.com/2016/08/16/custom-uri-schemes-on-windows/">Customize URI Schemes on Windows</a>.</p>
<p><em>Javier RodrÃ­guez has been&nbsp;the Xojo Spanish&nbsp;Evangelist since 2008, he&#8217;s also a Developer, Consultant and Trainer who&nbsp;has used&nbsp;Xojo since 1998. He is in charge of AprendeXojo.com and the developer behind the GuancheMOS plug-in for Xojo Developers and the Snippery app among others.</em></p>
<p><a href="http://www.aprendexojo.com/2016/05/uri-personalizado-en-apps-xojo/" target="_blank" rel="noopener"><span style="text-decoration: underline"><em>*Read this post in Spanish.</em></span></a></p>
<p><span style="text-decoration: underline"><em><br />
<!--HubSpot Call-to-Action Code --> <span id="hs-cta-wrapper-390ec0e5-4f95-4882-b8d1-4213c52807ce" class="hs-cta-wrapper"> <span id="hs-cta-390ec0e5-4f95-4882-b8d1-4213c52807ce" class="hs-cta-node hs-cta-390ec0e5-4f95-4882-b8d1-4213c52807ce"><br />
<!-- [if lte IE 8]&gt;--></p>
<div id="hs-cta-ie-element"></div>
<p> <a href="http://blog.xojo.com/2016/04/07/advanced-retinahidpi-bitmapforcaching-and-scalefactorchanged/" target="_blank" rel="noopener"><img loading="lazy" decoding="async" id="hs-cta-img-390ec0e5-4f95-4882-b8d1-4213c52807ce" class="hs-cta-img aligncenter" style="border-width: 0px;margin: 0 auto;margin-top: 20px;margin-bottom: 20px" src="https://blog.xojo.com/wp-content/uploads/2016/05/390ec0e5-4f95-4882-b8d1-4213c52807ce.png" alt="Advanced Retina/HiDPI: BitmapForCaching and ScaleFactorChanged" width="443" height="77" align="middle"></a></span></span> <!-- end HubSpot Call-to-Action Code --></em></span></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
