Custom Query
Results (82 - 84 of 3876)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#379 | No Bug | Tray OnEvents ignored | corz | |
Description |
In the following proof of concept, fire the DoRun() function via the GUI button, the HotKey, or the keyboard modifier, and everything works perfectly; pause, resume, and exit tray menus all work as they should. Pause and resume can be activated multiple times, no problems. Fire DoRun() via the tray, and suddenly all the other tray menu items stop working, and their events buffer and back-up until the entire loop is complete. code.. #include <GUIConstants.au3> #include <Constants.au3> AutoItSetOption("TrayMenuMode", 9) AutoItSetOption("TrayOnEventMode", 1) AutoItSetOption("GUIOnEventMode", 1) global $pause = 0 ; some example stuff to do in the loop.. global $commands[5] = [4, "compact.exe /C /S I:\work\documents\reports\*.log", "compact.exe /U /S I:\work\documents\reports\*.log", _ "compact.exe /C /S I:\work\documents\reports\*.log", "compact.exe /U /S I:\work\documents\reports\*.log"] global $trayrun, $traypause, $trayresume, $trayexit MakeTray() HotKeySet("^r", "HK_DoRun") $gui = GUICreate("My GUI", 200, 40) GUISetOnEvent($GUI_EVENT_CLOSE, "ExitScript") $butt = GUICtrlCreateButton("&Run", 5, 5, 190) GuiCtrlSetOnEvent(-1, "DoRun") GUISetState() while 1 Sleep(10) wend exit func DoRun() $pause = 0 for $i = 1 to $commands[0] ConsoleWrite(".\" & @ScriptName & " (" & @ScriptLineNumber & ") : ==> " & "pause: " & $pause & @LF) while $pause = 1 Sleep(250) wend $return_code = RunWait($commands[$i]) next MsgBox(0, "all done", "all done") endfunc func MakeTray() $trayrun = TrayCreateItem("Run") TrayItemSetOnEvent(-1,"DoRun") TrayCreateItem("") $traypause = TrayCreateItem("Pause") TrayItemSetOnEvent(-1,"DoPause") $trayresume = TrayCreateItem("Resume") TrayItemSetOnEvent(-1,"DoResume") TrayItemSetState(-1, $TRAY_DISABLE) TrayCreateItem("") $trayexit = TrayCreateItem("Exit") TrayItemSetOnEvent(-1,"ExitScript") TraySetClick(8) TraySetState() endfunc func DoPause() ConsoleWrite(".\" & @ScriptName & " (" & @ScriptLineNumber & ") : ==> " & "PAUSING: " & @LF) $pause = 1 TrayItemSetState($traypause, $TRAY_DISABLE) TrayItemSetState($trayresume, $TRAY_ENABLE) GUICtrlSetState($butt, $GUI_DISABLE) WinSetTitle("My GUI", "", "paused") endfunc func DoResume() $pause = 0 TrayItemSetState($traypause, $TRAY_ENABLE) TrayItemSetState($trayresume, $TRAY_DISABLE) GUICtrlSetState($butt, $GUI_ENABLE) WinSetTitle("paused", "", "My GUI") endfunc func HK_DoRun() if WinActive($gui) then DoRun() else HotKeySet("^r") Send("^r") HotKeySet( "^r" , "HK_DoRun") endif endfunc func ExitScript() exit endfunc ; end It seems really weird to me, and I can't find an explanation anywhere. Is this a bug? Or what? ;o) (or |
|||
#389 | No Bug | ProcessExists or ProcessWaitClose | anixon | |
Description |
The following process fails to stop script execution when Outlook has previously been opened and closed by a user in Windows Vista. #include <INet.au3>;Email Processor $Address = "anyone@…" $Subject = "Application Number: " $Body = "The detail is as follows: " $PID = (_INetMail($Address, $Subject, $Body)) ProcessWaitClose($Pid) msgbox(0,"","I waited like the good script I am") Exit The reason for this is that oulook.exe is still listed as a running process as reported by "Task Manager - Processes". If you 'End Process" outlook.exe in Task Manager - Processes then when running the "ProcessWaitClose' script it pauses execution whilst Outlook.exe has been launched by _INetMail. To remedy this perhaps registry should be read HKCR\mailto\shell\open\command\"default value" to determine the name of the default executable [outlook.exe or msmn.exe] Email client and close any running processes. My guess is that the Windows mail client continues to run to manage desktop delivery processing |
|||
#394 | No Bug | Strange TreeView behaviour, 2 different problems. | Wooltown | |
Description |
In the treeview, the first time the WM Notify event is fired off, the first time I click on an item, and test for the Item ID using $hItem = _GUICtrlTreeView_GetSelection($TreeView) it is 0x00000000, error ? In the Func TreeView_Click() I have added ;--- Change this on two lines to show what happens on the 10 root items if you click in the checkbox or on the text. If you have the first alternative active, if you click in the checkbox, it will always be checked, but if you click on the text it will always be unchecked. If I use the other "Change this" line, the behaviour is reversed. Testing on Windows 2000 SP4 |