Jump to content

Albertxu

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by Albertxu

  1. I want to save some tests (about one thousand tests totally) from a quiz website to a text file. The test page is a simple one, it contains: 1) The questions; they are inside the <p class="qw">...</p> 2) 5 choices; they are radio buttons id ="a1", "b1" ... When I click a radio for a choice, if correct, the background of it will turn green, if wrong, it will turn red, and the correct answer will turn green. What I need to get is the correct answer. So when I click an answer, no matter right or wrong, the test will automatically go to the next question in about 3 or 4 seconds (I don't know exactly how many seconds). So what I want to save is: Questions choice 1; choice 2; choice 3; choice 4; choice 5; correct answer Then next question... I have limited knowledge of AutoIt, I have check the IE UDFs, but I don't know where to start. Especially I don't know how to do since the test will to go next item automatically. Please give me some hints. Thank you very much.
  2. Hi, Azjio, I got some errors when running the script: >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "D:\autoit source code\Create_list_files\sources\Create_list_files.au3" D:\autoit source code\Create_list_files\sources\Create_list_files.au3 (624) : ==> Unterminated string.: $aCnt[$i][1] = StringReplace($Tmp[1], '|', '?) can you plz help me to check why there is a ? in this line?
  3. Hi, my hard disk met with some problems and all partitions missing and so as files. I do recover large part of my docs after using Easy Recovery, but the recovered files are all in a mess --they are renamed with such names as FIL0, FIL99 etc. My question is: how can I read the titles from within the PDF document and then rename the files with title using AutoIt. I know that some of them have blank titles but at leat 60% of them have. For those who don't understand the title of the PDFs, you can just find it out as you click in Adobe Acrobat menus -File-> Property, there you can see the title along with the author. Can someone help me?
  4. So I used _FileReadToArray to load those words as Array. But How can I write those sorted words out in a result.txt file? I used FileWriteLine but did not succeed. #include <Array.au3> #include <file.au3> Dim $aRecords If Not _FileReadToArray("random.txt",$aRecords) Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf _arraysort($aRecords) ;_ArrayDisplay($aRecords) FileWriteLine("result.txt",$aRecords)
  5. As a beginner, I just wonder how "load" a word list into array? I know tutorial is a good thing, but I couldn't see anything helpful there. Thanks.
  6. Hi, I have a word list which is not in alphabetic order and I need to sort them out in order. How can I do it with AutoIt? And also, how can I delete those duplicated entries which begin with capital letters? Thank you again for your kind help.
  7. Hi UEZ, Your code worked just fine. Thank you very much. I combine your code with that of smartee's, and it worked greatly. Thank you again.
  8. I had just solved a problem, but here comes another. I have a word list with explanation and phonetic. The pattern is like: +wary #adj."here is Chinese translation" &ˈwɛəri $3 +welter #n."here is Chinese translation" #vi."here is Chinese translation" &ˈweltə $3 +whimsy #n."here is Chinese translation" &ˈhwɪmzi: $3 You can see from the pattern that the first line is the word entry, the second or third line is the Chinese translation, the last to second line is the phonetic sound, which needs to be moved to the position close to the word entry. And the last line is all the same, which is $3. Now here comes the task, I want to change the pattern to: +wary &ˈwɛəri #adj."here is Chinese explanation" +welter &ˈweltə #n."here is Chinese explanation" #vi."here is Chinese explanation" +whimsy &ˈhwɪmzi: #n."here is Chinese explanation" I know this can be done with VBA script, but since I am learning AutoIt, I am sure we have a way to make it. Can some one here give me some ideas?
  9. Hi MHZ, just reported to you that your code worked like a charm. I can't love you more since I had been working on this script for one whole day and couldn't figure it out.
  10. Hi all. I am a beginner of AutoIt. I am really grateful for those people who made this wonderful script that we can make ourselves. I want to develop a script that will look up a word from a word list in a pc dictionary by using controlsend function: ControlSend($DicTitle, "", "Edit1", $Entry & "{Enter}", 0) But unfortunately, this script is buggy for my dictionary program. For example, when I look up word "wicked", the dictinary shows "ckedwi", and the meaning actually returns that of "wi". Perhaps that's because the dictionary app react slower than AutoIt and may I slow down the keystroke? And if so, how I can do that? Have a nice day to all!
×
×
  • Create New...