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 ran a remote program on 180 computers and logged the output to a log file with paexec. I'm trying to parse through the log file to see which computers launched the program successfully and record the computer name but I'm not sure how to go about it.
I can successfully open the log file, read it but not sure how to start separating the data.
I've attached the log file, basically every computer entry in the log file for a new computer starts with "Connecting to <computername>..." I was thinking about using that as the start and stop point for retrieving the end results. Anything with a "returned 0" is a success, everything is a fail.
Any help is much appreciated.
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!