This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > PainShop Pro Scripting > October 2007 > StartForeignWindow





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author StartForeignWindow
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


Sponsored Links


Copyright 2003 - 2009 forum4designers.com  Software forum  Computer Hardware reviews