Here is the bare bones of a UDF I have started work on.
Mostly just a proof of concept at this stage, and still need to add some functions and dress the UDF up a bit ... to look like a UDF ... though it has my own distinct styling, especially as I have never really developed a UDF before now .... used plenty and modified plenty though. I've even invented my own UDF variable naming convention, which I am sure some of you will be aghast at. I work with what feels best for me, but others are free to adapt if they wish.
The idea is to emulate the simplicity of INI files, but gain the benefits of SQL.
Two scripts are provided.
(1) The UDF, a work in progress - SimpleSQL_UDF.au3
(2) An example or testing script - UDF_Test.au3
Another first for me, is creating a 2D array from scratch, never done that before, that I can recall ... never had a need, and even for 1 dimension arrays, for a long time now, I have just used _StringSplit to create them. So I needed a bit of a refresher course, which my good buddy @TheDcoder assisted me with ... not without some angst I might add. LOL
Program requires the sqlite3.dll, not included, but easily enough obtained.
Hopefully the usage is self-evident ... just change the Job number variable in the UDF_Test.au3 file to check the existing functions out.
P.S. This is also related to a new program I have just finished and uploaded - INItoSQL DB
am using an ini files as a History
Sometimes the file size is be larger to 5 MB
AutoIt does not recognize the full content of the file
When I did a search to find out why, I discovered that INI files could not be read if they size larger than 64 KB.
for that I preferred to ask here if is there any way to bypass this obstacle.
The contents of the file are as follows
This is the section for reading the file (adapted from my main script)
case $continue Local $aArray = IniReadSection($WaitingListFile, StringEncrypt(true, "filesList", $MyPassword)) If Not @error Then Opt("GUICloseOnESC", 1) _GUICtrlListView_DeleteAllItems($scList) For $i = 1 To $aArray $path = path_list(StringEncrypt(false, $aArray[$i], $MyPassWord), 1) if FileExists(StringEncrypt(false, $aArray[$i], $MyPassWord)) then GUICtrlCreateListViewItem(_GetFileName(FileGetLongName(StringEncrypt(false, $aArray[$i], $MyPassWord))) & Opt("GUIDataSeparatorChar") & " : " & Opt("GUIDataSeparatorChar") & FileGetLongName(StringEncrypt(false, $aArray[$i], $MyPassWord)), $scList) else $path = $path endIf Next GUISetState(@sw_disable, $hGUI) GUISetState(@sw_show, $hGUI2) GUICtrlSetState($SClist, $GUI_FOCUS) else if $accessibilitymode = 1 then speak(str("listEmpty")) endIf endIf
Is there any way to solve this problem, please?
am waiting your answers...
Greetings to All
Hi, I have the following line in a text file 'input.txt'. I know the line number - say '6'. I wish to replace the text 'WWW' in the below line with a random number (I can generate that with random()).
WERIS WWWJP 3.83 8.330 1.000 1097.RAXX
The WWW is a 3 digit integer (could be any number between 0 to 999), I can use stringtrimleft and get the numerical value of WWW in this file
so, basically, I know the string to replace (ie; WWW stored in a variable), I know the line number to work on and the file location/name and the replacement variable (through random()). My requirement is to fill that 3 spaces with my random number (which Is a integer between 1 and 999)
please put ur suggestions
Hi, i'm just curious is there a way to sort an ini file after largest first?
my inifiles writes itself like this
but is there a way so i can get it sortet
as a start in Autoit i tried something i was missing since im using Autoit.
I build a custom MessageBox which has a large amount of custom options and which scales its size on the parameters you set.
-Text Color (Buttons, Text)
-Background Color (Msgbox, Buttons, Label)
-Icon (Default, No Icon, Custom)
-Label/ Button Style.
I tried to keep this as close as i could to a Msgbox i was used too on my batch times.
After i was ready i realised, @Melba23 probably build a way better msgbox which would have suit my needs enterly, anyway thanks to @Melba23 because i use his Stringsize UDF.
local $Message = _sMsgBox("Test", 6, "Continue?") if @extended <> -1 Then MsgBox(0, @extended, $Message&" Button pressed")