<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent posts to A small script to insert date and/or time</title><link>https://sourceforge.net/p/npppythonscript/discussion/1188886/thread/22a63d6c05/</link><description>Recent posts to A small script to insert date and/or time</description><atom:link href="https://sourceforge.net/p/npppythonscript/discussion/1188886/thread/22a63d6c05/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 07 May 2019 11:13:43 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/npppythonscript/discussion/1188886/thread/22a63d6c05/feed.rss" rel="self" type="application/rss+xml"/><item><title>A small script to insert date and/or time</title><link>https://sourceforge.net/p/npppythonscript/discussion/1188886/thread/22a63d6c05/?limit=25#113c/6ab1/caf9/b01a/dc54</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;@Sasumner I just disactiaved DSPellCheck and now it works great ;-)  Thanks again for your help&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver</dc:creator><pubDate>Tue, 07 May 2019 11:13:43 -0000</pubDate><guid>https://sourceforge.net7f00e452831c1de1c7250bc1436be774d2748d38</guid></item><item><title>A small script to insert date and/or time</title><link>https://sourceforge.net/p/npppythonscript/discussion/1188886/thread/22a63d6c05/?limit=250#113c/6ab1/caf9/b01a</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I don't know, I don't use DSpellCheck.  Maybe remove it if you don't use it either. Also, maybe it is an older version, try looking for newer version.  &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sasumner</dc:creator><pubDate>Tue, 30 Apr 2019 11:46:21 -0000</pubDate><guid>https://sourceforge.net5c863084c0e99024404d0ee161f5968884474aac</guid></item><item><title>A small script to insert date and/or time</title><link>https://sourceforge.net/p/npppythonscript/discussion/1188886/thread/22a63d6c05/?limit=25#113c/6ab1/caf9</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks Sasumner, you were correct, the following script is now working : &lt;br/&gt;
&lt;em&gt;import datetime&lt;br/&gt;
now = datetime.datetime.now()&lt;br/&gt;
timestr = now.strftime("%m/%d/%Y, %H:%M:%S")&lt;br/&gt;
editor.addText(timestr)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;However I still have a problem when adding this script as a button, I get the following error : &lt;/p&gt;
&lt;p&gt;An exception occirred due to plucin: DSpellCheck.dll Exception reason: Access violation&lt;/p&gt;
&lt;p&gt;The button of the script appears actually beside the button of the DSpellChecker. &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver</dc:creator><pubDate>Mon, 29 Apr 2019 12:24:41 -0000</pubDate><guid>https://sourceforge.netad22b310cf8531b23d8bbac17687881ee606b189</guid></item><item><title>A small script to insert date and/or time</title><link>https://sourceforge.net/p/npppythonscript/discussion/1188886/thread/22a63d6c05/?limit=250#113c/6ab1</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I think your original script would have worked (or been close to working) if you had done:&lt;br/&gt;
now = datetime.datetime.now()&lt;/p&gt;
&lt;p&gt;Perhaps why it didn't appear to do anything is you didn't have the console showing to see the errors.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sasumner</dc:creator><pubDate>Mon, 29 Apr 2019 12:09:45 -0000</pubDate><guid>https://sourceforge.netd3944528b6925df45b47d871d6116fdc39ecae51</guid></item><item><title>A small script to insert date and/or time</title><link>https://sourceforge.net/p/npppythonscript/discussion/1188886/thread/22a63d6c05/?limit=25#113c</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I searched the forum and found a script that does the trick : &lt;/p&gt;
&lt;p&gt;import time&lt;br/&gt;
editor.addText(time.strftime('%d/%m/%Y '))&lt;/p&gt;
&lt;p&gt;had found it here : &lt;br/&gt;
&lt;a href="https://sourceforge.net/p/npppythonscript/discussion/1199074/thread/a50c6c37/"&gt;https://sourceforge.net/p/npppythonscript/discussion/1199074/thread/a50c6c37/&lt;/a&gt;&lt;br/&gt;
thanks to IObasetom&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver</dc:creator><pubDate>Mon, 29 Apr 2019 09:28:06 -0000</pubDate><guid>https://sourceforge.net64d7f0abd312e0edd37aa89d921a266b5f53fed8</guid></item><item><title>A small script to insert date and/or time</title><link>https://sourceforge.net/p/npppythonscript/discussion/1188886/thread/22a63d6c05/?limit=25#7541</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;it seems that datetime.now() does not exist as I get the following error : &lt;br/&gt;
'module' object has no attribute 'now'&lt;/p&gt;
&lt;p&gt;I have also tried with datetime.today(), same error : &lt;br/&gt;
'module' object has no attribute 'today'&lt;/p&gt;
&lt;p&gt;I have also exchanged the first line of the script with &lt;br/&gt;
from datetime import date&lt;/p&gt;
&lt;p&gt;same error. &lt;br/&gt;
any help would be welcome&lt;br/&gt;
Cheers&lt;/p&gt;
&lt;p&gt;Oliver&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver</dc:creator><pubDate>Mon, 29 Apr 2019 09:17:08 -0000</pubDate><guid>https://sourceforge.netb266eacf2408a3307baa5d843e3b5a0e86a238f0</guid></item><item><title>A small script to insert date and/or time</title><link>https://sourceforge.net/p/npppythonscript/discussion/1188886/thread/22a63d6c05/?limit=25#84dc</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I have installed the PythonScript plugin for NP++ to program a script to be able to insert date and/or time. Based on example scripts I have created the following script :&lt;/p&gt;
&lt;p&gt;&lt;em&gt;import datetime&lt;br/&gt;
now = datetime.now()&lt;br/&gt;
timestr = now.strftime("%m/%d/%Y, %H:%M:%S")&lt;br/&gt;
editor.addText(timestr)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;but this does not seem to work (trying to run it by going into the Extensions/Phythonscript/Scripts menu and clicking on the scripts name.&lt;br/&gt;
Even a simple script such as&lt;/p&gt;
&lt;p&gt;Editor.addText("Test")&lt;/p&gt;
&lt;p&gt;does not seem to have any effect.&lt;br/&gt;
Does anybody have any ideas as to what has gone wrong ?  I have no experience in Python programming (but have programmed in other languages)&lt;br/&gt;
Cheers&lt;br/&gt;
Oliver&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver</dc:creator><pubDate>Mon, 29 Apr 2019 08:44:26 -0000</pubDate><guid>https://sourceforge.net4f49efe6b625a1063eb0e2c47e80f33be246937a</guid></item></channel></rss>