The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Python
 Add a Python-driven button to Toolbars
 New Topic  Reply to Topic
 Printer Friendly
Author  Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

iniwoni

22 Posts

Posted - 09/08/2025 :  1:02:04 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2025 10.2.0.188
Operating System: Win10

Hi,
I know how to create a button in Toolbars that runs with LabTalk,
but is it possible to create a button that runs with Python instead?

Best regards,
iniwoni

ChaoC

USA
210 Posts

Posted - 09/08/2025 :  2:14:05 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi iniwoni,

Yes, you can set a toolbar button to run the LabTalk command run -pyf that executes a .py file.
See: https://www.originlab.com/doc/python/Running_Python_Code#From_External_.py_File

Best,
Chao
Go to Top of Page

iniwoni

22 Posts

Posted - 09/10/2025 :  02:48:37 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you, Chao.

Best regards,
iniwoni
Go to Top of Page
   Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000