Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/20/2020 in all areas

  1. Maybe this ... ? #include <WindowsConstants.au3> Global Const $WMSZ_LEFT = 1 Global Const $WMSZ_RIGHT = 2 Global Const $WMSZ_TOP = 3 Global Const $WMSZ_TOPLEFT = 4 Global Const $WMSZ_TOPRIGHT = 5 Global Const $WMSZ_BOTTOM = 6 Global Const $WMSZ_BOTTOMLEFT = 7 Global Const $WMSZ_BOTTOMRIGHT = 8 Global $width = 400, $iStep = 50 $Form1 = GUICreate("test", $width, 237, -1, -1, $WS_SIZEBOX) GUISetState() GUIRegisterMsg(0x0214, "WM_SIZING") While GUIGetMsg() <> -3 WEnd Func WM_SIZING($hWnd, $iMsg, $wparam, $lparam) $pos = WinGetPos($Form1) Local $sRect = DllStructCreate("Int[4]", $lparam) Local $left = DllStructGetData($sRect, 1, 1) Local $top = DllStructGetData($sRect, 1, 2) Local $Right = DllStructGetData($sRect, 1, 3) Local $bottom = DllStructGetData($sRect, 1, 4) Switch $wparam Case $WMSZ_LEFT, $WMSZ_TOP, $WMSZ_TOPLEFT, $WMSZ_BOTTOMLEFT DllStructSetData($sRect, 1, $pos[0], 1) DllStructSetData($sRect, 1, $pos[1], 2) Case $WMSZ_RIGHT If $pos[2] < $width+50 Then DllStructSetData($sRect, 1, $right+50, 3) $width += 50 EndIf EndSwitch Return 'GUI_RUNDEFMSG' EndFunc
    2 points
  2. I'm not sure if you meant this. #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <WinAPISysWin.au3> GUIRegisterMsg($WM_SIZE, 'onResize') Global $GUI = GUICreate('Test', 200, 200, Default, Default, $WS_THICKFRAME, $WS_EX_TOOLWINDOW) Global $iStep = 50 GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST") GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case -3 Exit Case Else EndSwitch WEnd Func onResize($hwnd, $iMsg, $iwParam, $ilParam) Local $aSize = WinGetPos($hwnd) Local $width = Round($aSize[2] / $iStep) * $iStep Local $height = Round($aSize[3] / $iStep) * $iStep WinMove($hwnd, '', Default, Default, $width, $height) Return $GUI_RUNDEFMSG EndFunc ;==>onResize Func WM_NCHITTEST($hwnd, $iMsg, $iwParam, $ilParam) If $hwnd = $GUI Then Local $iRet = _WinAPI_DefWindowProc($hwnd, $iMsg, $iwParam, $ilParam) If $iRet = $HTBOTTOM Or $iRet = $HTRIGHT Then Return $iRet Else Return $HTCLIENT EndIf EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_NCHITTEST Saludos
    2 points
  3. @crazycrash This code works fine for me with the latest release of the UDF.
    1 point
  4. exactly that! Interesting. Many thanks @Danyfirex P.S. Thanks a lot also for your high knowledge of windows APIs ... Thanks @mikell, also interesting scipt, (even if with little issues on the "resizing by steps" that should be retouched a bit) Much appreciated, Thanks
    1 point
  5. Just record a macro in Excel and use that to build your script for example: #include <Array.au3> #include <Excel.au3> Local $oExcel = _Excel_Open() If @error Then Exit Local $oWorkbook = _Excel_BookOpen($oExcel, @ScriptDir & "\Excel_Temp.xlsx") If @error Then Exit $oWorkbook.ActiveSheet.Usedrange.Columns("A:A").Select $oExcel.Selection.FormatConditions.AddUniqueValues $oExcel.Selection.FormatConditions($oExcel.Selection.FormatConditions.Count).SetFirstPriority $oExcel.Selection.FormatConditions(1).DupeUnique = 1 With $oExcel.Selection.FormatConditions(1).Interior .PatternColorIndex = -4105 .Color = 255 .TintAndShade = 0 EndWith $oExcel.Selection.FormatConditions(1).StopIfTrue = False
    1 point
  6. JLogan3o13

    Hiding processes

    OMG why are you responding to a topic that is 14 years old?! Please don't resurrect old ancient topics, especially when not adding anything to the discussion.
    1 point
  7. Thanks SlackerAl , I found this on the net: \path\to\putty.exe -load "[Sessionname]" -l [user] -pw [password] -m C:\path\to\commands.txt and in commands.txt I'll put the commands mentioned here beneath : <Enter> ACCESS <Enter> 'UserName' <Enter> SET Priv <Enter> 'Password' <Enter> LOG PORT ALL <Enter> Thanks !
    1 point
×
×
  • Create New...