AutoHotkey Community

It is currently May 27th, 2012, 11:18 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: April 11th, 2006, 12:53 pm 
Offline

Joined: April 11th, 2006, 11:46 am
Posts: 10
Location: The Netherlands
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 :?:

_________________
Winkie


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 11th, 2006, 2:53 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 11th, 2006, 4:41 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
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. :-) Just found out the last one...

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 11th, 2006, 10:42 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Thanks for researching it. I'll apply your findings to the next release.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: ScreenSavers
PostPosted: April 17th, 2006, 6:33 pm 
Offline

Joined: July 30th, 2004, 8:50 pm
Posts: 192
The same goes for .scr files, that is ScreenSavers.

Skrommel

_________________
www.1HourSoftware.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 17th, 2006, 9:47 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 26th, 2006, 8:19 am 
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
---------------------------


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 26th, 2006, 8:45 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
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.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 3rd, 2006, 9:50 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 4th, 2006, 3:20 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
This will be fixed in the next release. Thanks for reporting it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 14th, 2006, 6:46 pm 
Offline

Joined: June 11th, 2005, 9:34 am
Posts: 264
Location: England ish
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..

_________________
::
I Have Spoken
::


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group