Code: Select all
from PSPApp import *
import string
import PSPUtils
#tResult = '1' ------ just for the purpose of testing
def ScriptProperties():
return {
'Author': u'',
'Copyright': u'',
'Description': u'',
'Host': u'PaintShop Pro',
'Host Version': u'19.00'
}
def Do(Environment):
Result = App.Do( Environment, 'GetNumber', {
'DefaultValue': 13, # values for test purposes only
'MinValue': 10,
'MaxValue': 16,
'DialogTitle': 'Resize Options',
'Prompt': 'Enter a width value to resize to',
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Interactive,
}
})
#print tResult ---- If this line is active, it outputs to the window on compile before the Getnumber box opens
print Result['EnteredNumber'] # script crashes if not commented out
NameError: name 'Result' is not defined
------- Command Execution Failed -----------
Command Name: RunScript
Error Text: The script could not be loaded.
Traceback (most recent call last):
File "<string>", line 29, in <module>
NameError: name 'Result' is not defined
------- Command Execution Failed -----------
Command Name: RunScript
Error Text: The script could not be loaded.
Any help is greatly appreciated. I did see the sticky note for this forum on resources and will be checking into those also.
