0mh3r Posted December 8, 2011 Share Posted December 8, 2011 [code]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 [/code] user_name = Dialog.Input("User Information", "Please enter your user name:", "", MB_ICONQUESTION); Kodu Yerine user_name = Input.GetText("Input1"); Kodunu Kullanmak İsiyorum Input doluyken Çalışıyor ama boş iken donup kalıyor lütfen bi yardımm edin. Quote Link to comment Share on other sites More sharing options...
MostWanted Posted December 8, 2011 Share Posted December 8, 2011 [codebox]user_name = ""; -- Loop until a valid user name is entered or the user cancels. while (user_name == "") do --Prompt the user for their user name. -- user_name = Dialog.Input("User Information", "Please enter your user name:", "", MB_ICONQUESTION); user_name = Input.GetText("Input1"); -- 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); break -- If the user entered a valid user name and didn't cancel, store the value in the Registry. else 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[/codebox] Dediğini tam anlamamakla beraber sanırım şunu demek istedin.Bu kodları dener misin? Quote Link to comment Share on other sites More sharing options...
0mh3r Posted December 9, 2011 Author Share Posted December 9, 2011 Tamda Bunu Kastetmiştim çok saol Quote Link to comment Share on other sites More sharing options...
0mh3r Posted December 14, 2011 Author Share Posted December 14, 2011 Arkadaşlar Bu kodla Bi Örnek Yaptım İşinize yarayabileceni düşündüm ve paylaşmak istedim [code]http://www.mediafire.com/?cypk7u0mi9jccu1[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.