<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Language type same as defined type but with different file extension]]></title><description><![CDATA[<p dir="auto">I am using a program that allows you to script serial port communications (the program is Docklight Scripting).  It has been very useful for me as a firmware developer needing to communicate over serial com ports.</p>
<p dir="auto">It has the ability to do scripting.  This is used to script responses to messages my firmware sends off a piece of hardware we are developing or to script command messages to slave nodes and process the response messages.</p>
<p dir="auto">The scripting language is VB scripting but they save the files with the extension .pts instead of .vb or .vbs.</p>
<p dir="auto">I tried setting up Notepad++ to recognize .pts as a .vb script.  I did get it correct that when I browse to a file with .pts extension and open it, that it uses the VB language text color encoding and font settings in the editting window.</p>
<p dir="auto">However if I do a save as of the same file to another file name it changes the extension to .vb instead of leaving it as .pts.  How do I get it to save it as .pts and still realize that is a VB style script?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/18378/language-type-same-as-defined-type-but-with-different-file-extension</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 16:43:38 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/18378.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 16 Oct 2019 16:29:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Language type same as defined type but with different file extension on Wed, 16 Oct 2019 17:39:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jim-woodward" aria-label="Profile: Jim-Woodward">@<bdi>Jim-Woodward</bdi></a> said in <a href="/post/47868">Language type same as defined type but with different file extension</a>:</p>
<blockquote>
<p dir="auto">I tried setting up Notepad++ to recognize .pts as a .vb script.  I did get it correct that when I browse to a file with .pts extension and open it, that it uses the VB language text color encoding and font settings in the editting window.</p>
</blockquote>
<p dir="auto">As you implied, <strong>Settings &gt; Style Configurator &gt; VB/VBS</strong>, setting <strong>User ext.:</strong> to <code>pts</code> will enable Notepad++ to recognize <code>.pts</code> files as VB for syntax highlighting.  (Made it explicit, in case future people searching were looking for the first half of the answer, rather than the second half.)</p>
<blockquote>
<p dir="auto">However if I do a save as of the same file to another file name it changes the extension to .vb instead of leaving it as .pts.  How do I get it to save it as .pts and still realize that is a VB style script?</p>
</blockquote>
<p dir="auto">There are two versions of the save/save-as dialog, which Notepad++ cleverly calls “old style” vs “new style”.  See <a href="https://npp-user-manual.org/docs/preferences/#default-directory" rel="nofollow ugc">documentation for <strong>Settings &gt; Preferences &gt; Default Directory</strong></a>, which says,</p>
<blockquote>
<p dir="auto">☐ Use new style dialog (without file extension feature &amp; Unix style path capacity): Windows allows for two styles of open/save dialogs.</p>
<ul>
<li>
<p dir="auto">“old style” has “Quick Access”, “Desktop”, and others as icon-buttons along the left; it will auto-apply the selected file-type’s extension to the file (so typing a filename of blah when a file type of “Normal text file (.txt)” is selected will save blah.txt); it will also allow using Unix-style backslashes as a path separator, rather than Windows-style forward slashes.</p>
</li>
<li>
<p dir="auto">“new style” does not have the icon-buttons (instead, Windows presents those in the tree, similar to other drives and folders); even when a file-type is selected, the user is required to specify the desired file extension (thus the file-type selector is primarily for filtering what existing files are listed in the directory listing); and it will not understand Unix-style backslashes as path separators.</p>
</li>
</ul>
</blockquote>
<p dir="auto">Because both dialogs are windows-supplied dialogs, there isn’t an easy way to change the list of file-types-and-extensions for the old-style.  I highly recommend using the new-style dialog, which will allow you, the user, to determine the appropriate extension for a given file, rather than taking the first extension for the given “type” in the drop-down box.  This helps both in a case like yours (where the builtin list doesn’t include your custom extension), but also in the more global case where someone wants to <strong>Save As</strong> a <code>C++ Source File</code>, and it defaults to naming it <code>.h</code>, because that happened to be first in the list!</p>
<p dir="auto"><img src="/assets/uploads/files/1571247378070-1579cba0-fc9a-4943-aede-842e2a9ec1c4-image.png" alt="1579cba0-fc9a-4943-aede-842e2a9ec1c4-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Of course, with the new-style dialog, you have to type 2-4 more characters when naming the file (depending on the extension you want), but since the old-style windows dialog gives the wrong extension anyway in many circumstances, it’s better to choose the one that will always give the extension you want.</p>
<p dir="auto">(The other thing to make sure is that Windows Explorer is set up to <em>not</em> hide extensions, otherwise, you may get confused when the extension “disappears” after you’ve saved.)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47869</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47869</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 16 Oct 2019 17:39:33 GMT</pubDate></item></channel></rss>