4

I have a simple script in Python which I run in Rhino3D. It shows a message box as following :

import ctypes  # An included library with Python install.
ctypes.windll.user32.MessageBoxA(0, "Your text", "Test", 1)

Moreover, it shows only the first letter of each of my text (title and content). How can I solve it ? What is the reason ? Is the problem coming from Rhino3D ?

Python Message Box

Tofuw
  • 908
  • 5
  • 16
  • 35

1 Answers1

1

I had the same problem. The solution for your code is :

import ctypes  # An included library with Python install.
ctypes.windll.user32.MessageBoxA(0, b"Your text", b"Test", 1)

Strings should be byte, so use b''. And I think this problem only appears in Python3.

hamed
  • 61
  • 2