I'm using ruby and shoes to create a test for some students. I want to know how to have them click a button and their answers in the text boxes are sent to the desktop in a text file format. Thanks.
Asked
Active
Viewed 56 times
0
-
Please add more to the description of the problem. What have you tried so far? – fmendez Mar 04 '13 at 01:48
-
This question appears to be off-topic because it is a request to write code, with no evidence of any effort or research having been done, and no description of any specific problem that the asker is having. – Wayne Conrad Mar 09 '14 at 06:58
1 Answers
0
File.open('path/to/desktop/answers.txt', 'w') do |file|
file.write('answers')
end

Danil Speransky
- 29,891
- 5
- 68
- 79
-
1This is a pretty generic answer. While it answers the vague gist of the question asked, I'd be amazed if it actually solves the guy's problem. – Dave S. Mar 04 '13 at 01:50
-
I hear you on all that, I just think the question is so vaguely worded that you're overly optimistic about all that stuff you inferred. :) It's a lot to read between the lines, no? – Dave S. Mar 04 '13 at 01:54
-
-
@SperanskyDanil in the file.write('answers') i tried to call my variable there but it just writes the name of the variable? – VladimirSD Mar 04 '13 at 02:10
-
-
@SperanskyDanil Now i tried instead of |file| i put |f1| and instead of file.write i put f1.puts "#{answer1}" and it outputs to the text file - (Shoes::EditLine) – VladimirSD Mar 04 '13 at 02:33
-
@SperanskyDanil this is what im trying to do http://pastie.org/6376402 – VladimirSD Mar 04 '13 at 02:43
-
@SperanskyDanil I'm rather new to this language mate, i could use some help. I believe edit_line creates a line where you can type in. – VladimirSD Mar 04 '13 at 03:00