elawady Posted May 27, 2009 Posted May 27, 2009 Opt("TrayOnEventMode",1) Opt("TrayMenuMode",1) TraySetClick(16) $trayitem = TrayCreateItem("now") TrayItemSetOnEvent(-1,"autostart") WinWaitActive("","fkdhfsdjs") Func autostart() $msg=TrayItemGetState ( $trayitem ) MsgBox(64,"d",$msg) While 1 Select Case $msg=65 TrayItemSetState ($trayitem,68) Return Case $msg=68 TrayItemSetState ($trayitem,65) Return EndSelect WEnd EndFunc why it cant return unchecked
Developers Jos Posted May 27, 2009 Developers Posted May 27, 2009 up up nah ... lets not be this impatient.Bumping a thread within 24 hours isn;t appreciated around here.Jos 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.
elawady Posted May 27, 2009 Author Posted May 27, 2009 (edited) nah ... lets not be this impatient.Bumping a thread within 24 hours isn;t appreciated around here.Jossorrybut i cant wait for the soli am sorry again Edited May 27, 2009 by elawady
Developers Jos Posted May 27, 2009 Developers Posted May 27, 2009 sorrybut i cant wait for the soli am solWell better be patient because else we will help you to.Anyways, i have no idea what you are asking nor what you are trying to accomplish with this script. 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.
Moderators Melba23 Posted May 27, 2009 Moderators Posted May 27, 2009 elawady,Very interesting problem- thanks for raising it. You get the correct return from TrayItemGetState if the item is not the one being actioned. When used on the actioned item, it always appears to return UNCHECKED - this is slightly modified from the TrayItemSetState example in the Help file:#Include <Constants.au3> #NoTrayIcon Opt("TrayMenuMode",1) ; Default tray menu items (Script Paused/Exit) will not be shown. $chkitem = TrayCreateItem("Check it") TrayCreateItem("") $checkeditem = TrayCreateItem("Checked") TrayCreateItem("") $exititem = TrayCreateItem("Exit") TraySetState() While 1 $msg = TrayGetMsg() Select Case $msg = $chkitem ConsoleWrite("Read Check " & TrayItemGetState($checkeditem) & @CRLF) ConsoleWrite("Read Action " &TrayItemGetState($chkitem) & " This is always 68" & @CRLF) If TrayItemGetState($checkeditem) = $TRAY_ENABLE + $TRAY_CHECKED Then TrayItemSetState($checkeditem, $TRAY_ENABLE + $TRAY_UNCHECKED) TrayItemSetState($chkitem, $TRAY_ENABLE + $TRAY_UNCHECKED) ConsoleWrite("Set Check " & TrayItemGetState($checkeditem) & @CRLF) ConsoleWrite("Set Action " &TrayItemGetState($chkitem) & " But this is not" & @CRLF & @CRLF) Else TrayItemSetState($checkeditem, $TRAY_ENABLE + $TRAY_CHECKED) TrayItemSetState($chkitem, $TRAY_ENABLE + $TRAY_CHECKED) ConsoleWrite("Set Check " & TrayItemGetState($checkeditem) & @CRLF) ConsoleWrite("Set Action " &TrayItemGetState($chkitem) & " But this is not" & @CRLF & @CRLF) EndIf Case $msg = $exititem ExitLoop EndSelect WEndOr am I missing something extremely obvious? :-)M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
PsaltyDS Posted May 27, 2009 Posted May 27, 2009 Opt("TrayOnEventMode",1) Opt("TrayMenuMode",1) TraySetClick(16) $trayitem = TrayCreateItem("now") TrayItemSetOnEvent(-1,"autostart") WinWaitActive("","fkdhfsdjs") Func autostart() $msg=TrayItemGetState ( $trayitem ) MsgBox(64,"d",$msg) While 1 Select Case $msg=65 TrayItemSetState ($trayitem,68) Return Case $msg=68 TrayItemSetState ($trayitem,65) Return EndSelect WEnd EndFunc why it cant return unchecked Change this: Opt("TrayMenuMode", 1 + 2) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Moderators Melba23 Posted May 27, 2009 Moderators Posted May 27, 2009 PsaltyDS, Told you it would be obvious! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Developers Jos Posted May 27, 2009 Developers Posted May 27, 2009 I have to say your interpreters are working well today figuring out what the OPs question was. 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.
Moderators Melba23 Posted May 27, 2009 Moderators Posted May 27, 2009 Jos, And I thought the Dutch were the master linguists in Europe.... ;-) M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
PsaltyDS Posted May 27, 2009 Posted May 27, 2009 I have to say your interpreters are working well today figuring out what the OPs question was. It's the Grandchildren. They force you to re-learn your gibberish from when your own kids where that age. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
elawady Posted May 27, 2009 Author Posted May 27, 2009 Change this: Opt("TrayMenuMode", 1 + 2) thats very easy thankuuuuuuuuuuuuu
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