AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can't load Icon in 1.0.43.06

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Winkie



Joined: 11 Apr 2006
Posts: 8
Location: The Netherlands

PostPosted: Tue Apr 11, 2006 12:53 pm    Post subject: Can't load Icon in 1.0.43.06 Reply with quote

Hi,

After I updated AHk to version 1.0.43.06 (from 1.0.43.02) it doesn't load this:
Code:
Menu, Tray, Icon, MMSYS.CPL, 1


Strangely the following code in the same script works fine:
Code:
Menu, Tray, Icon, MMSYS.CPL, 40


The problem occurs also in this script. (Icon 40 works fine too)

Since I updated from 1.0.43.02:
Could it be related to the fix of the icon distortion in 1.0.43.03 Question
_________________
Winkie
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Tue Apr 11, 2006 2:53 pm    Post subject: Reply with quote

Yes, this is a bug. The problem is that icon #1 needs to be treated as special to avoid distortion when loading from .ico files. The program uses a list of file extensions to determine which need the less-accurate ExtractIcon method:

.exe
.dll
.icl
.cpl (will be added in next update)

Does anyone know of any other file extensions that can act as standard containers for multiple icons (other than .ico files)?

This will be fixed in the next update. If you need an old version in the meantime, get it from http://www.autohotkey.net/programs/

Thanks.
Back to top
View user's profile Send private message Send e-mail
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Tue Apr 11, 2006 4:41 pm    Post subject: Reply with quote

Chris wrote:
Does anyone know of any other file extensions that can act as standard containers for multiple icons (other than .ico files)?
Lot of EXEs and DLLs files has different extensions, it is the kind of stuff that was exploited by spammers sending virii/trojans with attachments named Spectacular.jpg.scr, hoping the extensions will be still hidden...
Well, googling around, I see an Icon Searcher looking in "DLL, EXE, ICO, ICL, OCX, SCR, CPL, BPL, VBX, DRV" files... And a GConvert one looking also in NIL, RSRC, ICNS files, another in SYS ones... Also saw an IL extension. ICL View supports "ico, icl, exe, dll, scr, ocx, bpl, wlx, wfx, wcx, wdx, cpl, acm"! That's hell...
Two solutions:
1) Just support the most common extensions (at least the official Windows ones), ask to rename the more exotic files.
2) Check the signature of the given file to see if it is an EXE or a DLL.
3) Suppose that when you are given a file in Menu Tray, Icon or similar, it is a suitable file.
Yes, that's three, not two. Smile Just found out the last one...
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Tue Apr 11, 2006 10:42 pm    Post subject: Reply with quote

Thanks for researching it. I'll apply your findings to the next release.
Back to top
View user's profile Send private message Send e-mail
skrommel



Joined: 30 Jul 2004
Posts: 178

PostPosted: Mon Apr 17, 2006 6:33 pm    Post subject: ScreenSavers Reply with quote

The same goes for .scr files, that is ScreenSavers.

Skrommel
_________________
www.1HourSoftware.com
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Mon Apr 17, 2006 9:47 pm    Post subject: Reply with quote

That should have been fixed in v1.0.43.07. If you're using that version or later and it's still a problem, please let me know.

The following file types should now be supported by all icon-capable commands and functions: cpl/scr/drv/ocx/vbx/acm/bpl

Thanks.
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Wed Apr 26, 2006 8:19 am    Post subject: Reply with quote

i keep getting errors as well witht he new update, some icons work while others dont,
i get this error:
is there any specifications that i have to meet with the icons?

---------------------------
EyeOfTheSun.ahk
---------------------------
Error: Can't load icon. The current thread will exit.

Specifically: Resources\Icons\EyeOfTheSunIcon.ico

Line#
048: Else
049: SetTimer,UpTimeTimer,60000,-50
050: }
053: SetTitleMatchMode,2
054: GroupAdd,MediaLot,Winamp
055: GroupAdd,MediaLot,VLC media player
056: GroupAdd,MediaLot,Media player classic
---> 060: Menu,TRAY,Icon,Resources\Icons\EyeOfTheSunIcon.ico
061: Menu,tray,NoStandard
062: Menu,tray,add,&Reload scipt,ReloadScript
063: Menu,tray,add,P&ause Script,PauseScript
064: Menu,tray,add,&Configurations,ShowOptionsGUI
065: Menu,tray,add,&Exit Leos keys,ExitScipt
070: Return
077: Gosub,InitilizeGUI

---------------------------
OK
---------------------------
Back to top
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Wed Apr 26, 2006 8:45 am    Post subject: Reply with quote

It would help to have the icon to see if it is "special".
For example, some people think that renaming a .bmp to .ico is enough to make an icon. Even if Windows can deal with this file in most cases, it may be confused.
I just tested, I get exactly the same error...
If that is the case, use a good image viewer or editor to convert it to real ICO format.
A BMP image starts with two letters: BM. Take a look with an hex editor, or even Notepad.
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
AutoHotkeySC
Guest





PostPosted: Wed May 03, 2006 9:50 pm    Post subject: Reply with quote

Can not load icon1 from AutoHotkeySC.bin. Icon2~7 are ok.
Is it normal?

Menu, Tray, Icon, C:\Program Files\AutoHotkey\Compiler\AutoHotkeySC.bin, 1
msgbox, xxxxxxxxxxxxx
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu May 04, 2006 3:20 am    Post subject: Reply with quote

This will be fixed in the next release. Thanks for reporting it.
Back to top
View user's profile Send private message Send e-mail
TheLeO



Joined: 11 Jun 2005
Posts: 165
Location: England ish

PostPosted: Sun May 14, 2006 6:46 pm    Post subject: Reply with quote

Hey guys,

i think i spotted why some icons load while others don't.

some of the icons i used to run the scipts worked, but others which i *home made* in paint didn't work. I compared them, and the only difference was the "bit depth* in which they where stored at,
I run my display in 32 bit mode, the icons which where in 32 bit worked, but thoses saved in paint where 24 and did-not-work....

i found a way around it,, open the icon,-picture, whatever in "infant view" and resave it as an icon, and voala, it should work.

I hope this is use full...


{Edit}
oh,,PhiLho did find the problem as well...
i dint see what he posted..
_________________
And i say: where there is a problem , there is a solution.(well some where that is.)
::
I Have Spoken
::
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group