Krazyk Posted April 18, 2011 Share Posted April 18, 2011 Not sure if this is the right spot for this in this forum. Here is what i have going on. I have a GUI i am working on. I want to be able to script this gui as a random riddle generator with a single button when that button is clicked it will load a random riddle into a text field (not editable) and display the answer in another text field (also not editable) i would like to make a 3rd button that will enable me to type in in a seperate window a new riddle, and its answer, so that i have an easy way of updating the database..... Anyone have a clue how i could do this? Thanks in advance. Krazyk - The Doctor is In. Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 18, 2011 Share Posted April 18, 2011 What have you tried? What format is your "riddle" file in? Did you run the example scripts in the help file for FileReadLine(), GuiCreate(), or GuiCtrlCreateEdit()? It is hard to help you without knowing where you got stuck. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Krazyk Posted April 19, 2011 Author Share Posted April 19, 2011 I would like to start with my second button (Submit Riddle) 3 questions for it. 1. After entering text into field, and answer into second field, how would i make the script save it to a file, that it can call to. 2. How would i make it save that file with a unique identifier every single time....example------12.*enter file extension* 3. How would i be able to delete redundant data (Duplicate riddles) or obsolete date, without the script jamming up. 4. how could i do this all and make the script recompile itself into a new .exe when done, EVERY TIME I click submit. After i figure out the second button, here is the first button (Random Riddle) Click random button and in text field (a)Display random riddle, and text field (b)Display the answer. 3 Questions for it. 1. How would i make the button "Randomly chose" a value between say 1-100 and open the corresponding riddle file. 2. If there is no riddle file with that identifier, how would i make it keep picking random numbers till it finaly finds one. 3. Once found, how can i make it Input the "Riddle" into text field (a) only, and the answer into text field ( Finally, How do i get rid of these Scrollbars that are grayed out. Below is an attached copy of my script. Thanks in advance for anyones and everyones help. Krazyk.test.au3 Link to comment Share on other sites More sharing options...
JoHanatCent Posted April 19, 2011 Share Posted April 19, 2011 Hi Don't see any Scrollbars that are grayed out in your script! Will help if you post as much as possible to get help. Also have some important questions: * How long will the question(s) be? * How long will the answer(s) be? * Do you really want each question/answer in a seperate file? * Did you read up on INI files? * How many questions / answers in total? Link to comment Share on other sites More sharing options...
Krazyk Posted April 19, 2011 Author Share Posted April 19, 2011 (edited) HiDon't see any Scrollbars that are grayed out in your script! Will help if you post as much as possible to get help.Also have some important questions:* How long will the question(s) be?* How long will the answer(s) be?* Do you really want each question/answer in a seperate file?* Did you read up on INI files?* How many questions / answers in total? Questions will be no more than 120 characters, possibly 3 lines of text tops.Answers will be no more than 80 characters, 2 lines of text.Do you know of any other solutions to put answers and questions together, without using a file?What do you mean read up on .ini Files?I dont want a size limit. For there are an endless supply of riddles out there.test.au3 Edited April 19, 2011 by Krazyk Link to comment Share on other sites More sharing options...
smartee Posted April 19, 2011 Share Posted April 19, 2011 Hi Krazyk,It seems you have not tried enough or done sufficient research and as such you are asking us very general questions to which there are a host of solutions. However, I would recommend, for riddle storage SQLite or other DBMS. Search the help file for examples of using SQLite with AutoIt. This will streamline adding/deleting/updating of riddles and will also be least resistant in accommodating methods of reducing data redundancy. Good luck.-smartee Link to comment Share on other sites More sharing options...
JoHanatCent Posted April 19, 2011 Share Posted April 19, 2011 Questions will be no more than 120 characters, possibly 3 lines of text tops.Answers will be no more than 80 characters, 2 lines of text.Do you know of any other solutions to put answers and questions together, without using a file?What do you mean read up on .ini Files?I dont want a size limit. For there are an endless supply of riddles out there.A searh on +flash +card will get you a good head start.IniRead / IniWrite / IniDelete etc. is a must for small data bases.However on the long run and with bigger databases I agree with SmarTee SQLite is the way to go. Link to comment Share on other sites More sharing options...
Krazyk Posted April 19, 2011 Author Share Posted April 19, 2011 A searh on +flash +card will get you a good head start.IniRead / IniWrite / IniDelete etc. is a must for small data bases.However on the long run and with bigger databases I agree with SmarTee SQLite is the way to go.Thank you...Both of you.SQLite seems to be my solutions.... If i run into any issues, i will repost here.Thanks Again.You guys rock, and this community rocks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now