1
2
3
4
5
6
7
8
9
10
11
12
13from pyfbsdk import *
14import pyfbsdk_additions
15
16
17def BtnCallback(control, event):
18 print(control.Caption, " has been clicked!")
19
20def PopulateLayout(mainLyt):
21 pass
22
23toolname = "Bullet Proof"
24
25def CreateTool():
26 """
27 Tool creation function. Everything about the tool is created here.
28 So if this script is executed multiple times and we only call this function once
29 there won't be multiple instantiation of this tool.
30 """
32 t.StartSizeX = 400
33 t.StartSizeY = 200
34 PopulateLayout(t)
35 return t
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54if toolname in pyfbsdk_additions.FBToolList:
55
56
57 print("show me")
58 ShowToolByName(toolname)
59else:
60
61 print("create me")
62 t = CreateTool()
63
64
65 ShowTool(t)
66
FBCreateUniqueTool(name)
Create a Tool with a unique name.