Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

AHKControl


  • Please log in to reply
65 replies to this topic
coldata
  • Members
  • 1 posts
  • Last active: Jul 03 2014 03:08 PM
  • Joined: 06 Dec 2012
Thanks for sharing this great script!
I used it for several months and it worked great, but suddenly it stopped and gave me this error:

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

Specifically: MI_ExtractIcon(this_exe, 3, 16)

Line#
083: Cmd_ViewHotkeys = 65408
084: Cmd_ViewKeyHistory = 65409
086: Cmd_Exit = 65405
088: Process,Exist
089: this_pid := ErrorLevel
090: this_id := WinExist("ahk_class AutoHotkey ahk_pid " this_pid)
093: this_exe := A_IsCompiled ? A_ScriptFullPath : A_AhkPath
---> 094: SuspendedIcon := MI_ExtractIcon(this_exe, 3, 16)
095: PausedIcon := MI_ExtractIcon(this_exe, 4, 16)
096: PausedSuspendedIcon := MI_ExtractIcon(this_exe, 5, 16)
098: Menu,Root,Add
100: OnMessage(0x111, "WM_COMMAND")
101: OnMessage(0x404, "AHK_NOTIFYICON")
103: if IconFile
104: {

The program will exit.
---------------------------
OK
---------------------------

What happened?

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

You probably deleted, moved or renamed your AutoHotkey\Lib folder or MI.ahk...



FusionFire
  • Members
  • 153 posts
  • Last active: Jan 24 2016 06:48 AM
  • Joined: 02 Dec 2011

Where do I place ListIncludes.ahk and the Menu Icons (MI.ahk) ? Sorry if this is a lame question. :)



rbrtryn
  • Members
  • 1177 posts
  • Last active: Sep 11 2013 08:04 PM
  • Joined: 22 Jun 2011

Put them in one of your standard libraries


My Scripts are written for the latest released version of AutoHotkey.

Need a secure, accessible place to backup your stuff? Use Dropbox!


FusionFire
  • Members
  • 153 posts
  • Last active: Jan 24 2016 06:48 AM
  • Joined: 02 Dec 2011

I had to create a directory under /My Documents\Autohotkey\lib\
I placed ListIncludes.ahk, MI.ahk within the above path, triggered Win+Q ? Nada



rbrtryn
  • Members
  • 1177 posts
  • Last active: Sep 11 2013 08:04 PM
  • Joined: 22 Jun 2011

Try putting them in C:\Program Files\AutoHotkey\Lib instead.

 

If you had to create the \My Documents\AutoHotKey\Lib folder, then something went wrong in your installation. It should have been created automatically.


My Scripts are written for the latest released version of AutoHotkey.

Need a secure, accessible place to backup your stuff? Use Dropbox!


Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

I placed ListIncludes.ahk, MI.ahk within the above path, triggered Win+Q ? Nada

 

So you didn't get an error message?  If you ran the script and didn't get an error message, obviously ListIncludes.ahk and MI.ahk are now in the right place.  So the question is: Did you run the script? wink.png

 

[The Lib folder] should have been created automatically.

 

I believe you are mistaken.
 



FusionFire
  • Members
  • 153 posts
  • Last active: Jan 24 2016 06:48 AM
  • Joined: 02 Dec 2011

So you didn't get an error message?  If you ran the script and didn't get an error message, obviously ListIncludes.ahk and MI.ahk are now in the right place.  So the question is: Did you run the script? wink.png

 

 

I believe you are mistaken.
 

 

I ran the script, nothing is displayed in the task bar, and Win+Q doesn't work either ?



rbrtryn
  • Members
  • 1177 posts
  • Last active: Sep 11 2013 08:04 PM
  • Joined: 22 Jun 2011

I believe you are mistaken.

 

Well, could be. I don't remember creating it manually, but that was a lot of beer ago happy.png


My Scripts are written for the latest released version of AutoHotkey.

Need a secure, accessible place to backup your stuff? Use Dropbox!


Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

FusionFire, please change EnableTrayIcon = 0 to EnableTrayIcon = 1 and try again.



FusionFire
  • Members
  • 153 posts
  • Last active: Jan 24 2016 06:48 AM
  • Joined: 02 Dec 2011

FusionFire, please change EnableTrayIcon = 0 to EnableTrayIcon = 1 and try again.


I changed 'EnableTrayIcon' from 0 to 1.  The script started, sorta, instead of a AHK icon in the task bar, I got a Windows Shield ? And #Q didn't start the script either.



Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

Try changing the hotkey.

 

Click the shield icon. What happens?

 

The script started, sorta, instead of a AHK icon in the task bar, I got a Windows Shield ?

Is that a question?  I can't tell you what happened; I wasn't there.  I can tell you that AHKControl uses an arbitrary (shield) icon so that you can differentiate it from other scripts that may appear in the tray.  You can change it by altering IconFile and IconNumber (read the script).



FusionFire
  • Members
  • 153 posts
  • Last active: Jan 24 2016 06:48 AM
  • Joined: 02 Dec 2011

Try changing the hotkey.

 

Click the shield icon. What happens?

 

 

Is that a question?  I can't tell you what happened; I wasn't there.  I can tell you that AHKControl uses an arbitrary (shield) icon so that you can differentiate it from other scripts that may appear in the tray.  You can change it by altering IconFile and IconNumber (read the script).

 

When I click on the shield, nothing happens.  Altering the IconFile & IconNumber doesn't solve the problem.  I changed the script from #q to #p, because another script uses #q.  Even after changing the hotkey, the script does not execute ? 



Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

When I click on the shield, nothing happens.

 

It seems to me that you must be doing something wrong, but I have no idea what.

 

Altering the IconFile & IconNumber doesn't solve the problem.

 

Obviously.  Like I said, those two variables let you change the icon (purely a visual thing).

 

  Even after changing the hotkey, the script does not execute ? 

 

Did you reload the script?  If not, any changes you make will have no effect.



FusionFire
  • Members
  • 153 posts
  • Last active: Jan 24 2016 06:48 AM
  • Joined: 02 Dec 2011

It seems to me that you must be doing something wrong, but I have no idea what.

 

 

Obviously.  Like I said, those two variables let you change the icon (purely a visual thing).

 

 

Did you reload the script?  If not, any changes you make will have no effect.

 

I re-loaded the script three times, I even restarted my machine, not because of AHK another system change.  I changed the hotkey for it, nothing is working, driving me mad.  angry.png