' receiving end
tempfile$ = space$(260)
calldll #kernel32, "GetTempPathA", 260 as long, tempfile$ as ptr, ret as long
tempfile$ = left$(tempfile$, ret) + "LBBpipe.tmp"
open tempfile$ for input as #shared len = 20
field #shared, 20 as state$
timer 100, [test]
wait
[test]
get #shared, 1
print state$
wait
' sending end
tempfile$ = space$(260)
calldll #kernel32, "GetTempPathA", 260 as long, tempfile$ as ptr, ret as long
tempfile$ = left$(tempfile$, ret) + "LBBpipe.tmp"
open tempfile$ for output as #shared len = 20
field #shared, 20 as state$
run "filerecv.exe"
timer 100, [send]
wait
[send]
state$ = date$("dd/mm/yyyy") + " " + time$()
put #shared,1
wait
function lookUpName$(typ$)
files deptPath$, info$(
fc = val(info$(0, 1)) ' folder count
for cf = 1 to fc
foldName$ = info$(cf, 0)
files foldName$, info2$(
fc2 = val(info2$(0,1))
for cf2 = 1 to fc2
fold2Name$ = info2$(cf2,0)
files fold2Name$, typ$, info3$(
fc3 = val(info3$(0,0)) 'file count
for cf3 = 1 to fc3
x$ = info3$(cf3,0)
if (right$(x$,3) = "sal" or right$(x$,3) = "hly") then
y$ = getFldr$(foldName$)
z$ = getFldr$(fold2Name$)
n = n + 1
emps$(n) = tb$(x$,28) + y$ +"\"+ z$ + "\"
end if
next cf3
next cf2
next cf
WindowWidth = 220: WindowHeight = 400
BackgroundColor$ = "cyan"
ListboxColor$ = "cyan"
statictext #elist.st1, "Employees", 60,5,55,20
listbox #elist.lb1, emps$(,[getEmp],2,24,217,375
Stylebits #elist.lb1, 0, _LBS_DISABLENOSCROLL, 0, 0
button #elist.btn1, "X", [noSelect],UL, 195,2,20,20
open "Employee List" for window_popup as #elist
#elist, "trapclose [empsClose]"
#elist, "font consolas 9"
#elist.lb1, "singleclickselect"
sort emps$(,1,n
#elist.lb1, "reload"
wait
[getEmp]
#elist.lb1, "selection? emp$"
fileName$ = deptPath$ +"\"+ mid$(emp$,29) + left$(emp$,28) ' 28 is forced length of emp name
goto [empsClose]
[noSelect]
fileName$ = "none"
[empsClose]
lookUpName$ = fileName$
close #elist
end function