Post #3171:
sl
📋 Metadata
- Author: roaoao
- Date: 2020-04-09 09:48:57
- Type:
answer - Quality Score: 8/10
- Reply to: post_03166
- Replies (1): post_03173
🏷️ Tags
popup-dialog macro custom-scripting intermediate solved
⚙️ Related PME Features
- Popup Dialog Editor
- Macro Editor
- Property Editor
- Python Scripting
💬 Content
sleeplessmind:
I have two buttons in a pop up panel and created property item named MyBool. when editing the first button, I chose MyBool under Menu tab. I have also created a separate MyMacro, how do set the second button command line to run MyMacro if MyBool is true?
Use props("MyBool") to check bool value, open_menu("MyMacro") to call macro (Custom tab):
row = L.row(); row.enabled = props("MyBool"); operator(row, "pme.exec", text=text, icon=icon, icon_value=icon_value, cmd="open_menu('MyMacro')")
❤️ 2 likes