Iceburg Posted January 24, 2013 Posted January 24, 2013 (edited) So I had a miserable time reading a file on / creating a regular expression on windows 8, so I wrote just a simple test script to troubleshoot my Logic: #include <IE.au3> #include <Date.au3> #include <Array.au3> #include <String.au3> #include <file.au3> $i = 0 Local $file = "C:\foo\test.txt" ConsoleWrite ("File name is: " & $file & @CRLF) FileOpen($file,0) consolewrite("FileOpen @error = " & @error & @CRLF) If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf $file = FileRead("C:\foo\test.txt") consolewrite("FileRead @Error = " & @error & @CRLF) ConsoleWrite($file & @CRLF) $test = StringRegExp($file, 'Acct', 3) ConsoleWrite("Test " & $test[0] & @CRLF) Couldn't get it to work, but had two existing scripts that used similar code, so I knew something was wrong. Tested on a Windows XP VM, and everything worked as expected. Anyone else having issues on Widnows 8, and workarounds? File c:footest.txt just has 2 lines of text: Acct Acct Edited January 24, 2013 by Iceburg
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now