I tried to use the following AHK library: http://www.autohotkey.com/board/topic/72629-mysql-library-functions/page-1
And I wrote a simple module based on their examples, but if I run the script, I get mysql error: 9999 - can't load libmySQL.dll from directory.
I've looked at the libraryn and this is the part that throws the error:
hModule := DllCall("LoadLibrary", "Str", libmysql)
If (hModule = 0)
{
this.error := 9999
this.errstr := "Can't load libmySQL.dll from directory " libmysql
if errmsg
msgbox, 16, % "MySQL Error: " this.error , % this.errstr "`n`n" sql
Return
}
So I guess it can't find or load the dll. But I have no idea why, I've tried to replace it manually and I've reinstalled mySQL (connector). I've tried to compile the script and then run it (on the forum someone saied it worked for him) but nothing changed. Any idea?
Looking at the library's source code, it seems that you have to place
libmySQL.dllin the same folder as your AutoHotkey script. The library will automaticlly make a copy of it (FileInstall) and place it in%AppData%/yourScriptNamethen load this dll from there.You can download everything including
libmySQL.dllfrom this download link provided by the author: http://www.panofish.net/ahk_mysql_library.zip