PlayHD Posted March 18, 2012 Share Posted March 18, 2012 Hy..I have a problem...I want to add to my tray items one icon each of themlike :ps. sorry for my englishThanks in advance... My UDF : _WinShake, _WinSplitMy Apps : Google Guitar Bot, PuzzleGameDesign Gui : Interesting Tabs Design, RBox Project (abandoned), Animated Gui on Exit Link to comment Share on other sites More sharing options...
Developers Jos Posted March 18, 2012 Developers Share Posted March 18, 2012 something to read on this topic: SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
PlayHD Posted March 18, 2012 Author Share Posted March 18, 2012 I already try it with this but i got some errors ... expandcollapse popupC:\Users\PlayHD\Desktop\useles\neterminate\desktop_loc\ModernMenuRaw.au3(122,81) : ERROR: $IDI_APPLICATION previously declared as a 'Const'. If Not IsDeclared("IDI_APPLICATION") Then Global Const $IDI_APPLICATION = 32512 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\PlayHD\Desktop\useles\neterminate\desktop_loc\ModernMenuRaw.au3(123,69) : ERROR: $IDI_HAND previously declared as a 'Const'. If Not IsDeclared("IDI_HAND") Then Global Const $IDI_HAND = 32513 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\PlayHD\Desktop\useles\neterminate\desktop_loc\ModernMenuRaw.au3(124,76) : ERROR: $IDI_QUESTION previously declared as a 'Const'. If Not IsDeclared("IDI_QUESTION") Then Global Const $IDI_QUESTION = 32514 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\PlayHD\Desktop\useles\neterminate\desktop_loc\ModernMenuRaw.au3(125,81) : ERROR: $IDI_EXCLAMATION previously declared as a 'Const'. If Not IsDeclared("IDI_EXCLAMATION") Then Global Const $IDI_EXCLAMATION = 32515 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\PlayHD\Desktop\useles\neterminate\desktop_loc\ModernMenuRaw.au3(126,76) : ERROR: $IDI_ASTERISK previously declared as a 'Const'. If Not IsDeclared("IDI_ASTERISK") Then Global Const $IDI_ASTERISK = 32516 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\PlayHD\Desktop\useles\neterminate\desktop_loc\ModernMenuRaw.au3(127,74) : ERROR: $IDI_WINLOGO previously declared as a 'Const'. If Not IsDeclared("IDI_WINLOGO") Then Global Const $IDI_WINLOGO = 32517 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\PlayHD\Desktop\useles\neterminate\desktop_loc\ModernMenuRaw.au3(133,77) : ERROR: $WM_MOUSEMOVE previously declared as a 'Const'. If Not IsDeclared("WM_MOUSEMOVE") Then Global Const $WM_MOUSEMOVE = 0x0200 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\PlayHD\Desktop\useles\neterminate\desktop_loc\ModernMenuRaw.au3(134,81) : ERROR: $WM_LBUTTONDOWN previously declared as a 'Const'. If Not IsDeclared("WM_LBUTTONDOWN") Then Global Const $WM_LBUTTONDOWN = 0x0201 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\PlayHD\Desktop\useles\neterminate\desktop_loc\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\PlayHD\Desktop\useles\neterminate\desktop_loc\ModernMenuRaw.au3(136,84) : ERROR: $WM_LBUTTONDBLCLK previously declared as a 'Const'. If Not IsDeclared("WM_LBUTTONDBLCLK") Then Global Const $WM_LBUTTONDBLCLK = 0x0203 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\PlayHD\Desktop\useles\neterminate\desktop_loc\ModernMenuRaw.au3(137,81) : ERROR: $WM_RBUTTONDOWN previously declared as a 'Const'. If Not IsDeclared("WM_RBUTTONDOWN") Then Global Const $WM_RBUTTONDOWN = 0x0204 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\PlayHD\Desktop\useles\neterminate\desktop_loc\ModernMenuRaw.au3(138,77) : ERROR: $WM_RBUTTONUP previously declared as a 'Const'. If Not IsDeclared("WM_RBUTTONUP") Then Global Const $WM_RBUTTONUP = 0x0205 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\PlayHD\Desktop\useles\neterminate\desktop_loc\ModernMenuRaw.au3(139,84) : ERROR: $WM_RBUTTONDBLCLK previously declared as a 'Const'. If Not IsDeclared("WM_RBUTTONDBLCLK") Then Global Const $WM_RBUTTONDBLCLK = 0x0206 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\PlayHD\Desktop\useles\neterminate\desktop_loc\ModernMenuRaw.au3(140,81) : ERROR: $WM_MBUTTONDOWN previously declared as a 'Const'. If Not IsDeclared("WM_MBUTTONDOWN") Then Global Const $WM_MBUTTONDOWN = 0x0207 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\PlayHD\Desktop\useles\neterminate\desktop_loc\ModernMenuRaw.au3(141,77) : ERROR: $WM_MBUTTONUP previously declared as a 'Const'. If Not IsDeclared("WM_MBUTTONUP") Then Global Const $WM_MBUTTONUP = 0x0208 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\PlayHD\Desktop\useles\neterminate\desktop_loc\ModernMenuRaw.au3(142,84) : ERROR: $WM_MBUTTONDBLCLK previously declared as a 'Const'. If Not IsDeclared("WM_MBUTTONDBLCLK") Then Global Const $WM_MBUTTONDBLCLK = 0x0209 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ $nTrayIcon1 = _TrayIconCreate("DL", "shell32.dll", -13) _TrayIconSetClick(-1, 16) _TrayIconSetState() $nTrayMenu1 = _TrayCreateContextMenu() Global $tray_hide = _TrayCreateItem("Hide") _TrayItemSetIcon(-1,"ico\lock.ico") Global $tray_setting = _TrayCreateItem("Settings") _TrayItemSetIcon(-1,"ico\set.ico") _TrayCreateItem("") Global $tray_exit = _TrayCreateItem("Exit") _TrayItemSetIcon(-1,"ico\x.ico") if need i post all script... My UDF : _WinShake, _WinSplitMy Apps : Google Guitar Bot, PuzzleGameDesign Gui : Interesting Tabs Design, RBox Project (abandoned), Animated Gui on Exit Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted March 18, 2012 Share Posted March 18, 2012 (edited) Modernmenuraw.au3 was made for old versions of AutoIt and thats why you are getting the errorssimple search for the declared variable in Modernmenuraw.au3 which is causing the error and place a ; before itExample -> $IDI_APPLICATION change into ;$IDI_APPLICATIONThis will solve your problem.Tip 1 -> Please remember to kill the tray when exiting the programTip 2 -> Create the tray icon before creating the GUITip 3 -> This tray uses the GUI command instead of Tray commands$nTrayIcon1 = _TrayIconCreate("Title", @ScriptName, 0) _TrayIconSetState() ; Show the tray icon $nTrayMenu1 = _TrayCreateContextMenu() ;This one must exist $Tray1 = _TrayCreateItem("Tray1) _TrayItemSetIcon(-1, @ScriptName, -1) $Tray2 = _TrayCreateItem("Tray2") _TrayItemSetIcon(-1, @ScriptName, -2) Func _Terminate () _TrayIconDelete($nTrayIcon1) ; First trayicon OnAutoItExit() ; Second trayicon Exit EndFunc Edited March 18, 2012 by Emiel Wieldraaijer Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
PlayHD Posted March 18, 2012 Author Share Posted March 18, 2012 (edited) thanks Emiel... but i still have a problemautoit icon remaini already try it with#NoTrayIconorOpt("TrayIconHide",1)Problem solved i forgot TraySetState() Thanks again all ... Edited March 18, 2012 by PlayHD My UDF : _WinShake, _WinSplitMy Apps : Google Guitar Bot, PuzzleGameDesign Gui : Interesting Tabs Design, RBox Project (abandoned), Animated Gui on Exit Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted March 18, 2012 Share Posted March 18, 2012 glad i could help Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
Yashied Posted March 19, 2012 Share Posted March 19, 2012 If you are using Windows Vista+, you can use _WinAPI_Create32BitHBITMAP() from See example for this function. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted March 19, 2012 Share Posted March 19, 2012 If you are using Windows Vista+, you can use _WinAPI_Create32BitHBITMAP() from See example for this function.Yes ... WinAPIEX UDF a master piece.. Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now