5 posts in this topic
Is it possible , and how can I read and write txt files from Icloud (apple service) ?
Let me try to explain my application.
On my Ipad and Iphone I create txt files. On my windows computer it is possible to read and modify these files manually, by logging in on www.icloud.com.
What I want to make is an auto-it script who reads the txt file and create an new txt file on www.icloud.com, so I can acces these on my ipad and/or phone.
I've made a program that relies on IniReadSectionNames. It reads (~3K) Autorun.inf files in the working folder and creates a GUI based on their contents.
I made sure to revert to a default GUI upon @error.
But someone (with Windows XP SP3 32-bit) reported to me he always gets the default menu.
I sent him a FileRead command instead and it works! So seemingly there's no access problem to AutoRun.inf.
In the following demo code, I always hit success, but he always ends up with semi-success:
Local $hIniLocation = "Autorun.inf" Local $aSections = IniReadSectionNames($hIniLocation) If @error Then $aSections = FileRead($hIniLocation) if @error then msgbox(48, "Double error", "Alternative access failed too due to:" & @crlf & @error & @crlf & @extended) else msgbox(0, "Semi-success", "IniReadSectionNames failed, but alternativaly this file contains:" & @crlf & @crlf & $aSections) endif else msgbox(0, "Success", "IniReadSectionNames worked!") endif Why is that? Is there something further to check with him?
I've been scouring the forum for something that works... and no dice yet... hoping to stop the frustration - hope someone in the forum knows what to do.
Basically, I've saved .msg files out of MS Outlook and want to scan each on for email addresses but all I get with fileopen and fileread are symbols... ran through every iteration.
I've seen people do some soft of binary extract and binarytostring but I haven't gotten that to work either... not sure what's going on.
Neither of these have worked for me... yes I know they are old and FileOpen has changed... but like I said I tried everything that I know of.
$sFile = "C:\temp\messages\Test.msg" $hFile = FileOpen($sFile, 16) ; 16 = binary $binData = FileRead($hFile, 1024) ; read first 1KB FileClose($hFile) ConsoleWrite("Debug: First 1KB = " & $binData & @LF) or...
$sFile = "C:\temp\messages\Test.msg" $hFile = FileOpen($sFile, 16) $binData = FileRead($hFile, 20480) FileClose($hFile) $startdef=StringTrimLeft(Binary('thetextIamlookingfor'), 20) $enddef=StringTrimLeft(Binary('moretextIamlookingfor'), 20) $binData=StringTrimLeft($binData, StringInStr($binData, $startdef)+StringLen($startdef)-1) $binData=StringLeft($binData, StringInStr($binData, $enddef)-1) ConsoleWrite(BinaryToString('0x'&$binData) & @LF) Thanks!
I hope you can help me out
I have a script that checks for the current user's loginname in different txt files.
If the current user's loginname is found in one of the txt files, the script reacts based on that.
The text files look something like this:
This is an example of the script:
$username = @UserName ;pulls username that is logged in $Dir = "C:\Test\" Global $Custom = ["text01", "text02", "text03", "text04"] ;CHECK LISTS For $i = 0 To UBound($Custom) - 1 $CustomFile = FileOpen($Dir & $Custom[$i] & ".txt", 0) $Readtxt = FileRead($CustomFile) FileClose($CustomFile) If StringRegExp($Readtxt, $username) Then do this and that... EndIf Next It works perfectly if the user logs in as xxxx or XXXX (Both lower and upper case characters)
So the FileRead function doesn't seem to be case sensitive.
But if the user logs in as xxXx (mix of lower and upper case characters), then the username is not recognized in the txt file.
Does anyone have a suggestion on how I can fix this?
Thanks in advance!
Good Morning All,
I'm hoping someone here can work their AutoIT magic
I'm doing a pretty "simple" string search in a HUGE variable.
But I'm doing the basics almost straight out of the Help File...
( sorry, I'm leaving out my main code for privacy reasons )
Local $hFileOpen = FileOpen($sFilePath, $FO_READ) Local $sFileRead = FileRead($hFileOpen) Local $sEmailPosition01 = StringInStr ($sFileRead, $sEmailAddress ) Everything looks good with my troubleshooting
I ran IsString against $sFileRead and $sEmailAddress and was okay: "The variable is a string"
So then I ran StringLen($sFileRead) and got string length 68352786
Yeah, I know... That's HUGE - But it worked with the older version of AutoIT (upgraded yesterday) v184.108.40.206
Is there an "Excessive" variable I should set?!? lol. Should I search the string a different way maybe?
I know the string is in there... but I'm getting a StringInStr @error : 0 @extended: 0
Please help! Thank you all