water Posted March 3, 2021 Share Posted March 3, 2021 Did you read the help file I pointed you to? All needed answers can be found there. The code you posted before is quite complex and hard to read. So you need to brush up your AutoIt knowledge if you want to have a reliable script. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
rharwood2 Posted March 3, 2021 Author Share Posted March 3, 2021 3 minutes ago, water said: Did you read the help file I pointed you to? All needed answers can be found there. The code you posted before is quite complex and hard to read. So you need to brush up your AutoIt knowledge if you want to have a reliable script. Yes i looked and it is all working now thanks to all your help. I really appreciate all your patience with me, trying to relearn all this again, age is not your freind things that came easy the first time round now need to be pounded in to make them stick. I will attach the working file just so you can see what i ended up with. I think i will continue to delete stuff and simplify things. The other issue I was having was in moving it out of the directory it was compiled in, it broke the program, The issue was that the commMG.dll needs to be moved with the exe file, but it gives a cryptic message about a un-initallized varible so it took some time to figure out. Thanks again for all your patience. Notifervirtualprinterv2.au3 Link to comment Share on other sites More sharing options...
water Posted March 3, 2021 Share Posted March 3, 2021 A few things for you to work on: That's not correct. You can only #include .au3 and .a3x files. If you want to install a DLL from your compiled script then use FileInstall. #include 'CommMG.au3';or If you save the commMg.dll In the @scripdir use ; ;#include @ScriptDir & '\commg.dll' When using ini files use Ini* functions to read/write data. ; get excel path and write to ini file You placed _Excel_Open and _Excel_BookOpen in a While loop. Start Excel once outside the loop and - if possible - open the workbook outside the loop too. Enhances performance. Use Tidy in SciTE to make your script more readable. Follow good coding practices when naming your variables. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
rharwood2 Posted March 3, 2021 Author Share Posted March 3, 2021 9 minutes ago, water said: ;#include @ScriptDir & '\commg.dll' Ya that broke things thats why its commented out next time I am back in there i will delete. 10 minutes ago, water said: You placed _Excel_Open and _Excel_BookOpen in a While loop. Start Excel once outside the loop and - if possible - open the workbook outside the loop too. Enhances performance. I tried to but the when I did it never seemed to work.I had tried placing it just before the while loop but could not get it to build, ill try again when i get back in from road work the next couple days. Also the program spends most of its time in that while loop as it grabs data form the serial stream. 16 minutes ago, water said: Use Tidy in SciTE to make your script more readable. Scarry thing is i did. Link to comment Share on other sites More sharing options...
water Posted March 4, 2021 Share Posted March 4, 2021 9 hours ago, rharwood2 said: Use Tidy in SciTE to make your script more readable. Press Ctrl+t in SciTE after you have opened your script. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Developers Jos Posted March 4, 2021 Developers Share Posted March 4, 2021 1 hour ago, water said: Press Ctrl+t in SciTE after you have opened your script. ....and first loaded the separate SciTE4AutoIt3 installer. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
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