Jump to content

Getting text with special characters from a program window and save it to a file


Trysil
 Share

Recommended Posts

I have written a script wich gets the text from a program window and saves it to a file. However some special characters are not displayed correctly.

For example @ gets to be ), β gets to be * and so on. Is there a way to get these caracters to be saved correctly?

I use WinGetText to get the text and FileOpen and FileWriteLine to save the file.

I use

FileOpen ( "output.txt", 129)

to open the file, and

$text = WinGetText("Programname","")

to get the text.

There seams to be a problem getting special characters with WinGetText command.

Edited by Trysil
Link to comment
Share on other sites

The program seams to use a special encoding or formating. When copying text from the program window manually to notepad++ it pastes ) instead of α using any encoding in the document avaviable. If I pase the text into word as formatted text it displays correctly. What to do?

Link to comment
Share on other sites

The special characters seams to have a special font on them, when saving the pasted α character in word to a html, the α has the following code and displays correctly in a browser: <span style='font-family:"WW Font"'>)</span>

Copying and pasting seams to be the only way to get theese characters, or is it another way? I liked WinGetText() because it could run in the background.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...