How to troubleshoot ahk 1.0+ script errors running on ahk 1.1+

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
TotalBalance
Posts: 27
Joined: 21 Oct 2014, 17:18

How to troubleshoot ahk 1.0+ script errors running on ahk 1.1+

18 Jun 2015, 14:00

Is there an easy way to fix 1.0+ script error messages when running under ahk 1.1+?
Specifically, I wrote a script way back when that still runs fine under ahk 1.0+. It errors out when running under ahk 1.1+

I've attached a screen capture of the error msg. I'm guessing it's a syntax issue that worked with 1.0+ but not longer with 1.1+.
Any suggestions how to fix?

Here's the complete code for the script: "WorkBeakTimer" (for details on what it does http://www.autohotkey.com/board/topic/2 ... ure-v-300/)

The updated script for AHK 1.1+ has been posted to this forum here:
http://ahkscript.org/boards/viewtopic.php?f=6&t=8364
Attachments
WBT error msg.jpg
Last edited by TotalBalance on 20 Jun 2015, 08:19, edited 3 times in total.
User avatar
rommmcek
Posts: 1475
Joined: 15 Aug 2014, 15:18

Re: How to troubleshoot ahk 1.0+ script errors running on ahk 1.1+

18 Jun 2015, 14:50

Hi,

Try this in Line 517

Code: Select all

Menu, Tray, Icon,, %A_ScriptDir%\images\clock_edit.ico, IconNumber, 1
However I get further problem:
Attachments
Load error.png
Load error.png (4.78 KiB) Viewed 1962 times
guest3456
Posts: 3463
Joined: 09 Oct 2013, 10:31

Re: How to troubleshoot ahk 1.0+ script errors running on ahk 1.1+

18 Jun 2015, 14:58

i use WorkBreak timer too, and i just run it under AHK 1.0

Image

lexikos
Posts: 9592
Joined: 30 Sep 2013, 04:07
Contact:

Re: How to troubleshoot ahk 1.0+ script errors running on ahk 1.1+

18 Jun 2015, 21:43

For that particular error, remove IconNumber. :roll:

The usage for changing the tray icon is:

Code: Select all

Menu, Tray, Icon, FileName, IconNumber, 1
FileName and IconNumber are placeholders. You should not use them literally, but replace them with the appropriate value. The last two parameters are optional.

IconNumber should be a number or %variable% containing a number. In v1.0.48.05, literally using IconNumber is an error, but it is not detected. If it is non-numeric in later versions, it will not change the tray icon but instead will try to change the icon of a menu item (this is a feature v1.0.48.05 does not support). The usage for changing menu item icons is:

Code: Select all

Menu, MenuName, Icon, MenuItemName, FileName, IconNumber, IconWidth
The last two parameters are optional.
TotalBalance
Posts: 27
Joined: 21 Oct 2014, 17:18

Re: How to troubleshoot ahk 1.0+ script errors running on ahk 1.1+

19 Jun 2015, 09:58

Thanks lexikos. removing IconNumber did the trick without any other changes needed to run the script runs on 1.1+ More important, I can now work on some updates and changes under the 1.1+ environment :-)
User avatar
rommmcek
Posts: 1475
Joined: 15 Aug 2014, 15:18

Re: How to troubleshoot ahk 1.0+ script errors running on ahk 1.1+

19 Jun 2015, 23:56

Oh, oh..

Totally misplaced comment of mine at Thu Jun 18, 2015 2:50 pm. I just mixed it up with some of my different issue and was to hasty not really checking what I suggested!

Shame on me!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: songdg and 296 guests