Holger Posted July 28, 2007 Author Posted July 28, 2007 (edited) Update 28.07.2007- Fixed: wrong call of function CreateFont()- Changed: included samples to demonstrate using of icon clicksThanks to you SleepyExtreme, this was again a merging error (hopefully this was the last one) Greets Holger Edited July 28, 2007 by Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
SleepyXtreme Posted July 29, 2007 Posted July 29, 2007 (edited) new problem: Func TrayedWindows($tID, $tMsg) for $x = 1 to $trayCounter $windowtitlefortray = IniRead(@ScriptDir & "\Emergency Windows.ini", "Open Window List", $x, "NotFound") Switch $tID Case $nTrayIcon[$x] Switch $tMsg Case $WM_LBUTTONDOWN WinSetState(HWnd($windowtitlefortray),"",@SW_SHOW) WinActivate(HWnd($windowtitlefortray), "") _TrayIconDelete($nTrayIcon[$x]) EndSwitch EndSwitch Next EndFunc Obfuscator screws this up so it doesn't work. I've narrowed the problem down to this section of my script. Obfuscator says: >### current Func: TrayNotifyIcon ModernMenu.au3(316,1) Warning for line:Call($TRAYNOTIFYIDS[$nID][4], $nID, $lParam) Edited July 29, 2007 by SleepyXtreme
Holger Posted July 29, 2007 Author Posted July 29, 2007 OK, but there is no problem in the line. I can't see anything. So it must be a problem of this 'Obfuscator' whoever it wrote. I have no idea why it shows a warning for this line... So long. Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
SleepyXtreme Posted July 29, 2007 Posted July 29, 2007 damn, if i can't obfuscate my script i can't use this ppl will steal my code!
Holger Posted August 3, 2007 Author Posted August 3, 2007 Update 03.08.2007- Fixed: error in _TrayIconDelete() and new icon creation- Added: additional parameter to _TrayIconCreate(ToolTip, IconFile, IconID, Callback, Msg, hIcon) to use existing icon handlesI added also the sample_Win2Tray: 'moves' all minimized windows to the trayOk, there are maybe some better ways to do this and it's not really finished but maybe it will help you do to/understand some things Please see the 1st post.So long...Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
Sunaj Posted August 7, 2007 Posted August 7, 2007 (edited) Heh, you are really rolling with this lib - hope it'll be considered for inclusion in the AutoIt package once it has stabilized completely! Talking standards, I recently noticed that my accelerator keys in the menu's don't work any longer once they are owner drawn - would it be possible to rectify this? Here's the an example line of how one could allow "1-9" to activate the various items in the menu once it has been opened:_GUICtrlODMenuItemSetText($hOption, "&" & "1" & ". " & "Options")The "&" item activates the accel.key behavior in the normal AutoIt menu (found out by accident, don't know whether it is mentioned in docs anywhere) but only underlines the item once the menu is drawn with "GUI/Tray Menu".Regards,SunajEdit: typoUpdate 03.08.2007- Fixed: error in _TrayIconDelete() and new icon creation- Added: additional parameter to _TrayIconCreate(ToolTip, IconFile, IconID, Callback, Msg, hIcon) to use existing icon handlesI added also the sample_Win2Tray: 'moves' all minimized windows to the trayOk, there are maybe some better ways to do this and it's not really finished but maybe it will help you do to/understand some things Please see the 1st post.So long...Holger Edited August 7, 2007 by Sunaj [list=1][*]Generic way to detect full path to default browser, List/ListView Events Using GuiRegisterMsg (detect doubleclick and much more)[*]Using dllcall for full control over fileopendialog, Make DirMove act somewhat normally (by circumventing it...)[*]Avoid problems with "&" (chr(38)) in code, Change desktop maximized area/workspace (fx to make deskbar type app)[*]Change focus behavior when buttons are clicked to work closer to 'standard windows' app[*](Context) Menus With Timed Tooltips, Fast Loops & Operators in AU3[*]Clipboard UDF, A clipboard change notification udf[/list]
MISIIM Posted August 17, 2007 Posted August 17, 2007 It doesn't like the Tab character. They are displayed as "".
Holger Posted August 17, 2007 Author Posted August 17, 2007 Yeah, this is a missing feature. Real accelarators are/were never buildin Autoit (I mean no HotKeys) so I also didn't check for them. I will check the next days in my very old C++ source (which was a Test-Autoit) how I implemented the check for Tabs. I think it will be just some StringSplit-ting, some modifications to the text width calculation and an additional DrawText() for the accel. string... Greets Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
GoogleDude Posted September 14, 2007 Posted September 14, 2007 (edited) Can I use TrayItemDelete to remove a Menu Item that was created with _TrayCreateItem? Or is there a _TrayItemDelete? By the way, Nice UDF, I dig it. I will even dig it more when I get my script migrated over to use it. I put a sample/test below! Am I missing something? Im sure I am. #NoTrayIcon #Include <Constants.au3> #include <GUIConstants.au3> #include 'ModernMenu.au3' Global $var1 Global $var2 $TrayIcon = _TrayIconCreate ("Test Tray Icon", "shell32.dll", 8) _TrayItemSetIcon (-1, "shell32.dll", 8) $TestMenu = _TrayCreateMenu (-1, "Test Menu") $var1 = _TrayCreateItem (-1, 'This should be deleted!', $TestMenu, -1) MsgBox(1024,"","") TrayItemDelete($var1) $var2 = _TrayCreateItem (-1, 'This should not be deleted!', $TestMenu, -1) MsgBox(1024,"","") TrayItemDelete($var2) _TrayIconDelete ($TrayIcon) Exit GoogleDude? Edited September 14, 2007 by GoogleDude
sandman Posted October 6, 2007 Posted October 6, 2007 (edited) @Holger: How did you get those unicode characters in your tray menu screenshot?? (the first post here) Edited October 6, 2007 by sandman [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]
Holger Posted December 7, 2007 Author Posted December 7, 2007 Update 07.12.2007- Fixed: now works with 3.2.10.0 and 3.2.8.1- Changed: all stuff in only 1 ZIP filePlease see the 1st post for new file.GreetsHolger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
GEOSoft Posted December 7, 2007 Posted December 7, 2007 Update 07.12.2007- Fixed: now works with 3.2.10.0 and 3.2.8.1- Changed: all stuff in only 1 ZIP filePlease see the 1st post for new file.GreetsHolgerThanks Holger;Good to see you around again. I mean posting as Holger George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
MrCreatoR Posted January 10, 2008 Posted January 10, 2008 Hi Holger,I have one small problem - it seems that we can not set text for menu item with tabs characters...I would like to set an item to display hotkey at the right side of menu item, but tab is ignored:_GUICtrlCreateODMenuitem("My Item " & @TAB & "(F1)", $Menu)Is there any way to fix it?Thanks. Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
GEOSoft Posted January 10, 2008 Posted January 10, 2008 Hi Holger, I have one small problem - it seems that we can not set text for menu item with tabs characters... I would like to set an item to display hotkey at the right side of menu item, but tab is ignored: _GUICtrlCreateODMenuitem("My Item " & @TAB & "(F1)", $Menu) Is there any way to fix it? Thanks.Have you tried _GUICtrlCreateODMenuitem("My Item" & Chr(32) & Chr(9) & "(F1)", $Menu) Not sure if tabs are even allowed on menu items but I would think they are. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
MrCreatoR Posted January 10, 2008 Posted January 10, 2008 Have you triedNo, thanks, but it's not working eather Not sure if tabs are even allowed on menu itemsSure they do ... see this example: #include <GuiConstants.au3> $GUI = GUICreate("Test Script", 300, 200) $Menu = GUICtrlCreateMenu("Menu") GUICtrlCreateMenuItem("Menu Item 1" & @TAB & "(F1)", $Menu) GUICtrlCreateMenuItem("Menu Item 2" & @TAB & "(F2)", $Menu) GUICtrlCreateMenuItem("Menu Item 3" & @TAB & "(F3)", $Menu) GUICtrlCreateMenuItem("Menu Item 4 with long text" & @TAB & "(F4)", $Menu) GUISetState(@SW_SHOW, $GUI) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd As you can see, all hotkey values are tabbed (aligen) to the right, even if one text item is longer then the others. I can not do the same with menu items in ModernMenu.au3 Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
MrCreatoR Posted January 11, 2008 Posted January 11, 2008 Any one? I guess it something inside the drawing item functions, but i have no idea where to look, they all connected, and there is so many of them ... Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
Holger Posted January 11, 2008 Author Posted January 11, 2008 Update 12.01.2008:- Changed: 'local' Dll calls to global DllOpen to speedup (some virusscanners sometimes slowdown the process cause of opening these Dll's again and again)- Added: Using of @Tab for accelerator showing/drawingIf there are any problems (cause maybe of the internal changes) just please let me know.GreetsHolger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
GEOSoft Posted January 12, 2008 Posted January 12, 2008 Update 12.01.2008:- Changed: 'local' Dll calls to global DllOpen to speedup (some virusscanners sometimes slowdown the process cause of opening these Dll's again and again)- Added: Using of @Tab for accelerator showing/drawingIf there are any problems (cause maybe of the internal changes) just please let me know.GreetsHolgerNicely done Holger. I knew we could count on you. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
MrCreatoR Posted January 12, 2008 Posted January 12, 2008 HolgerThank you very much! it was quicker then i thouth it would Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
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