import arcpy import pythonaddins class ButtonClass1(object): def __init__(self): self.enabled = True self.checked = False def onClick(self): arcpy.AddMessage("TestMessg") print("text") pass
pythonaddins.MessageBox('Test Message', 'INFO', 0)
import ctypes # An included library with Python install. ctypes.windll.user32.MessageBoxA(0, "Your text", "Your title", 1) Or define a function (Mbox) like so: import ctypes # An included library with Python install. def Mbox(title, text, style): ctypes.windll.user32.MessageBoxA(0, text, title, style) Mbox('Your title', 'Your text', 1) Note the styles are as follows: ## Styles: ## 0 : OK ## 1 : OK | Cancel ## 2 : Abort | Retry | Ignore ## 3 : Yes | No | Cancel ## 4 : Yes | No ## 5 : Retry | No ## 6 : Cancel | Try Again | Continue
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.