3 Jul 2008 09:24
Calling function from bar button
I create a simple bar with two buttons: one button calls user function SomeFunc (without parameters)
defined in the same file, another button just displays a debug message. SomeFunc displays another debug
message and closes the bar.
Code:
//file test.powerpro
local C = cl.Create("Simple", 1)
C.Insert(0)
C.SetLabel(0, "Function")
C.AddLeft(0, ".test <at> SomeFunc")
C.Insert(0)
C.SetLabel(0, "Command")
C.AddLeft(0, "win.debug(?=Command=)")
C.AddProperties("Format=Vertical")
*Bar Show Simple
quit
Function SomeFunc
win.debug("SomeFunc")
*Bar Close Simple
quit
//end of test.powerpro
Excerpt from the help file:
FName() //Call a function within the same script file with no arguments
I tried all the combinations of
(Continue reading)
RSS Feed