Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

TrayMenu


  • Please log in to reply
55 replies to this topic

#1 Holger

Holger

    AutoIt Spammer

  • Developers
  • 1,384 posts

Posted 06 October 2004 - 09:12 PM

@Jon/jpm: did you start something on a new traymenu/icon?

@all:
Yeah, cause we already have a function TrayTip why we don't create additional functions like:

TrayCreateMenu() -> only 1 time can it be called with maybe one mode to choose if you wanna keep the autoit3-menu (with 'Pause' and 'Exit')
TrayAddMenu() -> for adding root and submenus
TrayAddMenuItem()
TraySetIcon() -> to set the trayicon
TraySetClick() -> to set the behaviour for i.e. left-click, leftdoubleclick, rightclick...

Maybe you have another ideas for this stuff :)
So post it please :)
Thanks and regards
Holger







#2 Josbe

Josbe

    Infrequent ghost ☺

  • Active Members
  • PipPipPipPipPipPip
  • 1,585 posts

Posted 06 October 2004 - 10:36 PM

Fine ideas. Maybe, a function or improve something, to know if a GUI window it is minimized in Tray mode or taskbar? :)

#3 Holger

Holger

    AutoIt Spammer

  • Developers
  • 1,384 posts

Posted 06 October 2004 - 11:04 PM

@josbe: hmmm... I don't know...for what do you need this info?
Holger

#4 CyberSlug

CyberSlug

    Overwhelmed with work....

  • MVPs
  • 3,587 posts

Posted 06 October 2004 - 11:20 PM

TraySetToolTip?
TrayIconSetState? though we do already have Opt("TrayIconHide", $x)
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

#5 Josbe

Josbe

    Infrequent ghost ☺

  • Active Members
  • PipPipPipPipPipPip
  • 1,585 posts

Posted 07 October 2004 - 02:45 AM

@josbe: hmmm... I don't know...for what do you need this info?
Holger

<{POST_SNAPBACK}>

Ok, here a case:
I have a GUI's window and then I minimize it to the tray, while, that window waits for certain event (a message box or something external) and depending its state it will do something.
For example if it's in the tray, it will show a balloon(TrayToolTip)...


(I don't sure if my explanation it's clear.) :)

#6 trids

trids

    Hmmm .. and what have we here?

  • Active Members
  • PipPipPipPipPipPip
  • 1,004 posts

Posted 07 October 2004 - 06:41 AM

Here are some more ideas ..
Tray Icon Interface (menu & Drag'n'Drop)

And there's some work currently taking place as we speak ..
Developing v3.0.103 unstable

:)

#7 SlimShady

SlimShady

    AutoIt lover

  • Active Members
  • PipPipPipPipPipPip
  • 2,383 posts

Posted 07 October 2004 - 07:39 AM

Ok, here a case:
I have a GUI's window and then I minimize it to the tray, while, that window waits for certain event (a message box or something external) and depending its state it will do  something.
For example if it's in the tray, it will show a balloon(TrayToolTip)...


(I don't sure if my explanation it's clear.)  :)

<{POST_SNAPBACK}>

Definitely. I understand what you're saying and I would like to see it too.

#8 Lazycat

Lazycat

    Coding cat

  • MVPs
  • 1,174 posts

Posted 08 October 2004 - 06:19 AM

TraySetClick() -> to set the behaviour for i.e. left-click, leftdoubleclick, rightclick...


TraySetClick() - it will be some sort of callback function or just attach event to controlid of root element? I think callback will be more flexible.
Koda homepage (http://www.autoitscript.com/fileman/users/lookfar/formdesign.html) (Bug Tracker)My Autoit script page (http://www.autoitscript.com/fileman/users/Lazycat/)

#9 Holger

Holger

    AutoIt Spammer

  • Developers
  • 1,384 posts

Posted 08 October 2004 - 10:58 AM

@all: thanks for answers:)
At the moment I'm collecting some ideas for doing that thing.
Maybe I find time tomorrow to try something out.
What my idea was a more traymenu that you could without using the GUI but now I think I will start again first with only for the GUI.
Like Jon said, one script can only have 1 trayicon/menu.
With the state i.e. "SW_TRAY" I have to take a look.
So long :)
Holger

Yeah, maybe traysetclick is not needed but somehow we have to set the action for a mouseclick on the trayicon.

#10 SlimShady

SlimShady

    AutoIt lover

  • Active Members
  • PipPipPipPipPipPip
  • 2,383 posts

Posted 08 October 2004 - 11:55 AM

I would say make a function "TrayMsg" like GUIGetMsg.
That function returns 0 when not clicked else:
1 = left click (once)
2 = left click (double)
3 = rightclick
4 >= clicked on an item in the tray menu

#11 Holger

Holger

    AutoIt Spammer

  • Developers
  • 1,384 posts

Posted 08 October 2004 - 01:12 PM

@SlimShady: I don't know, cause GUIGetMsg() should do the same.
i.e. instead of the controlid if would return the id of the traymenu...

#12 SlimShady

SlimShady

    AutoIt lover

  • Active Members
  • PipPipPipPipPipPip
  • 2,383 posts

Posted 08 October 2004 - 01:14 PM

@SlimShady: I don't know, cause GUIGetMsg() should do the same.
i.e. instead of the controlid if would return the id of the traymenu...

<{POST_SNAPBACK}>

And how would we know which item has been clicked on?

#13 Holger

Holger

    AutoIt Spammer

  • Developers
  • 1,384 posts

Posted 08 October 2004 - 02:05 PM

@SlimShady: like with normal menuitems :)
Only the 'rootmenu' is different to the 'normal' menu.
So the create and msg-functions are the same like:
... $traymenu = GUICtrlCreateTraymenu() $trayitem = GUICtrlCreateMenuitem("Info",$traymenu) ... While 1    $msg = GUIGetMsg()    If $msg = $trayitem Then... WEnd ...


#14 Holger

Holger

    AutoIt Spammer

  • Developers
  • 1,384 posts

Posted 10 October 2004 - 01:38 AM

Made 3 more functions:
TrayIcon( [iconfile [, iconid]] ) -> without parameters reset to default application icon
TrayFlash([mode]) -> 0 = flashing off, other (default) = flashing on
TrayTipText( [tooltiptext] ) -> will only set if debug mode is off, without parameters reset to default tooltiptext

The commands mean that you can use them without having any GUI.

With the traymenu I think they have to be together with a gui, otherwise we need more new commands like i.e.:
- TrayCreateMenu()
- TrayCreateMenuItem(...)
- TrayDeleteMenuItem(...)
- TraySetMenuItemState(...)
...
But this I don't like ;)
For the traymenu I will take a look later...have to go sleep now :)
Maybe we will use another mode for docking your own menu to the AutoitDefault-Menu or to overwrite it/to show only yours...
TrayMenuMode(option)
option:
0 = append your menu(items) (default)
1 = create your own traymenu (the default menuitems are not shown)

we will see

So long and good night :)
Holger
P.S. forgot: at the moment I hate the 'oneclicking' methode to see the traymenu :D, so I think we need one click/mouse-option to choose what happens when you click at the icon...

Edited by Holger, 10 October 2004 - 01:40 AM.


#15 CyberSlug

CyberSlug

    Overwhelmed with work....

  • MVPs
  • 3,587 posts

Posted 10 October 2004 - 02:48 AM

P.S. forgot: at the moment I hate the 'oneclicking' methode to see the traymenu :), so I think we need one click/mouse-option to choose what happens when you click at the icon...

<{POST_SNAPBACK}>

I fully agree!
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

#16 jpm

jpm

    a Real GUI/debug lover

  • Developers
  • 9,550 posts

Posted 10 October 2004 - 06:51 AM

I fully agree!

<{POST_SNAPBACK}>

I am not sure I agree because the oneclick is very good to stop a looping script which is important. I let JON to decide how to solve this issue :)

#17 Holger

Holger

    AutoIt Spammer

  • Developers
  • 1,384 posts

Posted 10 October 2004 - 07:00 PM

@JP: I don't see the current mouseclicking-behaviour as an issue :)
But I would like to choose the clicking-behaviour (i.e. if I don't use the default autoit-traymenu)...
Regards Holger
P.S. I will try the menu things during the week cause it's too late for today and I had no time for doing something you know :)

#18 Holger

Holger

    AutoIt Spammer

  • Developers
  • 1,384 posts

Posted 10 October 2004 - 10:20 PM

Added another function where you can choose for which mousebuttonclicks the traymenu is shown:
TrayClick( [click])
possible clicks:
1 - Left Button Down (default Autoit-behaviour)
2 - Left Button Up -> release the mouse button after first clicking
4 - Left Button DoubleClick
8 - Right Button Down (default Autoit-behaviour)
16 - Right Button Up -> release the mouse button after first clicking (my default mode :) ;) )
32 - Right Button DoubleClick

No parameter ( TrayClick() ) will reset the behaviour to the default Autoit setting.

You can combine modes, i.e.
TrayClick(20) -> means LeftButtonDoubleClick and RightButtonDown will show the traymenu.

You have to know: these are all some ideas from me.
Do you have an suggestions or ideas to this then post it please :)

Thanks and regards
Holger

Edited by Holger, 10 October 2004 - 10:32 PM.


#19 this-is-me

this-is-me

    Pursuer of obscure functionality

  • Active Members
  • PipPipPipPipPipPip
  • 2,466 posts

Posted 10 October 2004 - 11:50 PM

Wonderful. Could there be a mouseover and mouseout? I have seen that it can be done, but takes a little more effort than the others.
Who else would I be?

#20 Holger

Holger

    AutoIt Spammer

  • Developers
  • 1,384 posts

Posted 11 October 2004 - 12:19 AM

@this-is-me: the function is onmly to set the click for _showing_ the menu!
Why you need a "mouseout" thing?
Can't really understand what you mean...
Can you explain it a little bit what you want to do with it?
Thanks :)
Holger
The "mouseover" should be no problem -> WM_MOUSEMOVE should do the thing...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users