Hi Cox,
This worked for me, without displaying a window:
gadget1.py
Code:
#
# Lianja custom python gadget "gadget1"
#
import Lianja
import subprocess
#---------------------------------------------------------------------------
# Define the class we need to handle the button click event
class MyButton(Lianja.Commandbutton):
def click(self):
subprocess.call("wscript.exe C:\Temp\writetofile.vbs")
#---------------------------------------------------------------------------
# Create the gadget and add in the controls
gadget1_gadget = Lianja.createObject("gadget1_gadget", "gadget")
gadget1_gadget.addobject("mybutton", "MyButton")
mybutton.caption = "Click me!"
#---------------------------------------------------------------------------
# Return the gadget to Lianja
returnvalue = gadget1_gadget
Regards,
Yvonne
Bookmarks