rudi Posted October 18, 2024 Posted October 18, 2024 (edited) Hello, I don't see my mistake. Who's going to open my blind eyes? expandcollapse popup#include <DateTimeConstants.au3> #include <GUIConstantsEx.au3> #include <Date.au3> #Region Create GUI $GUITitle = "MM Search Receiver LOGs, v" & FileGetVersion(@ScriptFullPath) Dim $aCoord[3]=["start relative","absolute","cell relative"] $GuiW = 350 $GuiH = 250 $Rim = 5 $CtrlGap = 5 $CtrlH = 20 $CtrlW = $GuiW - 2 * $Rim $NextY = 0 $GuiDebug=True $DebugCount=0 $Coordmode=1 GUICreate($GUITitle, $GuiW, $GuiH) $Coordmode=1 ; default Opt("guicoordmode",$CoordMode) GUISetState() GUIdebug() $Group = GUICtrlCreateGroup("Suchoptionen", $Rim, $Rim, $GuiW - 2 * $Rim, 2 * $Rim + 3 * $CtrlGap + 3 * $CtrlH) $NextY += $Rim + $Rim + $CtrlH + 2 * $CtrlGap + 3 * $CtrlH ; Nächstes Control unterhalb dieser Gruppe GUIdebug() $rToday = GUICtrlCreateRadio("nur heute", $Rim + $CtrlGap, $Rim * 3 + $CtrlGap, $CtrlW - 2 * $CtrlGap, $CtrlH) GUICtrlSetState($rToday, $GUI_CHECKED) $Coordmode=2 Opt("guicoordmode", $Coordmode) GUIdebug() $rOneDay = GUICtrlCreateRadio("Ein Tag", -1, $CtrlGap) GUIdebug() $rRange = GUICtrlCreateRadio("Datumsbereich", -1, $CtrlGap) $Coordmode=1 Opt("guicoordmode", $Coordmode) GUIdebug() GUICtrlCreateGroup("", -99, -99) ; close group GUIdebug() $cDate = GUICtrlCreateDate(_NowCalcDate(), $Rim, $NextY, $CtrlW, $CtrlH, $DTS_SHORTDATEFORMAT) GUICtrlSetState($cDate, $GUI_HIDE) GUICtrlSetState($cDate, $GUI_SHOW) $Coordmode=2 Opt("guicoordmode", $Coordmode) $NextY += $CtrlH + $CtrlGap GUIdebug() $cDateZwei = GUICtrlCreateDate(_NowCalcDate(), -1, $CtrlGap, "", "", $DTS_SHORTDATEFORMAT) GUICtrlSetState($cDateZwei, $GUI_HIDE) GUICtrlSetState($cDateZwei, $GUI_show) $NextY += $CtrlH + $CtrlGap GUIdebug() $lLabel = GUICtrlCreateLabel("String, nach dem gesucht werden soll:", -1, $CtrlGap) $NextY += $CtrlH + $CtrlGap GUIdebug() $iSearch = GUICtrlCreateInput("a.e.neumann@mad.com", -1, $CtrlGap) $NextY += $CtrlH + $CtrlGap $Coordmode=1 Opt("guicoordmode", $Coordmode) GUIdebug() $bDoit = GUICtrlCreateButton("Suche starten", $Rim, $NextY + $CtrlGap, ($CtrlW - $CtrlGap) / 2, $CtrlH) GUIdebug() $bExit = GUICtrlCreateButton("Abbrechen", $Rim + $CtrlW / 2 + $CtrlGap, $NextY + $CtrlGap, ($CtrlW - $CtrlGap) / 2 - $Rim / 2, $CtrlH) GUIdebug() GUISetState() #EndRegion Create GUI MsgBox(0, "", "gui check") Exit Func GUIdebug($CallingLine=@ScriptLineNumber) if $GuiDebug=True Then $DebugCount+=1 MsgBox(0, "Debug #" & $DebugCount,"Zeile = " & $CallingLine & @CRLF & "NextY = " & $NextY & @CRLF & "Coordmode = " & $CoordMode & " = " & $aCoord[$Coordmode]) EndIf EndFunc TIA, Rudi. Edited October 18, 2024 by rudi Earth is flat, pigs can fly, and Nuclear Power is SAFE!
rudi Posted October 18, 2024 Author Posted October 18, 2024 I just almost got mad, because I rememered, that it *DID* work a couple of weeks ago. So I went back to the PC, where I remembered, that I wrote the original approach: There it is working as expected. using the shared clipboard to my main PC, the same lines did *NOT* work. The difference seems to be the autoit version: Left the "other" PC working, right "my main" PC, not working: so it's definitely some difference between these two Versions v3.3.14.5 <-> v3.3.16.1 Earth is flat, pigs can fly, and Nuclear Power is SAFE!
pixelsearch Posted October 18, 2024 Posted October 18, 2024 (edited) If I understand correctly, 3 controls don't show in your GUI ( $cDateZwei , $lLabel , $iSearch ) They should appear if you change this line... $cDateZwei = GUICtrlCreateDate(_NowCalcDate(), -1, $CtrlGap, "", "", $DTS_SHORTDATEFORMAT) ...with $cDateZwei = GUICtrlCreateDate(_NowCalcDate(), -1, $CtrlGap, Default, Default, $DTS_SHORTDATEFORMAT) I think -1 (instead of Default) should also work, i.e $cDateZwei = GUICtrlCreateDate(_NowCalcDate(), -1, $CtrlGap, -1, -1, $DTS_SHORTDATEFORMAT) Good luck Edited October 18, 2024 by pixelsearch "I think you are searching a bug where there is no bug... don't listen to bad advice."
Solution pixelsearch Posted October 18, 2024 Solution Posted October 18, 2024 1 hour ago, rudi said: so it's definitely some difference between these two Versions v3.3.14.5 <-> v3.3.16.1 In fact the difference happened exactly between these 2 beta versions (just tested) : AutoIt 3.3.15.3 (16th May, 2020) (Beta) 3 syntax work and create correctly the controls discussed in the preceding post : $cDateZwei = GUICtrlCreateDate(_NowCalcDate(), -1, $CtrlGap, "", "", $DTS_SHORTDATEFORMAT) $cDateZwei = GUICtrlCreateDate(_NowCalcDate(), -1, $CtrlGap, Default, Default, $DTS_SHORTDATEFORMAT) $cDateZwei = GUICtrlCreateDate(_NowCalcDate(), -1, $CtrlGap, -1, -1, $DTS_SHORTDATEFORMAT) AutoIt 3.3.15.4 (12th June, 2021) (Beta) Only 2 syntax work $cDateZwei = GUICtrlCreateDate(_NowCalcDate(), -1, $CtrlGap, Default, Default, $DTS_SHORTDATEFORMAT) $cDateZwei = GUICtrlCreateDate(_NowCalcDate(), -1, $CtrlGap, -1, -1, $DTS_SHORTDATEFORMAT) I don't see anything related to this in the "History / ChangeLog" of the actual help file (including betas), maybe I missed it. The only fix related to this "width = 0 and height = 0" (as found in your initial script) applies to GuiCtrlCreatePic() which was solved precisely... in 3.3.15.4 . Is it possible that it had a side effect on all other controls ? Only Jon knows : Fixed #3682: GuiCtrlCreatePic() with h=0 and w=0. "I think you are searching a bug where there is no bug... don't listen to bad advice."
rudi Posted October 20, 2024 Author Posted October 20, 2024 Thanks for pointing out fix number #3682, good catch! Earth is flat, pigs can fly, and Nuclear Power is SAFE!
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