home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog Special Freeware 31
/
FreelogHS31.iso
/
ArgentCompta
/
Bankperfect
/
bp.exe
/
Scripts
/
Notes
/
notes_auto.py
< prev
next >
Wrap
Text File
|
2005-10-03
|
899b
|
30 lines
import BP, cPickle
f = CreateComponent("TForm", None)
f.SetProps(Width=620, Height=400, Position="poMainFormCenter", Caption="Notes")
f.Font.Name = "Tahoma"
f.Constraints.MinWidth=620
f.Constraints.MinHeight=400
ok = CreateComponent("TButton", f)
ok.SetProps(Parent=f, Caption="OK", Left=500, Top=350, Width=90, Height=25, Anchors=["akRight", "akBottom"], ModalResult=1, Default=1, Cancel=1)
Memo = CreateComponent("TMemo", f)
Memo.SetProps(Parent=f, Left=30, Top=30, Width=560, Height=310, ReadOnly=1, Anchors=["akLeft", "akTop", "akRight", "akBottom"])
path = "%sScripts\\Notes\\notes.dat" %BP.BankPerfectExePath()
try:
fl = open(path, "r")
n = cPickle.load(fl)
fl.close()
except:
n = {}
t = n.keys()
t.sort()
l = []
for k in t:
c, t = n[k]
if c: l.append("Note ½ %s ╗ :\n%s" %(k, t))
if len(l) > 0:
Memo.Lines.Text = "\n\n\n".join(l)
f.ShowModal()