Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Call to nonexistent function. #5

Open
Bluscream opened this issue Apr 10, 2017 · 4 comments
Open

Error: Call to nonexistent function. #5

Bluscream opened this issue Apr 10, 2017 · 4 comments

Comments

@Bluscream
Copy link

When i execute example_1.ahk i always just get

---------------------------
example_1.ahk
---------------------------
Error:  Call to nonexistent function.

Specifically: AHKHID_UseConstants()

	Line#
	020: Gui,Add,ListView,x16 y40 w440 h150 vlvwKeyb gLV_Event AltSubmit,Name|Type|SubType|Keyboard Mode|Number of Function Keys|Number of Indicators|Number of Keys Total
	021: Gui,Tab,2
	022: Gui,Add,ListView,x16 y40 w440 h150 vlvwMouse gLV_Event AltSubmit,Name|Mouse ID|Number of Buttons|Sample Rate
	023: if bVista  
	024: LV_InsertCol(5, "", "Has Horizontal Wheel")  
	025: Gui,Tab,3
	026: Gui,Add,ListView,x16 y40 w440 h150 vlvwOther gLV_Event,Name|Vendor ID|Product ID|Version Number|Usage Page|Usage
--->	029: AHKHID_UseConstants()  
	032: iCount := AHKHID_GetDevCount()
	035: Loop,%iCount%
	035: {
	037: HID0 += 1
	040: HID%HID0%_Handle := AHKHID_GetDevHandle(HID0)
	041: HID%HID0%_Type := AHKHID_GetDevType(HID0)
	042: HID%HID0%_Name := AHKHID_GetDevName(HID0)

The program will exit.
---------------------------
OK   
---------------------------
@MacroMan
Copy link

You need to include the library in your code.

Download AHKHID.ahk to the same directory as example_1.ahk: https://github.com/jleb/AHKHID/raw/master/AHKHID.ahk
Add `#include AHKHID.ahk' to the top of the example.

@rjb25
Copy link

rjb25 commented Dec 19, 2017

This begs the question "Why don`t the examples already contain this line in them?" You never want examples to require setup.

@xaviershay
Copy link

Ran into same problem, suggested fix worked.

@timdonovanuk
Copy link

This is really dumb :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants