fbpx

CS-Lab Support Forum for CNC Community

Help to run this brand-new forum and stay with us.
Ask your questions, we are here to help! 

 

Please or Register to create posts and topics.

GUI in Python editieren

Hi

Ich wollte probieren in einem Python-Script eine Checkbox abzufragen, allerdings kommt immer folgender Fehler:

 

Files\simCNC\profiles\HaaseCNC\scripts\___INIT.py", line 26, in <module>

exec(open(fileName, encoding='utf-8').read())

File "<string>", line 14, in <module>

NameError: name 'gui' is not defined

Das Script ist ganz simpel

 

if (gui.cbIgnoreSoftLimit.getCheckboxState( ) == true):

print("test true")

if (gui.cbIgnoreSoftLimit.getCheckboxState( ) == false):

print("test false")

 

Weiß jemand woran das liegen könnte?

 

Besten Dank schon mal

Lg Reazor

 

 

I cannot reproduce the same error, but from what I can see, "True" and "False" should be capitalized. If this minor change does not solve the problem, please send me the configuration profile for review.

 

Regards

PARTNERS:

 

USA

Germany

Slovenia / Bosnia

Spain

South Africa

UNI-CAM

The Netherlands

Portugal

Greece

  Distrib milionis logo

Hungary

Distrib logot

Bulgaria

Master

Kenya

Proteq Automation

Egypt

Germanelectronix

China

Jun Ma

Serbia

ALCO

Italy

LVL tech r

Denmark

Varntoft Dania

Finland

×

Hello!

Click one of our contacts below to chat on WhatsApp

× How can I help you?