Jump to content

Tray <> Icon


Acanis
 Share

Recommended Posts

Hey guys!

Iam new, so just learning it and I try to make my first bigger Script with a GUI and so on.

I created me a Icon and a Tray-Icon. By trying to compile my script, I noticed, that AutoIt is using the same icon for Icon and Tray-Icon.

So I uses google and i found: http://www.autoitscript.com/forum/index.php?showtopic=20967&st=0

With this UDF was it possible to seperate the both types of icons.

BUT it isnt working properly...

#include <ModernMenuRaw.au3>
#NoTrayIcon
_TrayIconCreate("Bot V 1.0 - ©Acanis", @ScriptDir & "/tray.ico")
_TrayIconSetState()

I used this code in my Script and get the following error-message:

C:\Program Files\AutoIt3\Include\ModernMenuRaw.au3(133,77) : ERROR: $WM_MOUSEMOVE previously declared as a 'Const'
If Not IsDeclared("WM_MOUSEMOVE")           Then Global Const $WM_MOUSEMOVE = 0x0200
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\ModernMenuRaw.au3(135,77) : ERROR: $WM_LBUTTONUP previously declared as a 'Const'
If Not IsDeclared("WM_LBUTTONUP")           Then Global Const $WM_LBUTTONUP = 0x0202
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\Acanis\Desktop\AutoIT\***\***.au3 - 2 error(s), 0 warning(s)
!>18:48:09 AU3Check ended.rc:2

So its maybe a fault in the UDF? But with the example script its working fine. Iam a little confused... The fault directs me to the UDF, right?

But I couldnt finde something in the UDF, what matches the error message...

Please help me here...

Thank you, guys.

And Iam sorry, if my english is not so fine... :D

Regards,

Acanis

Link to comment
Share on other sites

You can use multiple icons with standard AutoIT-functions.

First you have the exe-Icon wich is always used for the exe-file and MsgBoxes. If you don't specify different icons, each GUI and the Tray get this Icon, too. To change GUI and Tray-Icons, there are two functions available:

TraySetIcon
GUISetIcon

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...