Announcement

Collapse
No announcement yet.

How to add all items in Combobox/ListBox to a table

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ezekiel Bucknor
    replied
    Thanks buddy

    Leave a comment:


  • telco
    replied
    before i have also this project in our school to get student name and mobile number, course and fb account, and i used text file to store my data and retrieved it..
    here it is..

    on Save button..

    course = Input.GetText("course");
    name = Input.GetText("name");
    number = Input.GetText("number");
    fb = Input.GetText("fb");

    if course == "" or name == "" or number == "" then

    result = Dialog.Message("Notice", "PLEASE COMPELETE STUDENT DATA", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

    else

    result = Dialog.Message("Please Confirm", "Name: "..name.."\r\nNumber: "..number.."\r\nCourse: "..course.."\r\nFB/email: "..fb, MB_YESNO, MB_ICONINFORMATION, MB_DEFBUTTON1);

    if result == IDYES then


    course = Input.GetText("course");
    name = Input.GetText("name");
    number = Input.GetText("number");
    fb = Input.GetText("fb");

    data = Crypto.BlowfishEncryptString(number.." - "..name..""..course.." "..fb, "F3wYGyYsBwU=U84RWp3dcnSAwEFaOKsBpg==", 0);
    ---name = Crypto.BlowfishEncryptString(name, "F3wYGyYsBwU=U84RWp3dcnSAwEFaOKsBpg==", 0);
    ---number = Crypto.BlowfishEncryptString(number, "F3wYGyYsBwU=U84RWp3dcnSAwEFaOKsBpg==", 0);


    TextFile.WriteFromString("C:\\Student Info.txt", data.."\r\n", true);

    Input.SetText("course", "");
    Input.SetText("name", "");
    Input.SetText("number", "");
    Input.SetText("fb", "");

    RadioButton.SetChecked("ACT", false);
    RadioButton.SetChecked("BSIT", false);
    RadioButton.SetChecked("HRM", false);

    Input.SetEnabled("name", false);
    Input.SetEnabled("number", false);
    Input.SetEnabled("fb", false);

    xButton.SetEnabled("reset", false);


    else

    end

    end



    on retreiving data.

    ---opens browse and select box
    sBackup = Dialog.FolderBrowse("Please select a folder:", _DesktopFolder);
    -- If CANCEL was not chosen, then let's get the folder path
    if (sBackup ~= "CANCEL") then

    tFileContents = TextFile.ReadToTable("C:\\Student Info.txt");


    -- Initialize sInputContents to ""
    sParagraphContents = "";
    -- Concat table and add line numbers
    for LineNumber, LineContents in pairs (tFileContents) do
    if LineContents ~= "\r\n" then

    LineContents = Crypto.BlowfishDecryptString(LineContents, "F3wYGyYsBwU=U84RWp3dcnSAwEFaOKsBpg==");

    sParagraphContents = sParagraphContents.."" .. LineContents .. "\r\n";
    else
    sParagraphContents = sParagraphContents .."" .. "\r\n";
    end
    end

    TextFile.WriteFromString(sBackup.."\\Student Info.txt", sParagraphContents, false);


    Dialog.Message("Import Data", "Import of data completed succesfully!", MB_OK, MB_ICONEXCLAMATION);
    end





    You can play along with that.. i admit all the script is not mine some are all in here also got the ideas....

    Leave a comment:


  • Ezekiel Bucknor
    replied
    I will share apz soon

    Leave a comment:


  • colc
    replied
    Click image for larger version

Name:	FortuneTeller.png
Views:	243
Size:	57.5 KB
ID:	305968
    It's a bit hard as to what data you are entering as you are not giving any code or example apz of what you are trying to achieve.
    As you have been told before there are many methods - ini file , txt file or sqlite database

    Leave a comment:


  • How to add all items in Combobox/ListBox to a table

    Hello fellow group members, I am stuck in my project trying to save all the data entered. I am creating a voting app for my school in which when I enter students index number I want it to save so that in case of sudden shutdown of laptop we can boot it up and retrieve the data to continue the process.
    I have tried every thing u helped me out here but it seems like am not good at scripting.
    I would be glad if you help me with any method to save my data, Textfile, Application.SaveValue, or registry.
Working...
X