| BWPanda 2007-10-22, 6:19 am |
| Hi all,
In the 'Scripting for Script Authors' document, it says to use
StartForeignWindow to display windows/boxes, so I did. However, I get an error
in the script output window when the script's done:
Traceback (most recent call last):
File "E:\Panda\Documents\My PSP Files\Scripts-Restricted\0-Grid.PspScript",
line 48, in Do
App.Do(Environment, 'StartForeignWindow', {
AttributeError: 'NoneType' object has no attribute 'winfo_id'
The code I'm using is:
# Get line width
def GetLineWidth():
App.Do(Environment, 'GetNumber', {
'DefaultValue': 10,
'MinValue': 1,
'MaxValue': 100,
'DialogTitle': 'Line Width',
'Prompt': 'Please enter a number for the width of the line:',
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Interactive
}
})
# Display window
Wnd = GetLineWidth()
App.Do(Environment, 'StartForeignWindow', {
'WindowHandle': int(Wnd.winfo_id())
})
Any ideas how to fix this?
--
Kind regards,
Peter Anderson.
(Fuji FinePix S9500)
http://www.panda.id.au
|