spelling script

Hi Guys,
I'm trying to write a small spelling script that will do the following:
Read a word from a text file:
show it to the user
then needs to type it without any spelling mistake
if OK, he gets the next word in the text file if not than he needs to type 
the word again until he gets it right.

Can any one help me with this ?

Cheers,
Simon
0
Utf
3/18/2010 4:22:06 AM
windows.powershell 690 articles. 0 followers. Follow

5 Replies
1229 Views

Similar Articles

[PageSpeed] 6

"Type each word as it appears then hit enter. Type quit to exit."
foreach ($word in (get-content words.txt))
{
$correct = $false
do
{
$answer = Read-Host $word
if ($answer -ceq $word) {$correct = $true}
if ($answer -eq 'quit') {exit}
}
while (-not $correct)
}

-Paul

"simon22" wrote:

> Hi Guys,
> I'm trying to write a small spelling script that will do the following:
> Read a word from a text file:
> show it to the user
> then needs to type it without any spelling mistake
> if OK, he gets the next word in the text file if not than he needs to type 
> the word again until he gets it right.
> 
> Can any one help me with this ?
> 
> Cheers,
> Simon
0
Utf
3/18/2010 3:51:01 PM
I could use that to practice typing!

I give a PowerShell demo Saturday at the North Texas PC Users Group
and I think I'll use variations on that in my presentation.

  - Larry


PaulChavez wrote:
> "Type each word as it appears then hit enter. Type quit to exit."
> foreach ($word in (get-content words.txt))
> {
> $correct = $false
> do
> {
> $answer = Read-Host $word
> if ($answer -ceq $word) {$correct = $true}
> if ($answer -eq 'quit') {exit}
> }
> while (-not $correct)
> }
> 
> 
> "simon22" wrote:
>> Hi Guys,
>> I'm trying to write a small spelling script that will do the following:
>> Read a word from a text file:
>> show it to the user
>> then needs to type it without any spelling mistake
>> if OK, he gets the next word in the text file if not than he needs to type 
>> the word again until he gets it right.
>> Can any one help me with this ?
>>
0
Larry__Weiss
3/18/2010 4:59:14 PM
Make sure to run that in a script or the exit keyword will close your 
console. I almost lost a few days worth of console history when I tested 
this, luckily I was in the ISE and had an unsaved file that gave me a chance 
to cancel. ;)

"Larry__Weiss" wrote:

> I could use that to practice typing!
> 
> I give a PowerShell demo Saturday at the North Texas PC Users Group
> and I think I'll use variations on that in my presentation.
> 
>   - Larry
> 
> 
> PaulChavez wrote:
> > "Type each word as it appears then hit enter. Type quit to exit."
> > foreach ($word in (get-content words.txt))
> > {
> > $correct = $false
> > do
> > {
> > $answer = Read-Host $word
> > if ($answer -ceq $word) {$correct = $true}
> > if ($answer -eq 'quit') {exit}
> > }
> > while (-not $correct)
> > }
> > 
> > 
> > "simon22" wrote:
> >> Hi Guys,
> >> I'm trying to write a small spelling script that will do the following:
> >> Read a word from a text file:
> >> show it to the user
> >> then needs to type it without any spelling mistake
> >> if OK, he gets the next word in the text file if not than he needs to type 
> >> the word again until he gets it right.
> >> Can any one help me with this ?
> >>
> .
> 
0
Utf
3/18/2010 8:28:16 PM
Thanks.

That's a "PowerShell gotcha" I could demonstrate at the meeting.

  - Larry


PaulChavez wrote:
> Make sure to run that in a script or the exit keyword will close your 
> console. I almost lost a few days worth of console history when I tested 
> this, luckily I was in the ISE and had an unsaved file that gave me a chance 
> to cancel. ;)
> 
0
Larry__Weiss
3/18/2010 9:57:35 PM
Thanks for that :)


"PaulChavez" wrote:

> "Type each word as it appears then hit enter. Type quit to exit."
> foreach ($word in (get-content words.txt))
> {
> $correct = $false
> do
> {
> $answer = Read-Host $word
> if ($answer -ceq $word) {$correct = $true}
> if ($answer -eq 'quit') {exit}
> }
> while (-not $correct)
> }
> 
> -Paul
> 
> "simon22" wrote:
> 
> > Hi Guys,
> > I'm trying to write a small spelling script that will do the following:
> > Read a word from a text file:
> > show it to the user
> > then needs to type it without any spelling mistake
> > if OK, he gets the next word in the text file if not than he needs to type 
> > the word again until he gets it right.
> > 
> > Can any one help me with this ?
> > 
> > Cheers,
> > Simon
0
Utf
3/19/2010 12:22:01 AM
Reply:

Similar Artilces:

Spell Check preferences?
Hi all, I have a user that is having problems with spell checking in Office 2004. When I set office up I did a full install with proofing tools, etc. The user is running OS 10.4.1. Here is the problem: spell checking never works unless he manually sets it up (he has to got through the tools->language & uncheck "do not check spelling or grammar..") routine for every single document he creates. My question is: Is there a way to set this to default for all documents? Thanks, burn01 jacobbehrnes@gmail.com I'm guessing you're talking about Word here. In Word, go to F...

Spell check anomaly
When I REPLY to a message, WLM always checks the spelling on the original message even though I have selected the option to ignore the original text in a reply. What gives? Is that a bug in WLM? Tom If you save a message to Drafts or an EML file or open while in the Outbox, that will happen since it lost track of what was original and what was new. Or is this happening when you just start a new reply? If so are you interspersing your reply with the original message? Or using stationery? -- Mike - http://TechHelp.Santovec.us "Tom Brown" <Bu...

spelling script
Hi Guys, I'm trying to write a small spelling script that will do the following: Read a word from a text file: show it to the user then needs to type it without any spelling mistake if OK, he gets the next word in the text file if not than he needs to type the word again until he gets it right. Can any one help me with this ? Cheers, Simon "Type each word as it appears then hit enter. Type quit to exit." foreach ($word in (get-content words.txt)) { $correct = $false do { $answer = Read-Host $word if ($answer -ceq $word) {$correct = $true} if ($answer -eq &...

exchange scripts #2
Would like answers to the following: 1) Is there a tool for recovering a .pst file even if it has been passworded 2) Is there a script that i can use to configure a user's outlook immediately the user's log on, instead of going to each client system to configure it 3) How to customize the display name of users using outlook in Active directory so that it would be a combination of first letter of first name plus the surname 4) While creating users using Active directory i want a situation that by the time i press the tab key to go to the full name and user log on name attributes i...

spell check #9
The spell check is not working. I click on it an nothing happens. No errors messages. I don't know how to set it up , if that is what needs to be done. Teri wrote: > The spell check is not working. I click on it an nothing > happens. No errors messages. I don't know how to set it > up , if that is what needs to be done. And what version of Outlook are you running? ...

spell checker is not finding spelling errors, any suggestions?
Spell checker finds no spelling errors and tells me that it has completed its review. Yet, I have deliberately mis-spelled words in order to test the spell checker, and it is not finding these mis-spelled words. I am thinking that spell checker is not being pointed to the right dictionary, or any dictionary, but I can't seem to troubleshoot this on my own. Any suggestions? Spellbound wrote: > Spell checker finds no spelling errors and tells me that it has > completed its review. Yet, I have deliberately mis-spelled words in > order to test the spell checker, and it is not...

Logon script
Making a logon script for two locations and want the script to understand what location is logged on to. I can determen this with %logonserver% but is there any properties in vb script that gives me the same function? Or any other suggestions. -T "Terry" <terje@itl.no> wrote in message news:%23mVurU8aKHA.4688@TK2MSFTNGP06.phx.gbl... > Making a logon script for two locations and want the script to understand > what location is logged on to. > I can determen this with %logonserver% but is there any properties in vb > script that gives me th...

predictive spelling
Does anyone know of a predictive spelling add- in for Excel 2000 or later? Other than the built in one, that is. I'd like something which refers to a separate worksheet that I can specify. TIA Greg Little ...

Spelling in Outlook
I run XP Pro SP1, IE 6.0 and its Outlook Express. I also run MS Office 97 Patch 2b with English and Brazilian dictionaries. Winword works fine with both dics. After write a message in OE and when trying to get it spelled, get foll box : "An error occured while the spelling was been checked". Does this happen with someone before ? Can anyone help me in find the solution for this problem ? Appreciate assistance ...

Please Help! Spanish has hijacked my Word 2007 spell checker!
I have saved (repeatedly in existing and new blank documents) all my settings to English, US. However, my spell checker is marking everything in red. When I look at it, the spell check suggests spanish spelling of the words. The spell checker says Spanish, US. I go back, all setting say English. Default language is set to English. I don't know what else to try. Make sure to turn off the "Detect language automatically" option in Review tab | Set Language. Note that once the language has changed in a document, you may have to select the whole document and manu...

Scripting Error
This is a multi-part message in MIME format. ------=_NextPart_000_02F8_01CB2F41.80988510 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Recently I have started to receive scripting errors on certain emails or = newsgroup posts It is an IE error that generally has something like: ---------------------------------------------- Line: 1 Char: 2 Error: '_gat' is undefined Code: 0 URL: mhtml: mhtml:{EF0CF749-0D42-4C4B-B021-20786141361F}mid://00000756/' Do you want to continue running scripts on this page? ---...

Submit Button Script
I am having issues with the submit button on my Publisher 2003 form. When I ftp my pub files, after setting the form properties to send the results to my email addy, I get an error 404 page cannot be found. Here is the script it is displaying when I open the edit page function with FP 2003: <form action=--WEBBOT-SELF-- method=POST> <!--webbot bot="SaveResults" s-email-address="info@bohemianhouseproductions.net" s-email-format="TEXT/PRE" b-email-label-fields="TRUE" s-email-Subject="Web Site Form Response" s-builtin-fields...

Embedded IE7 browser object
We have an MFC app that embeds the WebBrowser ActiveX control. Starting in IE7, we've been getting a scripting error due to an exception closing a window that the user has already closed for pages that we display in this WebBrowser control. This doesn't happen when the same page is viewed in Internet Explorer 7, nor does it happen in either situation on computers with IE5-6. The following is a JavaScript example that recreates this situation: var winName = "myWin"; var theURL = "http://www.microsoft.com"; var objWin = window.open(theURL, winName); // U...

capture sql logins script
Hello everybody - For disaster recovery purposes we have a secondary gp server on standby. How can I set it up so that the 'caputure sql logins' script will run on my primary gp server and then save the results to the secondary backup gp server? What tool should I use and is there an automatic script I can use? You may approach this in few different ways - 1) Use PSTools to recreate users on the secondary server. This is a free tool and is part of the Professional Services Toools Library. 2) Export out users in a file and run this file using task scheduler and SQL command utility ...

Multiple e-mails on 2 computers(corrected spelling)
My wife's windows ME/Outlook 2000 pc suddenly began getting 2 of each e-mail several months ago. She has Norton AV on the computer but it had been working fine with the computer. She didn't renew the subscription for updates this go around since she was getting a new Dell. I can't say the multiple e-mails started when the Norton subscription expired because I don't know the exact dates. But I guess it could be a possible cause? When I connected her new Dell XP home Outlook 2002 computer through the DlinkDI604 router we use in the house so they could both download the same ...

Script to populate table
Hi all in SQL Server 2008 is there a way to create a script that populate me a table with the data contained in an equal table present in another database?. Thanks a lot Luigi On Wed, 10 Feb 2010 06:31:02 -0800, Luigi <Luigi@discussions.microsoft.com> wrote: > >Hi all >in SQL Server 2008 is there a way to create a script that populate me a >table with the data contained in an equal table present in another database?. > >Thanks a lot > >Luigi insert mytable select * from otherdatabase.dbo.othertable As posted, the poor-man's version...

No spelling
In Outlook express V. 6 - I have no spelling tools. No Tolls-Options-Spelling Tab and can not do manual spelling for out-going mails ...

Glyn Simpson-add to b/u script
From: http://money.mvps.org/backup.aspx This is AWESOME! It's great to schedule backups temporally that copies the file with the date/time stamp within the filename. An enhancement that might help with unbounded "copies" of the backups files would be to check the directory for the number of files... if > x, then delete "oldest" file. It makes the script a little more complex, but this should be very doable for programmers. Unfortunately, I'm a network engineer--no programming abilities here! Thanks for the suggestion - I'll have to take a look at i...

Spell Checking
When I click on spell checking prior to sending email. I do not get a message that it is ok. After about a minute, I click on send message, and get the message that spell checker has not completed spell checking, do I want to send anyway? I always check send. Just how long does it take for the spell checker take to check a very short message maybe 200 words, with several links within the message? Bill You could check spelling as you type. Misspelled words will be underlined. Just click on an underlined word to correct the spelling. Checking before sending wants to check...

Spell checking issue in Final view using Word 2004
I ask this question on behalf of a friend. She writes: I just tried to do a spell check using the final view. Although my actual Word copy shows the final version, both the deleted text and the new text show up in the spell-check window. I'm using Word for Mac 2004 (version 11.3). A screen shot is available, if it will assist in arriving at a solution. Thanks, Leigh Hello Leigh, Thanks for posting this. I am not sure what you mean by "final view" as far as I know there is no view named such. If you could explain this more and send that screenshot my way, that would be super...

Spell Check on strike?
Suddenly Spell Check had decided to stop working in one of my long documents. Running it manually doesn't work--it finds no errors, including the deliberate misspellings I added when I noticed its failure to correct or at least mark an obvious mispelling. Duplicated words are not flagged either. I did the usual Okay-Word-got-itself-corrupted-again drill and copied all but the last few (blank) paragraphs into a new blank document. Still no luck. This is Word 2003 SP3. Any suggestions? See http://sbarnhill.mvps.org/WordFAQs/MasterSpellCheck.htm -- Suzanne S. Barnh...

Outlook Express 6 Spell Check #2
I am using Outlook Express 6 on Windows XP, and I have a problem with spell check. When you send an email, it says "spell check has been haulted, do you want to send anyway" and if I ask it to spell check, it says an error has occured in spell check. All my spelling options are correctly set, so I don't know what the problem is. Kimberly McNabb <knmcnabb@hotmail.com> wrote: > I am using Outlook Express 6 on Windows XP, and I have a > problem with spell check. Ask in an Outlook Express newsgroup. -- Brian Tillman ...

OL2003/WinXP
I have an odd problem and have searched both Usenet as well as MSFT support to no avail. I am running Outlook 2003 SP1 on Win XP Professional SP2. If I reply to an HTML message and check spelling of my content (before sending, of course) by highlighting and pressing F7, Outlook gives me the usual "Finished checking the selection. Do you want to check the rest of the items." message - even if there are blatant spelling errors!!! If instead I were to Save my message and then reopen it to try the highlight+F7 experiment again, then Outlook works as expected. Help! FWIW, I am not usi...

spelling
does spell check work for outlook express,is there a verson that it will work? Go here for a free spell checker. http://www.paulsxp.com/downloads.html. -- Curt. ------------------------------------------------- "richard" <rhardy1@triad.rr.com> wrote in message news:034d01c35e07$08497640$a501280a@phx.gbl... > does spell check work for outlook express,is there a > verson that it will work? only if you have an office product installed - richard wrote: > does spell check work for outlook express,is there a > verson that it will work? -- Diane Poremsky [MV...

No more Spelling
Hello, I work with Office X and added the value pack and the patches 1.2, 1.3, 1.4, 1.5. I have the X.2.6 version for MacOS. Suddendly (few weeks ago), my mac decided that I could not have spelling corrections for some langages, of course the one I use the most i.e. English UK and US as well as French. The grammar seems to work for word (I got green waves) and powerpoint, but nothing is available for entourage (the spelling preference tab is in grey!). So I would like to know how I can get back my spelling??? Thank you for your help Tatiana ...