  | | | Dynamic PPG Layout Buttons.. | Dynamic PPG Layout Buttons.. 2005-02-03 - By kevin korngut
Back First off, I'd like to hop on this dynamic bandwagon that seems to be going around in that I'm generating a dynamic ppg layout via python for the time being. For now I'm executing it via the Script Editor before I finalize it and packge it up into something that'll self install. But at the moment I'm attempting to addin a simple button without much success....
def BLAH_OnClicked(): Application.Logmessage('hoorah!')
layout.AddButton('BLAH', 'test in progress')
layout.Logic = "BLAH_OnClicked()" layout.Language = "PythonScript"
And I get the following when I run it...
#ERROR : Traceback (most recent call last): # File "<Script Block >", line 1, in ? # BLAH_OnClicked() #NameError: name 'BLAH_OnClicked' is not defined # - [line 1] #ERROR : Property Page Script Logic Error (Python ActiveX Scripting Engine) #ERROR : >[1] BLAH_OnClicked() #ERROR : Traceback (most recent call last): # File "<Script Block >", line 1, in ? # BLAH_OnClicked() #NameError: name 'BLAH_OnClicked' is not defined
Anyone have any ideas?
Thanks,
Kevin Korngut JANIMATION INC. www.janimation.com <http://www.janimation.com/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859 (See http://ISO-8859.ora-code.com)-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> First off, I'd like to hop on this dynamic bandwagon that seems to be going around in that I'm generating a dynamic ppg layout via python for the time being. For now I'm executing it via the Script Editor before I finalize it and packge it up into something that'll self install. But at the moment I'm attempting to addin a simple button without much success....<br> <br> <br> def BLAH_OnClicked():<br> Application.Logmessage('hoorah!')<br> <br> layout.AddButton('BLAH', 'test in progress') <br> <br> layout.Logic = "BLAH_OnClicked()"<br> layout.Language = "PythonScript" <br> <br> And I get the following when I run it...<br> <br> #ERROR : Traceback (most recent call last):<br> # File "<Script Block >", line 1, in ?<br> # BLAH_OnClicked()<br> #NameError: name 'BLAH_OnClicked' is not defined<br> # - [line 1]<br> #ERROR : Property Page Script Logic Error (Python ActiveX Scripting Engine)<br> #ERROR : >[1] BLAH_OnClicked()<br> #ERROR : Traceback (most recent call last):<br> # File "<Script Block >", line 1, in ?<br> # BLAH_OnClicked()<br> #NameError: name 'BLAH_OnClicked' is not defined<br> <br> Anyone have any ideas? <br> <br> Thanks,<br> <div class="moz-signature"> <meta http-equiv="Content-Type" content="text/html; "> <meta content="Word.Document" name="ProgId"> <meta content="MSHTML 6.00.2800.1458" name="GENERATOR"> <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Revision>0</o:Revision> <o:TotalTime>0</o:TotalTime> <o:Pages>1</o:Pages> <o:Words>17</o:Words> <o:Characters>98</o:Characters> <o:Company>janimation</o:Company> <o:Lines>1</o:Lines> <o:Paragraphs>1</o:Paragraphs> <o:CharactersWithSpaces>114</o:CharactersWithSpaces> <o:Version>10.2625</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:DoNotShowRevisions/> <w:DoNotPrintRevisions/> <w:DoNotShowMarkup/> <w:DoNotShadeFormData/> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--> <style>@(protected) Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; mso-header-margin: .5in; mso-footer-margin: .5in; mso-paper-source: 0; } P.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso -style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman" } LI.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso -style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman" } DIV.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso -style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman" } A:link { COLOR: blue; TEXT-DECORATION: underline; text-underline: single } SPAN.MsoHyperlink { COLOR: blue; TEXT-DECORATION: underline; text-underline: single } A:visited { COLOR: purple; TEXT-DECORATION: underline; text-underline: single } SPAN.MsoHyperlinkFollowed { COLOR: purple; TEXT-DECORATION: underline; text-underline: single } P.MsoAutoSig { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso -pagination: widow-orphan; mso-fareast-font-family: "Times New Roman" } LI.MsoAutoSig { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso -pagination: widow-orphan; mso-fareast-font-family: "Times New Roman" } DIV.MsoAutoSig { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso -pagination: widow-orphan; mso-fareast-font-family: "Times New Roman" } DIV.Section1 { page: Section1 } </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";} </style> <![endif]--> <div class="Section1"><span style="font-size: 10pt; color: navy; font-family: Arial;" class="MsoAutoSig" align="left"><font color="navy" face="Arial Narrow" size="2"><span style="font-size: 10pt; color: navy; font-family: 'Arial Narrow';" class="MsoAutoSig"><font color="navy" face="Arial Narrow" size="2"><br> <br> <br> Kevin Korngut<br> JANIMATION INC. <br> <a href="http://www.janimation.com/"> www.janimation.com </a></font></span><br> </font></span></div> </div> </body> </html>
|
|
 |