Posted 29 November 2014 - 12:07 PM
Hello,
I'm trying to make a simple database to save passwords so I can do something with it later.
Everything is working good so far. But If I got more then 10 users, then I cant put it on one page.
So I thought maybe if I use a Scrolling system so if I scroll down I can see the rest of the users
and If I receive the top again the its stops so you cant go further from the top. But I already tried some few
things, but I dont know how to do it.. I got a Table where I stored the {Username, password} and I dont know if you scroll
down how to print the other users in the table. So I need to know how to use the function and if it reached the top again it stop.
Acc_pass = {}
function userScrolls()
while true do
for n, account in pairs(Acc_pass) do
event,arg,x,y = os.pullEvent("mouse_scroll")
term.setCursorPos(x,y)
term.setTextColor(colors.black)
term.scroll(arg)
end
end
end
I'm trying to make a simple database to save passwords so I can do something with it later.
Everything is working good so far. But If I got more then 10 users, then I cant put it on one page.
So I thought maybe if I use a Scrolling system so if I scroll down I can see the rest of the users
and If I receive the top again the its stops so you cant go further from the top. But I already tried some few
things, but I dont know how to do it.. I got a Table where I stored the {Username, password} and I dont know if you scroll
down how to print the other users in the table. So I need to know how to use the function and if it reached the top again it stop.
Acc_pass = {}
function userScrolls()
while true do
for n, account in pairs(Acc_pass) do
event,arg,x,y = os.pullEvent("mouse_scroll")
term.setCursorPos(x,y)
term.setTextColor(colors.black)
term.scroll(arg)
end
end
end