Can files be read from the web or the cloud?
I am trying to read this file but get the file open error.
#include <FileConstants.au3> #include <MsgBoxConstants.au3> ;Assign the file path to a variable Local $sFilePath = "C:\Automation\test.txt" Local $sFilePathAzure ="https://batlgroupimages.blob.core.windows.net/files/test.txt" Local $nLineNumberToLookFor = 0 ;Open the file test.txt in append mode. ;If the folder C:\Automation does not exist, it will be created. Local $hFileOpen = FileOpen($sFilePathAzure, $FO_APPEND + $FO_CREATEPATH) ;Display a message box in case of any errors. If $hFileOpen = -1 Then MsgBox($MB_SYSTEMMODAL, "", "An error occurred while opening the file.") EndIf ;Set the file position to beginning for reading the data from the beginning of the file. FileSetPos($hFileOpen, 0, $FILE_BEGIN) ;Read the data from the file using the handle returned by FileOpen ;Local $sFileRead = FileRead($hFileOpen) ;Read the 2nd line of data from the file using the handle returned by FileOpen Local $sFileReadLine = FileReadLine ($hFileOpen,2) ;Close the handle returned by FileOpen. FileClose($hFileOpen)
Hello AutoIt Scriptwriters!
I want to read https based site that it's address is: Soft98 (https://soft98.ir/)
I've tried with "_INetGetSource", "BinaryToString(InetRead)" and "InetRead" but none of them don't help me
How can i get this site html source code without opening IE Windows?
(Edited from original. Please note that I AM NOT AN AUTOIT EXPERT. I write code using Autoit frequently but I am no expert, especially when it comes to I/O. So any remarks that start with "Why did you..." can be answered by referring to the first sentence. This project was done in Autoit because of an interface I built to display the data.)
Attached is a program and ascii input file I wrote to read stock price data, convert it to binary and then read it back into the program in binary. The goal was to show increased performance for reading the files in binary and provide a demo on how to read/write binary for int32, int64, double and strings for anyone who might find it helpful. The results on my PC show the following:
Time to read ascii file only: 456.981951167202
Ascii read & process time: 6061.83075631701
Binary write file time: 14787.9184635239
Time just to read binary file: 42.418867292311
Binary read and process time: 4515.16129830537
A couple things to note:
1) The 32 MB ascii file took 10x longer to read than the 15 MB binary file. Not entirely sure why. Both were read into a buffer.
2) The Binary write takes a long time but I made no effort to optimize this because the plan was to write this file one time only so I don't mind if it takes longer to write this file. I care much more about how long it takes to read the file because I will be reading it many times.
3) There was a modest gain in converting the ascii file to binary in terms of file size and reading speed.
So big picture... not sure it's worth the effort to convert the files to binary even though most of the data is numerical data in the binary file. That was actually surprising as I expected there would be more of a difference. Any ideas on how to get the binary data to read at a faster rate would be great.
This is another take on string triggers, triggers on specific strings.
Able to simple text pasting,
opening links (as long as there's a www. http:\\ or https:\\ at the beggining)
and is able to open applications, if there is a parameter in the parameter field, it uses it.
The user selects the modifier key, and then uses a combination of that key with a couple others to perform tasks like
screenshot the active window, (modkey + prtscr), turn off the screen (modkey + pause / break),
open clipboard string in registry (modkey + R), change system volume (modkey + arrouw up/dn).
The following keys pressed at the same time prompt for shutdown: S+D+T
The following keys pressed at the same time prompt for restart: S+R+T
Middle mouse button click on titlebar minimizes to tray, or a left mouse button click in the icon in the tray also minimizes.
Trigger is set off by space or enter, and timeouts after 3 seconds.
Shows your external, lan, and gateway ip's, can refresh with right mouse click, and opens the default browser if the correspondent button is pressed.
Able to change system volume by a set percentage, reading from the inputbox the number the user sets, if 0 or empty uses system default.
I made this because the existing string trigger applications didn't do it for me for a number of reasons.
I did this for me, but if someone finds it useful all the better.
Here is an other UDF for string handling :
_StringDateConvert: convert a date from one format ("YMD", "MDY" or "DMY") to another.
_StringIsDate: checks if a date with a given format is valid
_StringCount: count of occurrences that appear in a string
_StringFormatBytesSize: formatting a dimension expressed in bytes (bytes) in MB, TB, ...)
_StringIsEndingWith: check if a string end with some characters
_StringIsStartingWith: check if a string start with some characters
_StringJoinArray: concatenate elements of an array to rebuild a string
_StringPadLeft: filling a string with characters on the left
_StringPadRight: fill a string with characters on the right
_StringRemoveFrenchAccent: remove french accent
_StringRemoveChars: deleting characters from a string
_StringStrip: eliminate characters at the begin and/or at the end of a string
_StringTitleCaseFrench: capitalize the first letter of each word with elimination of french accents
_StringWSClean: simple replacement of "White Spaces", remove beginning and trailing spaces and multiple spaces removal
Any comments, suggestions for improvement or constructive criticism are welcome.
Below you will find the UDF and a demo program.