Jump to content

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

icon doesn't appear on the tray after compiling


  • Please log in to reply
16 replies to this topic
Benny-D
  • Members
  • 1485 posts
  • Last active: Sep 27 2016 11:23 PM
  • Joined: 29 Feb 2008
I have compiled my script with Ahk2Exe and an icon chosen from this open gallery of icons,
but when I ran it, I discovered that the icon doesn't appear on the tray. Any ideas why it
does not appear there? I didn't use #NoTrayIcon directive anywhere in my script.

john tuomi
  • Members
  • 150 posts
  • Last active: Dec 08 2011 06:38 PM
  • Joined: 22 May 2006
It the hotkey called from within another script? I have script that is launched from within another script and exhibits the same behavior.

Benny-D
  • Members
  • 1485 posts
  • Last active: Sep 27 2016 11:23 PM
  • Joined: 29 Feb 2008
Yes, you are right, John.

My script is in the essence is as following this:
fileappend, msgbox`, hello, code.txt
RunWait, %A_AHKPath% %A_ScriptDir%\code.txt
filedelete, code.txt
If it's not compiled, I can see two icons (AHK green letter "H" icon) while it's running. But when it's compiled, only one "H" icon appears (that is when the script is running the code from code.txt file). Why does the first icon (which is not a typical AHK green letter "H" icon, but the one that I chose while compiling) not appear on the tray? There is only an empty space there that is kind of reserved for that icon, but the icon itself doesn't appear. Why not?

Benny-D
  • Members
  • 1485 posts
  • Last active: Sep 27 2016 11:23 PM
  • Joined: 29 Feb 2008
I wonder, could it be because of the of some problems with the .ico file that I have chosen?

Benny-D
  • Members
  • 1485 posts
  • Last active: Sep 27 2016 11:23 PM
  • Joined: 29 Feb 2008
I still don't have any solution here. Is my question that hard? I just don't believe it!

john tuomi
  • Members
  • 150 posts
  • Last active: Dec 08 2011 06:38 PM
  • Joined: 22 May 2006
I think the icon is actually there. Hover your mouse over the blank space directly to the left of the icon in the system tray. If your script is reacting like mine is, you'll have an invisible icon in the system tray.

None
  • Members
  • 3199 posts
  • Last active: Nov 05 2015 09:55 PM
  • Joined: 28 Nov 2009
What happens when you compile it without an icon :?:

Benny-D
  • Members
  • 1485 posts
  • Last active: Sep 27 2016 11:23 PM
  • Joined: 29 Feb 2008

...Hover your mouse over the blank space directly to the left of the icon in the system tray. If your script is reacting like mine is, you'll have an invisible icon in the system tray.

Yes, that's exactly what happens. But I don't want it to be invisible,
I want it visible. What should I do?

Benny-D
  • Members
  • 1485 posts
  • Last active: Sep 27 2016 11:23 PM
  • Joined: 29 Feb 2008

What happens when you compile it without an icon :?:

When I compile this simple code without an icon:
fileappend, msgbox`, hello, code.txt
RunWait, %A_AHKPath% %A_ScriptDir%\code.txt
filedelete, code.txt
I see two typical AHK icons on the tray (by "typical AHK icon"
I mean white letter "H" on the green background). One for the
main code and one for the code that is being run from it (code.txt).

But when I compile it with an icon chosen by me, the first icon
(the one that I have chosen) doesn't show up (though the place
for it is still there on the tray, which means that the icon IS there,
but it's invisible); only the second one (for code.txt), the AHK-typical
one, shows up.

None
  • Members
  • 3199 posts
  • Last active: Nov 05 2015 09:55 PM
  • Joined: 28 Nov 2009
Maybe your icon is bad does is show up if you put it in this script.
Menu, Tray, Icon , %A_ScriptDir%\Apple.ico ;Your actual icon
Esc::ExitApp


Benny-D
  • Members
  • 1485 posts
  • Last active: Sep 27 2016 11:23 PM
  • Joined: 29 Feb 2008

...does it show up if you put it in this script.

Menu, Tray, Icon , %A_ScriptDir%\Apple.ico ;Your actual icon
Esc::ExitApp

Yes, it does!!! I just tried it with your script and saw it! This was the first time I saw
that icon (the one that I had chosen) on the tray!

But why does it not show up with my script?

None
  • Members
  • 3199 posts
  • Last active: Nov 05 2015 09:55 PM
  • Joined: 28 Nov 2009

But why does it not show up with my script?

I have no idea :?

What happens when you try this compiled.
If you keep it this way you will have to keep the icon with your file. :)
Menu, Tray, Icon , %A_ScriptDir%\Apple.ico ;Your actual icon 
fileappend, msgbox`, hello, code.txt 
RunWait, %A_AHKPath% %A_ScriptDir%\code.txt 
filedelete, code.txt


Benny-D
  • Members
  • 1485 posts
  • Last active: Sep 27 2016 11:23 PM
  • Joined: 29 Feb 2008

What happens when you try this compiled?

I am not sure which code here you mean. If you mean this code:
Menu, Tray, Icon , %A_ScriptDir%\Apple.ico ;Your actual icon 
fileappend, msgbox`, hello, code.txt 
RunWait, %A_AHKPath% %A_ScriptDir%\code.txt 
filedelete, code.txt
then when I compile it, everything is fine: I do see the chosen icon on the tray
(that is for the main code) and the AHK-typical icon (that is for code.txt).

But you said:

If you keep it this way you will have to keep the icon with your file. :)

Unfortunately, that's not what I want. I definitely remember once I was able to
compile my script with an icon that I had created myself (in fact, it was a picture
of me and my son) and everything was fine, and I didn't have to always add
that icon to the file, where my script was.

None
  • Members
  • 3199 posts
  • Last active: Nov 05 2015 09:55 PM
  • Joined: 28 Nov 2009
Yep Definatly the icon is the problem.
I Downloaded some and tried them same problem
I opened one of them in Icon editing software and remove all but one of the images (48x48 32 Bit) and it worked. The icon showed up in the tray when compiled.

Benny-D
  • Members
  • 1485 posts
  • Last active: Sep 27 2016 11:23 PM
  • Joined: 29 Feb 2008

I opened one of them in Icon editing software and remove all but one of the images

Which Icon editing software are you using?