<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to show Messagebox in ArcMap 10.1 through using Python? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-show-messagebox-in-arcmap-10-1-through/m-p/615852#M48048</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Greetings,&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have downloaded "PyScripter-v2.5.3-x64-Setup.ex" and I`m using the Add-in Manager to add a command on a toolbar inside ArcMap 10.1...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I succeeded in adding the toolbar and the command, however I need to show a Messagebox at the On_Click event of the command and I`m not able to do that...This is my code below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy import pythonaddins&amp;nbsp; class ButtonClass1(object): &amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self): &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.enabled = True &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.checked = False &amp;nbsp;&amp;nbsp;&amp;nbsp; def onClick(self): &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("TestMessg") &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("text") &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Please help!&lt;/STRONG&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Mar 2014 09:28:43 GMT</pubDate>
    <dc:creator>dgesridgesri</dc:creator>
    <dc:date>2014-03-18T09:28:43Z</dc:date>
    <item>
      <title>How to show Messagebox in ArcMap 10.1 through using Python?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-show-messagebox-in-arcmap-10-1-through/m-p/615852#M48048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Greetings,&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have downloaded "PyScripter-v2.5.3-x64-Setup.ex" and I`m using the Add-in Manager to add a command on a toolbar inside ArcMap 10.1...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I succeeded in adding the toolbar and the command, however I need to show a Messagebox at the On_Click event of the command and I`m not able to do that...This is my code below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy import pythonaddins&amp;nbsp; class ButtonClass1(object): &amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self): &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.enabled = True &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.checked = False &amp;nbsp;&amp;nbsp;&amp;nbsp; def onClick(self): &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("TestMessg") &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("text") &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Please help!&lt;/STRONG&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 09:28:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-show-messagebox-in-arcmap-10-1-through/m-p/615852#M48048</guid>
      <dc:creator>dgesridgesri</dc:creator>
      <dc:date>2014-03-18T09:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to show Messagebox in ArcMap 10.1 through using Python?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-show-messagebox-in-arcmap-10-1-through/m-p/615853#M48049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;import ctypes&amp;nbsp; # An included library with Python install. ctypes.windll.user32.MessageBoxA(0, "Your text", "Your title", 1)&amp;nbsp; Or define a function (Mbox) like so:&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;import ctypes&amp;nbsp; # An included library with Python install. def Mbox(title, text, style):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctypes.windll.user32.MessageBoxA(0, text, title, style) Mbox('Your title', 'Your text', 1)&amp;nbsp; Note the styles are as follows:&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;##&amp;nbsp; Styles: ##&amp;nbsp; 0 : OK ##&amp;nbsp; 1 : OK | Cancel ##&amp;nbsp; 2 : Abort | Retry | Ignore ##&amp;nbsp; 3 : Yes | No | Cancel ##&amp;nbsp; 4 : Yes | No ##&amp;nbsp; 5 : Retry | No&amp;nbsp; ##&amp;nbsp; 6 : Cancel | Try Again | Continue&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From &lt;/SPAN&gt;&lt;A href="http://stackoverflow.com/questions/2963263/how-can-i-create-a-simple-message-box-in-python"&gt;Stack Overflow&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 12:44:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-show-messagebox-in-arcmap-10-1-through/m-p/615853#M48049</guid>
      <dc:creator>Zeke</dc:creator>
      <dc:date>2014-03-18T12:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to show Messagebox in ArcMap 10.1 through using Python?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-show-messagebox-in-arcmap-10-1-through/m-p/615854#M48050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Arfa,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can use the MessageBox function.&amp;nbsp; See the following link:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/main/10.2/index.html#/The_pythonaddins_module/014p00000021000000/" rel="nofollow" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.2/index.html#/The_pythonaddins_module/014p00000021000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ex:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;pythonaddins.MessageBox('Test Message', 'INFO', 0)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 18:28:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-show-messagebox-in-arcmap-10-1-through/m-p/615854#M48050</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2014-03-18T18:28:24Z</dc:date>
    </item>
  </channel>
</rss>

