i have searched allot about an function that can read the INI file as a string
i mean function to read the ini files from string and not from the file directly.
i finally found an UDF that do what i want
but unfortunately all the functions work, but the function that i want it not working.
this is the udf
the function that i need is _IniReadFromString
this is the function
Func _IniReadFromString($szInput, $szSection, $szKey, $Default) $szInput = StringStripCR($szInput) Local $aRegMl = StringRegExp($szInput, "\[" & __StringEscapeRegExp($szSection) & "\]\n+(?:[^\.*?=.*\n)*" & __StringEscapeRegExp($szKey) & "=(.*)\n?(", 3) If @error Then Return SetError(1, 0, $Default) ; key not found Return $aRegMl EndFunc;==>_IniReadFromString
i hope that any one can help me
thank you in advance
I have this code
It gets variable input from GUI to run a loop and write to a text file then copy it to the clipboard
But the thing is code runs normally with $px and $py <100 or both > 100 or with $px <10 and $py>100 but It's wrong with 10<$px <100 and $py >100
Can anyone tell me why?
Func clone() Local $px = GUICtrlRead($input1) Local $py = GUICtrlRead($input2) Local $temp = "C:\temp.csv" FileDelete($temp) While $px <= $py Local $name = "P"&$px FileWrite($temp, " & $name & ""& @CRLF) $px+= 1 WEnd $a=FileRead($temp) ClipPut($a) MsgBox($MB_ICONINFORMATION,"","Copied to Clipboard") EndFunc
(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.