qwert Posted August 29, 2017 Posted August 29, 2017 Two and a half years ago, a chart function was posted, which included an excellent example: I've downloaded and attempted to run the scripts, but I'm getting numerous messages of undeclared variables ... $__Au3Obj_X64, for example. But when I attempt to remedy one condition, another occurs. Before I continue, I have these questions: Is the Au3 Object UDF out of date so that it can't run on Win7 with 3.3.14.2? There's a long thread about it that ends with a "no longer lives" comment. If it's not obsolete, where should the UDF be placed with respect to the example script ... and how should the DLL be referenced? (I suspect that something is related to me running AutoIt 32-bit on a 64-bit Win7 PC.) Lastly, is there a better approach to obtaining simple pie charts with Au3? I have a set of a dozen values that match very well to what the above example was displaying. Thanks in advance for any advice.
water Posted August 29, 2017 Posted August 29, 2017 If you run Excel you could use my ExcelChart UDF. For download please check my signature. 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
qwert Posted August 29, 2017 Author Posted August 29, 2017 Unfortunately, in this instance, I'm working on an interactive process where the Au3 script will generate the table of values based on user inputs. But I'll review your UDF for possible other cases. Thanks for responding.
water Posted August 30, 2017 Posted August 30, 2017 That's no problem. You could simply add the values from your script to Excel and then generate the Chart. 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
qwert Posted August 30, 2017 Author Posted August 30, 2017 Yes, I realize that. But requiring Excel as a middleman application is a "non-starter" for an average home user. For example, I don't have Excel on my PCs, and I'm probably ahead of most. Hopefully, someone can weigh in with answers to my questions. Surely, the ideas behind the Au3 Object UDF haven't been abandoned.
qwert Posted August 30, 2017 Author Posted August 30, 2017 Delving further into the issues, a key factor seems to center on the following call parameter in _AutoItObject_Startup(): Parameters ....: $fLoadDLL -- [optional] specifies whether an external DLL-file should be used (default: False) Why is this necessary? Where should the two DLLs be located? And what DLL is used if the parameter is False? Moreover, can someone paraphrase why running a compiled 32-bit script should ever concern itself with "64-bitness".
LarsJ Posted August 31, 2017 Posted August 31, 2017 AutoItObject UDF is only depending on one file: AutoItObject.au3. This file contains the DLLs directly in the source code (lines 1000 - 1050). It's working fine on Windows 7 and on your PC. Mine is exactly the same. If you have downloaded Charts.au3 and the example you can save AutoItObject.au3 in the same folder. Run the example and you should see a nice pie chart. I did without changing anything at all. AutoItObject.au3 is a lot of code just to store 20 properties of the pie chart. You might as well use an array. If you want to access the properties through the names you can use a dictionary object or a DllStruct with dot notation. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions
qwert Posted September 1, 2017 Author Posted September 1, 2017 Thanks for your response. It's good to hear that the combination is valid. But with the AutoItObject.au3 (only) on the same directory as the GUI script, I still receive the following error ... whether compiled or run from SciTE: "D:\Au3 LAB\Charts\AutoItObject.au3" (692) : ==> Variable used without being declared.: If $__Au3Obj_X64 Then If ^ ERROR I'll back track and see if I can isolate the cause. But I do still wonder how "64-bitness" is getting into the mix when I'm running everything as 32-bit mode (albeit on a 64-bit Win7 Pro).
LarsJ Posted September 1, 2017 Posted September 1, 2017 AutoItObject.au3 is included in Charts.au3, so it should be saved in the same folder as Charts.au3. The If-statement is checking if you are running 32 or 64 bit to be able to load a 32 or 64 bit version of the DLL-file. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions
qwert Posted September 2, 2017 Author Posted September 2, 2017 Quote it should be saved in the same folder as Charts.au3 That was the nudge that I needed. I was delving into too many details. When I started my prototype script, I had embedded Chart.au3 (for simplicity's sake?) ... which caused the includes to occur after the _AutoItObject_Startup() call in the chart function. Now everything I've seen makes sense. Thanks for sticking with me, on this (... but sorry it turned out to be such a basic error on my part).
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