Announcement

Collapse
No announcement yet.

Retrieve Data from Dialog

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

  • Retrieve Data from Dialog

    Hey,

    As name of topic say... How can i have informations of Inputs on Dialog after click button "Close" and add other button.

    Try to explain better:
    I have a button that when I click have a pre-sentence, and i want add to that pre-setence more informations from inputs of Dialog.

    It's possible? I try to see on Help, but only see "Code Of Return"

    Thanks for advance,


  • #2
    Hi you add concated text to your sentence after dialogue closes from the button that opened the dialog
    see small / quick example More Text.apz
    Cheers

    Comment


    • #3
      user_name = "";
      -- Loop until a valid user name is entered or the user cancels.
      while (user_name == "") and (user_name ~= "CANCEL") do
      --Prompt the user for their user name.
      user_name = Dialog.Input("User Information", "Please enter your user name:", "", MB_ICONQUESTION);

      -- If the user does not enter any text, display an error message. The loop will continue from the beginning.
      if user_name == "" then
      result = Dialog.Message("Error", "Your information could not be processed as entered. Please try again.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);

      -- If the user entered a valid user name and didn't cancel, store the value in the Registry.
      elseif name ~= "CANCEL" then
      Application.SaveValue("Your_User_Name", "Your_Key", user_name);

      -- Check to see if there was an error saving.
      error = Application.GetLastError();
      end
      end

      -- If the user didn't cancel and there was no error saving,
      -- Load the user name from the registry and display a welcome dialog.
      if (user_name ~= "CANCEL") and (error == 0) then
      loaded_username = Application.LoadValue("Your_User_Name", "Your_Key");

      -- If the value loaded successfully.
      if (Application.GetLastError() == 0) then
      result = Dialog.Message("Hello", "Welcome "..loaded_username.."!", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
      end
      end

      Comment


      • #4
        Thanks for rapidly answers.

        I "dig" more on old forum questions and saw that Variables can across Pages, so i try that and for now i have what i pretend.


        colc Thanks, i don't have a LuaCom.lmd Plugin, so i can't test.

        ItzMagdy Thanks, seems interesting..

        Thanks both once again

        Comment


        • #5
          Originally posted by sermak View Post
          Thanks for rapidly answers.

          I "dig" more on old forum questions and saw that Variables can across Pages, so i try that and for now i have what i pretend.


          colc Thanks, i don't have a LuaCom.lmd Plugin, so i can't test.

          ItzMagdy Thanks, seems interesting..

          Thanks both once again
          np (no problem) dude, keep it up you i think you gonna create interesting stuff!

          Comment


          • #6
            Hi My mistake used open project and forget it had luacom in there, here it is again if you wish to view
            More Text.apz
            Cheersw

            Comment

            Working...
            X