Sorki za kolejnego double (zraportowalem wczesniejszy post z prosba do gmoda o usuniecie )
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
;by gates
hotkeyset("{ESC}", "off")
func off()
Exit
endfunc
$aktualnadata = ("Dzisiaj jest: " &@MDAY& "/" &@MON& "/" &@YEAR)
$form1 = GUICreate( "Kalkulator wieku", 300, 200, 650, 350)
$input = GUICtrlCreateInput( "",20, 30, 200, 0)
$input2 = guictrlcreateinput( "",20,80,200,20)
$input3 = guictrlcreateinput( "",20,130,200,20)
$rok = @YEAR
$miesiac = @mon
$dzien = @MDAY
$rok1 = GUICtrlRead ($input)
$miesiac1 = guictrlread($input2)
$dzien1 = guictrlread($input3)
$Label1 = GUICtrlCreateLabel("Twórca : Gates", 180, 180, 140, 33)
$label2 = GUICtrlCreateLabel("Wpisz ponizej rok swoich urodzin np. 1992", 20,10,250,13)
$label3 = GUICtrlCreateLabel("Wpisz ponizej numer miesiąca w ktorym sie urodziles.",20,60,250,13)
$label4 = guictrlcreatelabel( "Wpisz ponizej dzien swoich urodzin np. 26",20,110,250,13)
$label5 = guictrlcreatelabel($aktualnadata,20,180,160,13)
$button = guictrlcreatebutton( "Licz!",20,160,60,20)
$liczbadni = $dzien - $dzien1
$liczbalat = $rok - $rok1
GUIsetstate(@SW_SHOW, $form1)
while 1
$nmsg = guigetmsg()
switch $nmsg
case $gui_event_close
Exit
case $button
$rok1 = guictrlread($input)
$dzien1 = guictrlread($input3)
$dzien1 = $dzien - $dzien1
if $dzien1 < 0 Then
$dzien1 = 31 + $dzien1
endif
$liczbamiesiecy = guictrlread($input2)
$liczbamiesiecy = $miesiac - $liczbamiesiecy
if $liczbamiesiecy < 0 then
$liczbamiesiecy = 12 + $liczbamiesiecy
$rok1 = $rok1+1
Endif
msgbox(64,"Wiek","Masz " &$rok - $rok1 & " lat " &$liczbamiesiecy & " miesiecy i " & $dzien1 & " dni")
endswitch
wend
W takiej wersji wszystko hula
Dzieki za pomoc, nawet ta z nutka irytacji