Jump to content
Sign in to follow this  
cnilsson

Need help with MsgBox function

Recommended Posts

I'm trying to assign the result of a FileRead function to a variable and then use that variable in the MsgBox function. I want the contents of the variable to be displayed as the "text" parameter but each time I run the script, the message box is blank. Any ideas? Here is my code:

$result = FileRead("c:\autoit\checkinstalledfiles.log") -->I want to read the entire contents of the file, only 7 lines.

MsgBox(0, "Results", $result)

Share this post


Link to post
Share on other sites

I'm trying to assign the result of a FileRead function to a variable and then use that variable in the MsgBox function. I want the contents of the variable to be displayed as the "text" parameter but each time I run the script, the message box is blank. Any ideas? Here is my code:

$result = FileRead("c:\autoit\checkinstalledfiles.log") -->I want to read the entire contents of the file, only 7 lines.

MsgBox(0, "Results", $result)

Your logfile is probably using UNICODE characters?

You can convert it by doing something like RunWait(@comspec & " /c type c:\autoit\checkinstalledfiles.log > newfile.log")

Then read the newfile.log..

Edited by JdeB

Share this post


Link to post
Share on other sites

Your logfile is probably using UNICODE characters?

You can convert it by doing something like RunWait(@comspec & " /c type c:\autoit\checkinstalledfiles.log > newfile.log")

Then read the newfile.log..

Ok, I'll give that a try. Thanks!

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...