I am trying to run a script module when I press a button. If i press the button I get the following error.
Traceback (innermost last):
File “event:mouseClicked”, line 8, in ?
ImportError: Error loading module scheduleCreate: null
Any ideas on what i have done wrong?
Thanks
JP
################################################
Script Module Named scheduleCreate
################################################
def create(LineNumber):
import system, app
#the rest of the script
lineID = LineNumber
This script will run on sunday at midnight (00:00) and create all the scheduled runs for the (mon-sun) week.
#get timestamp
timestamp = system.db.runScalarQuery(“SELECT DATE_FORMAT(NOW(), ‘%Y-%m-%d %H:%i:%s %w’)”)
date = timestamp[:10]
time = timestamp[-10:-5]
day = int(timestamp[-1:]) #0=sunday, 6 = saturday
#######################################
Mouse Clicked Event on Button
###################################
This script was generated automatically by the property set
script builder. You may modify this script, but if you do,
you will not be able to use the property set builder to update
this script without overwriting your changes.
– ERROR – You must choose a destination property path.
LineNumber = event.source.Line
app.scheduleCreate.create(LineNumber) -Line Number 8 in the script editior
####################################