Jump to content

Is #include <Extras\WM_NOTIFY.au3> just a fictional placeholder and I have to create that file myself?


Recommended Posts

Posted (edited)

This might be an incredible stupid question but in the helpfile I saw 

#include <Extras\WM_NOTIFY.au3>

But I don't have that file to include anywhere. And I can't find any hint saying "you have to specify the contents of that file yourself"

So looking at the example from the helpfile for

_GUICtrlListView_Create()

It would seem that

 _WM_NOTIFY_Register()

basically does a 

GUIRegisterMsg($WM_NOTIFY, "_WM_NOTIFY")

EDIT: that was a copy-paste error, it should be GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

and that 

_WM_NOTIFY_DebugEvent()

just logs the results to the command line or something like that.

 

So yeah, probably simple to answer but I just wanted to check if I am assuming correctly here: Do i have to create the Extras\WM_NOTIFY.au3 file myself?

Thanks

Edited by Kloud
Posted

You should not have to create any file when you run an example of AutoIt function from the help file.  Seems to me that this file was deleted and the example was not modified accordingly.  You should report it in Bug Tracker.

  • Developers
Posted (edited)

... and what exactly is missing?  I have that file at the proper location in directory: C:\Program Files (x86)\AutoIt3\Examples\Helpfile\Extras

Are you sure you are missing the file there or did you Copy&Paste the example into another script in another directory than the examples?

Jos

Edited by Jos

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.
  :)

Posted

Yes, I am missing the file. I searched the entire hard disk.
I used 3.3.14.5 for the installation.
I just reinstalled the latest version of autoit in a new virtual machine and now I have the WM_NOTIFY.au3.

I deinstalled it again and reinstalled 3.3.14.5 and it was missing again. So I guess that version is simply missing it?!
 

Posted (edited)

I did find a WMDebug.au3 in C:\Program Files (x86)\AutoIt3\Examples\Helpfile\Extras but no WM_NOTIFY.au3

In the example script for _GUICtrlListView_Create you find the following line

GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

Function WM_Notify can be found in the example script as well. I checked this for AutoIt 3.3.14.5 and 3.3.15.0.

In your OP you mention

GUIRegisterMsg($WM_NOTIFY, "_WM_NOTIFY")

Note the "_" as the first chracter.

 

Quote

This might be an incredible stupid question but in the helpfile I saw 

Can you please post a screenshot of the helpfile where you found the _WM_NOTIFY function?

Edited by water
Fixed version from 3.3.1.5 to 3.3.14.5

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

 

Posted (edited)

Sorry, the helpfile says "WM_NOTIFY".
I played around with the test file I had and at some point I changed the method name to "_WM_NOTIFY". So in my first post here it was a copy paste error.

So yes, the function "WM_NOTIFY" can be found in the example script but i.e. the function 

_WM_NOTIFY_DebugEvent

cannot be found and is part of the WM_NOTIFY.au3 file

If I use the latest version of autoit for the installation (3.3.16.0) then this is how the folder that contains the WM_NOTIFY.au3 looks like:
image.thumb.png.694c447ca591a46521f84e78cee6e620.png
 

Edited by Kloud
Posted

I installed the latest AutoIt release 3.3.16.0 and get the same listing. WM_Notify.au3 holds _WM_Notify_Register, _WM_Notify_DebugEvent and _WM_Notify_DebugInfo.
Seems WM_Notify.au3 was added with 3.3.16.0 (but I did not find it mentioned in the Changelog).
So your script should work fine with the latest AutoIt version but will throw errors with older versions (until you backport WM_Notify.au3).

Hence: No bug

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

 

  • Developers
Posted
29 minutes ago, water said:

Seems WM_Notify.au3 was added with 3.3.16.0 (but I did not find it mentioned in the Changelog).

It is in extra's which is really only for the Helpfile examples and not really for Production purpose with fullblown helpfile info and support. ;) 

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.
  :)

Posted
On 5/2/2022 at 2:53 PM, Kloud said:

#include <Extras\WM_NOTIFY.au3>

This statement only finds WM_Notify.au3 when your script is located in C:\Program Files (x86)\AutoIt3\Examples\Helpfile.
I assume you stored your test script in another directory (as the AutoIt directories are read-only).
So you have to specify the full path in your #include statement.
Check the helpfile for #include to get more detailed information how AutoIt finds include files :)  

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

 

  • Developers
Posted

The idea is that you open the example from the helpfile by clicking on it in the helpfile page. this will open the example file from  "C:\Program Files (x86)\AutoIt3\Examples\Helpfile\". When done this way all used extra includes should work, but let us know when that isn't the case. :) 

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.
  :)

Posted
#include <Extras\WM_NOTIFY.au3>

does work but suggest the include can be used like other standard includes.

Better is: 

#include "Extras\WM_NOTIFY.au3"

which indicated the include is local to the examples.

And even better is an additional comment like:

#include "Extras\WM_NOTIFY.au3" ; located in \helpfile\examples in autoit installation directory

The same for the 3 examples with 

#include <Extras\WMDebug.au3>

 

Posted

Did you test your "solution"?

It only works when you store your script in "C:\Program Files (x86)\AutoIt3\Examples\Helpfile\". 
This is not recommended as the directory is read-only and might be overwritten by the next Autoit installation.

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

 

  • Developers
Posted
30 minutes ago, OJBakker said:
#include <Extras\WM_NOTIFY.au3>

does work but suggest the include can be used like other standard includes.

Better is: 

#include "Extras\WM_NOTIFY.au3"

which indicated the include is local to the examples.

There is no real difference other than the search sequence when using <> or "" ... and doubt people will assume it is a local include at all, but I could be wrong.  ;)

30 minutes ago, OJBakker said:

And even better is an additional comment like:

#include "Extras\WM_NOTIFY.au3" ; located in \helpfile\examples in autoit installation directory

The same for the 3 examples with 

#include <Extras\WMDebug.au3>

 

Agree that should be done. 

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.
  :)

Posted
22 hours ago, water said:

Did you test your "solution"?

It only works when you store your script in "C:\Program Files (x86)\AutoIt3\Examples\Helpfile\". 
This is not recommended as the directory is read-only and might be overwritten by the next Autoit installation.

The example script works when started from the helpfile, so basically there is no error in the script. But if you copy/save the example to a different location the script will not work because the include file can not be found. That is a user-error, not a script error. You copied the script, but not the required include. With my suggested changes the error will become much more self-explanatory. The DIY-solution is to copy the EXTRA to the location where you stored your copy of the script and than the script will run just like if you started it from the helpfile. See the documentation for include for the details on how includes are searched for.

 

 

Posted

Exactly what I posted here :)

 

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

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...