[jawsscripts] Re: How to read a file and say?

  • From: "Martin Slack" <m.g.slack@xxxxxxxxxxxx>
  • To: "JAWSScripts" <jawsscripts@xxxxxxxxxxxxx>
  • Date: Mon, 24 May 2010 22:58:35 +0100

Péter,

  If you want a script that will open a text file and read it out, then the
following script in default.jss will open the file:

Script test ()
  Run ("c:\\file.txt")
EndScript

  This assumes that the .txt extension is associated with a suitable
application like notepad.  You can test this by double clicking on the file
and seeing if it opens.  If the file doesn't open when you double click on
it, you may need to try a line in your script like:

    Run ("notepad.exe c:\\file.txt")

    The script will only open the file.  To have the contents of the file
spoken automatically, you will also need an AutoStartEvent function in the
notepad.jss file:

Void Function AutoStartEvent ()
  SayAll (false)
; there may be more lines already in this function
; or you may need to write it yourself.
End Function

  hth

Martin


----- Original Message ----- 
From: "Almádi Péter" <dj.peat@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Monday, May 24, 2010 10:22 PM
Subject: [jawsscripts] How to read a file and say?


Hi!

How can read a file (e.g: c:\file.txt), and say in script?
E.g: I open the notepad. Push the ctrl+alt+o, when the script read all
contents of c:\file.txt, and say it.

How can it?

Thx.

---
Peter
__________�

View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: