Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/16/2012 in all areas

  1. Hi, Try this : $aDateBuy = StringSplit("2000/04/01", "/") ;date dachat $iValidYears = 4 ;pendant combien de temps la voiture peut etre utilisee ConsoleWrite("year 1 : " & 12 - $aDateBuy[2] & " months (" & $aDateBuy[1] & ")" & @CRLF) For $iYear = 1 To $iValidYears - 1 ;1ere annee deja calculee et on calculera a part la derniere annee ConsoleWrite("year " & $iYear & " : 12 months (" & $aDateBuy[1] + $iYear & ")" & @CRLF) Next ConsoleWrite("year " & $iValidYears & " : " & $aDateBuy[2] - 1 & " months (" & $aDateBuy[1] + $iValidYears & ")" & @CRLF) Br, FireFox.
    1 point
  2. Look at GUIGetMsg in the help file, as this will tell you how to monitor when a button or checkbox is selected. You will also need to look at GUICtrlRead to read the input boxes and finally search the forum for _IsChecked, as this will tell you whether or not a checkbox is selected. Good luck. Oh, my advice look at youtube as well as the wiki section for an array of tutorials. Plus, if you're not a programmer don't expect to learn all of this overnight, no matter how good you are no one is that quick. Start small and then work big and never give up at the first sign of trouble.
    1 point
  3. JScript

    Problem with WM_MOVE !

    Try this: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $hGUI, $iX_Min = 0, $iX_Max = @DesktopWidth - 500, $iY_Min = 0, $iY_Max = @DesktopHeight - 500 Global $ViewerVideo _Main() Func _Main() $hGUI = GUICreate("Test", 500, 500) $Tab = GUICtrlCreateTab(16, 16, 450, 450) $ViewerVideo = GUICreate("K Muzik Viewer Video", 250, 250, 20, 50, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_DISABLED, $WS_EX_MDICHILD), $hGUI) GUISetBkColor(0x00000, $ViewerVideo) WinSetTrans($ViewerVideo, "", 220) GUISetState(@SW_SHOWNOACTIVATE, $ViewerVideo) GUISetState(@SW_SHOW, $hGUI) GUIRegisterMsg($WM_WINDOWPOSCHANGING, "WM_WINDOWPOSCHANGING") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc ;==>_Main Func WM_WINDOWPOSCHANGING($hWnd, $Msg, $wParam, $lParam) If $hWnd = $hGUI Then Local $stWinPos = DllStructCreate("uint;uint;int;int;int;int;uint", $lParam) Local $iLeft = DllStructGetData($stWinPos, 3) Local $iTop = DllStructGetData($stWinPos, 4) Local $iWidth = DllStructGetData($stWinPos, 5) Local $iHeight = DllStructGetData($stWinPos, 6) If $iLeft < $iX_Min Then DllStructSetData($stWinPos, 3, $iX_Min) If $iTop < $iY_Min Then DllStructSetData($stWinPos, 4, $iY_Min) If $iLeft > $iX_Max Then DllStructSetData($stWinPos, 3, $iX_Max) If $iTop > $iY_Max Then DllStructSetData($stWinPos, 4, $iY_Max) EndIf EndFunc ;==>WM_WINDOWPOSCHANGING JS
    1 point
×
×
  • Create New...