Custom Query (3931 matches)
Results (46 - 48 of 3931)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #4044 | Fixed | Time macros don't adjust to timezone changes while running script | ||
| Description |
The forum entry is at [ https://www.autoitscript.com/forum/topic/213051-autoit-error-getting-current-time/#comment-1544988 ] A test script: #include <Date.au3> HotKeySet("{ESC}", "Terminate") Func Terminate() Exit EndFunc ;==>Terminate Exit test() Func test() Local $hTimer = TimerInit(), $iSec = 88 While 1 Sleep(200) If $iSec = @SEC Then ContinueLoop $iSec = @SEC If Mod($iSec, 5) Then ContinueLoop ConsoleWrite('- NowCalc: ' & _NowCalc() & @TAB & @TAB & TimeZone() & @TAB & 'viaMacros: ' & _NowCalc_viaMacros() & @CRLF) WEnd EndFunc ;==>test Func _NowCalc_viaMacros() Return @YEAR & '/' & @MON & '/' & @MDAY & ' ' & @HOUR & ':' & @MIN & ':' & @SEC EndFunc ;==>_NowCalc_viaMacros Func TimeZone() Local $aInfo = _Date_Time_GetTimeZoneInformation() ShowTimeZoneInformation($aInfo, "") Return $aInfo[1] & '(' & $aInfo[7] & ')' EndFunc ;==>TimeZone ; Show time zone information Func ShowTimeZoneInformation(ByRef $aInfo, $sComment) ConsoleWrite("+ ******************* " & $sComment & " *******************" & @CRLF) Local $aDaylightSavingsSetting[4] = ["Failure", "not used in the current time zone", _ "operating with standard time", "operating with daylight savings time"] ConsoleWrite("+ Result ............: " & $aInfo[0] & ' = ' & $aDaylightSavingsSetting[$aInfo[0] + 1] & @CRLF) ConsoleWrite("+ Current bias ......: " & $aInfo[1] & @CRLF) ConsoleWrite("+ Standard name .....: " & $aInfo[2] & @CRLF) ConsoleWrite("+ Standard date/time : " & _Date_Time_SystemTimeToDateTimeStr($aInfo[3]) & @CRLF) ConsoleWrite("+ Standard bias......: " & $aInfo[4] & @CRLF) ConsoleWrite("+ Daylight name .....: " & $aInfo[5] & @CRLF) ConsoleWrite("+ Daylight date/time : " & _Date_Time_SystemTimeToDateTimeStr($aInfo[6]) & @CRLF) ConsoleWrite("+ Daylight bias......: " & $aInfo[7] & @CRLF) EndFunc ;==>ShowTimeZoneInformation |
|||
| #4041 | Fixed | _GUICtrlStatusBar_SetIcon | ||
| Description |
Destroying the icon at the end of the function prevents the icon from being shown. #include <GUIConstants.au3>
#include <GuiStatusBar.au3>
Example()
Func Example()
Local $aPartRightSide[3] = [100, 100, -1]
Local $hGUI = GUICreate("Test", 400, 300)
Local $hStatusBar = _GUICtrlStatusBar_Create($hGUI, $aPartRightSide)
_GUICtrlStatusBar_SetText($hStatusBar, "Part 1")
_GUICtrlStatusBar_SetText($hStatusBar, "Part 2", 1)
_GUICtrlStatusBar_SetIcon($hStatusBar, 0, 23, "shell32.dll") ; not working
_GUICtrlStatusBar_SetIconEx($hStatusBar, 1, 23, "shell32.dll") ; working
GUISetState(@SW_SHOW)
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>Example
Func _GUICtrlStatusBar_SetIconEx($hWnd, $iPart, $hIcon = -1, $sIconFile = "")
If $hIcon = -1 Then Return _SendMessage($hWnd, $SB_SETICON, $iPart, $hIcon, 0, "wparam", "handle") <> 0 ; Remove Icon
If StringLen($sIconFile) <= 0 Then Return _SendMessage($hWnd, $SB_SETICON, $iPart, $hIcon) <> 0 ; set icon from icon handle
; set icon from file
Local $tIcon = DllStructCreate("handle")
Local $vResult = DllCall("shell32.dll", "uint", "ExtractIconExW", "wstr", $sIconFile, "int", $hIcon, "ptr", 0, "struct*", $tIcon, "uint", 1)
If @error Then Return SetError(@error, @extended, False)
$vResult = $vResult[0]
If $vResult > 0 Then $vResult = _SendMessage($hWnd, $SB_SETICON, $iPart, DllStructGetData($tIcon, 1), 0, "wparam", "handle")
;DllCall("user32.dll", "bool", "DestroyIcon", "handle", DllStructGetData($tIcon, 1)) ; this needs to be removed
Return $vResult
EndFunc ;==>_GUICtrlStatusBar_SetIconEx
|
|||
| #4040 | Fixed | _GUICtrlRichEdit_SetZoom parameter limitation bug | ||
| Description |
see this interesting topic for all the code needed! https://www.autoitscript.com/forum/topic/190695-_guictrlrichedit_setzoom-parameter-limitation/ |
|||
Note:
See TracQuery
for help on using queries.
