TreatJ Posted March 12 Posted March 12 (edited) I'm attaching to this post a Windows 11 v24H2 Zipped program named: PayFiler. It has been upgraded many times over the last 14 years. Ver 1 (as I called it) was never finish. Ver 2 had many problems. Ver 3 was the first one that worked to a point as did Ver 4. Problem was that my "Database" was a "Windows Notepad" file. After accumulating a little over a 400 Records my program wasn't able to properly manipulate the data. It was most likely a bug in my coding. Not sure. Most coders would agree (I think) that a "Text File" Database is probably not a really good idea! After digging deeper into what all Autoit was capable of I came across SQLite. So in late 2016 I updated PayFiler (calling it Ver 5) to be able to use it. Ver 6 included an Program Install option. My newest version and hopefully my last (have to see what Windows 12 has instore!) has a much upgraded Install option. Also includes a Restore and user Help window. To sum up, I wrote this for my wife many moons ago to give her a small window that she could copy and paste Bill payment information into...as of 03/25 she now has over 3000 Recs in her Database. She entered her very first Record in 2011! Hope you find my program helpful and as always.... Any feedback would be much appreciated... Note: Program will work in Windows 10 too. PFv612NewInstall.zip Edited March 16 by TreatJ Fixed some issues and re-uploaded Program
SOLVE-SMART Posted March 13 Posted March 13 Hi @TreatJ , I didn't run your program yet, maybe I will soon. I usually check what's going on before 🧐 . In the meanwhile few notices: Do you know about Au3Check and directives like this: #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y ? Because this will help to identify unused code, double declarations of variables and more. I added these two lines in PayFilerV612.au3 which is your program entry point (start) I guess. Then run Au3Check in VSCode. Of course also available in SciTE. Then these are the problems (Tab PROBLEMS in VSCode): Spoiler I hope this is helpful a bit. I will also check the SQLite part which I am interested in, but later on. Best regards Sven ==> AutoIt related: 🔗 GitHub, 🔗 Discord Server Spoiler 🌍 Au3Forums 🎲 AutoIt (en) Cheat Sheet 📊 AutoIt limits/defaults 💎 Code Katas: [...] (comming soon) 🎭 Collection of GitHub users with AutoIt projects 🐞 False-Positives 🔮 Me on GitHub 💬 Opinion about new forum sub category 📑 UDF wiki list ✂ VSCode-AutoItSnippets 📑 WebDriver FAQs 👨🏫 WebDriver Tutorial (coming soon)
TreatJ Posted March 13 Author Posted March 13 Very helpful indeed! First off... Thanks for downloading my Program and troubleshooting it. It does not surprise me that there are variables in it that are not use. They come from other Programs that I have written. Good old Copy/Paste! If unused or repeated LOCAL variables would have stopped PayFiler from running.... believe me, I would have fixed them! I am not a "Pro" coder.... just a hobbies at best. Even with what you found.... I hope that you are able to install and use it. Thanks again for bring what you found to my attention. I will be going back through my code and fixing these problems that I was not aware of. After I "get the bugs out" I will unload it again. If you come across any other problems with my code or how it runs... please let me know... SOLVE-SMART 1
SOLVE-SMART Posted March 13 Posted March 13 2 hours ago, TreatJ said: for downloading my Program and troubleshooting it Not a real troubleshooting, but ya, got it 😅 . 2 hours ago, TreatJ said: Good old Copy/Paste! If unused or repeated LOCAL variables would have stopped PayFiler from running.... believe me, I would have fixed them! They can cause problems, but often they don't. I'm sure you would have noticed errors while running the program, or your wife would have mentioned them 👌 . 2 hours ago, TreatJ said: I am not a "Pro" coder.... just a hobbies at best. Even with what you found.... I hope that you are able to install and use it. Thanks again for bring what you found to my attention. I will be going back through my code and fixing these problems that I was not aware of. After I "get the bugs out" I will unload it again. These are not real BUGs per se, they are warnings. I really just mention it, no blame about your programming skills at all. I am sure I can and will run your program. I also will let you know about suggestions etc. 🤝 . Thanks for sharing your program. Best regards Sven ==> AutoIt related: 🔗 GitHub, 🔗 Discord Server Spoiler 🌍 Au3Forums 🎲 AutoIt (en) Cheat Sheet 📊 AutoIt limits/defaults 💎 Code Katas: [...] (comming soon) 🎭 Collection of GitHub users with AutoIt projects 🐞 False-Positives 🔮 Me on GitHub 💬 Opinion about new forum sub category 📑 UDF wiki list ✂ VSCode-AutoItSnippets 📑 WebDriver FAQs 👨🏫 WebDriver Tutorial (coming soon)
TreatJ Posted March 14 Author Posted March 14 Well it is kind of a troubleshooting in that, like you said... and I agree...unused or repeated LOCAL variables CAN cause problems! Again (as I am somewhat OCD when it comes to writing code) I will be removing the unused variables and will "Global-ize" some others that are repeated. If you have looked through my code then you might have noticed that all of the variables created are no more... or no less then 10 Chars long. This helps me to keep my code as lined up as possible.... and that helps me (and hopefully others) to read it better. I also like to add many comments... Anyway, if your main interest is in the "SQLite" part then I want to make you aware of the fact that my program does NOT allow an apostrophe (') to be entered into the Database. When you run it.... Try entering one into any (add or edit) field and then save or update it. Commas are not allowed either... (use to save data to a "comma Delimited" text file). If you allow apostrophes to be accepted input then you should add "_SQLite_FastEscape" to your Save and Delete lines of code. Pryor to sharing PayFiler I uploaded another Program that I wrote named "TextFinder" were apostrophes ARE accepted. Just a very simple SQL database is created and used in that Program. Here are two lines were "FastEscape" is part of the code... $ReturnValu = _SQLite_Exec($DB01Handle, "INSERT INTO "&$DB01Table1&" VALUES (" & _SQLite_FastEscape($TextSearch) & ");" ) $ReturnValu = _SQLite_Exec($DB01Handle, "DELETE FROM "&$DB01Table1&" WHERE "&$DB01CHead1&" = " & _SQLite_FastEscape($TextRemove) & ";") Buy the way.... if you "Troubleshoot" my TextFinder Program I am sure you will find may of the same variable issues... but it works! LOL to sum up... I just want to say again.... Thanks for your very valuable Feedback!... and right back at you.... best regards!
TreatJ Posted March 14 Author Posted March 14 Just wanted to add to that my TextFinder Program does not "Update" Database Records like PayFiler does. If it did then _SQLite_FastEscape would have been added to that line too. I mentioned that all my created Variables <> 10 chars long... Notice the length of my Function Names! LOL.... Again... helps me to read in better....Me? OCD?? No Way! LOL... SOLVE-SMART 1
TreatJ Posted March 14 Author Posted March 14 I can't believe it... I misspelled the Name of my own Program! LOL It is named "TxtFinder" not "TextFinder"! If you are interested in downloading it too just go to AutoIt's Browse / Forum... Enter this into Search: TxtFinderV512 Last time I searched for it (02/08/25) only one result came up... and it was mine. I just did it again and 2 results came up... and it is mine too LOL.. has to do with another small program I wrote and uploaded.
TreatJ Posted March 15 Author Posted March 15 Think I got it all fixed.... PayFilerV612 Code Fixes... Date: 03/14/2025 $MsgBoxText and $PathToFile were fixed. ---------------------------- Variables that WERE Removed from different Functions! ---------------------------- Line# 0347: Local $HoldValue1 = 0 ;-------------------> Hold Value (Temp: 1) Line# 1133: Local $FullRecord = 0 ;-------------------> List Window: Full Record Sel ------------------------------- Variables that were found to be in use and so WERE NOT Removed! ------------------------------- Func _ViewGuiWin02() ^^^^^^^^^^^^^^^^^^^^ Line# 1125: Local $ViewLabl1H = 0 ;-------------------> View Window: Label 1 Handle! Line# 1126: Local $ViewPosSiz = 0 ;-------------------> View Window: Display PosSize ------------------------------- As for the 3 Declared, but not used, Variables on line 1220... Check out Line 1218: Func _WMsgNotify01($hWnd, $MsgID, $wParam, $lParam) Now have a look at the infomation about GUIRegisterMsg in AutoIt Help v3.3.16.1 As for the 4 Declared, but not used, Variables on line 1319... Check out Line 1317: Func _USBDrvChange($PWinHandle, $MsgID, $WParam, $LParam) Again... have a look at the infomation about GUIRegisterMsg in AutoIt Help v3.3.16.1 Going to be uploaded fixed program soon
TreatJ Posted March 15 Author Posted March 15 I uploaded my updated program last night... I think I got all the Variable problems fix... Anyway... Thanks again for the prior feedback ... It really helped!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now