Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/25/2017 in all areas

  1. Deye

    Chrome Tabs

    @ keeping only certain tabs open flushing out the rest, worked out from this help and support topic Note that if chrome is busy processing something like waiting for a page to respond or anything like that there is a good chance the script then hangs #include <WinAPI.au3> Global $aProtected[5] = [4, "Gmail", "autoit", "Google Search", "YouTube"] Local $a = WinList("[CLASS:Chrome_WidgetWin_1]") If Not IsArray($a) Then Exit For $i = 1 To UBound($a) - 1 If $a[$i][0] Then _Process($a[$i][1]) Next Func _Process($hWnd) Local $hC = _WinAPI_GetClassName(_WinAPI_GetWindow($hWnd, $GW_CHILD)), $bClose = True, $x = 1, $tmp WinActivate($hWnd) ControlSend($hWnd, "", $hC & 1, "^t") ControlSend($hWnd, "", $hC & 1, "^t") ControlSend($hWnd, "", $hC & 1, "^{TAB}") $oBuffer = ObjCreate('Scripting.Dictionary') Do $bClose = True $tmp = WinGetTitle($hWnd, "") If $oBuffer.Exists($tmp) Then ControlSend($hWnd, "", $hC & 1, "^w") Else For $i = 1 To $aProtected[0] If StringInStr($tmp, $aProtected[$i]) Then $bClose = False ExitLoop EndIf Next If $bClose Then ControlSend($hWnd, "", $hC & 1, "^w") Else $x += 1 EndIf $oBuffer.Item($tmp) = 1 EndIf Sleep(300) ControlSend($hWnd, "", $hC & 1, "^+{TAB}") Until Not HWnd(ControlGetHandle($hWnd, "", $hC & $x + 1)) EndFunc ;==>_Process
    1 point
  2. Earthshine

    Chrome Tabs

    Excellent work. Hey, this could be used in another thread where the guy couldn’t get his chrome tabs to close
    1 point
  3. Maybe if we specify the ControlId to use: Run("C:\Client\Setup - ReInstallMIMSys.exe") $hWindow = WinWait("MIMSys Install") $iReturnValue = ControlClick($hWindow, "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:2]") $hWindow = WinWait ("MIMSYS HIS ERP SETUP - InstallShield Wizard") MsgBox(0, "", "Winwait returned: " & $hWindow) $iReturnValue = ControlClick($hWindow, "" , 1) MsgBox(0, "", "ControlClick returned: " & $iReturnValue)
    1 point
  4. Correct. Clicking the button starts an action. You should wait until the action has finished before clicking the next button. "action has finished" most of the time - but not always - means that a new window gets displayed. But it could be a text label on the same window or a button getting activated etc. as well. Based on your screenshots the next step should be to wait for window "MIMSYS HIS ERP SETUP - InstallShield Wizard" and then click on the "Next" button.
    1 point
  5. This works fine on my system winclose("[CLASS:Chrome_WidgetWin_1]") Closing it with iuiautomation stuff you just have to click the closing button right top of window or click 1 by 1 if you want to do it per tab no special things on that observed. Protected/fixed tabs you can only close with ctrl+w
    1 point
  6. Now post your script. I can already see an issue. Seems they used win forms in some custom stuff they have done.
    1 point
  7. Per our conversation, by capturing just about every key, with just a few changes this could have become a key logger script. Not something we want to support.
    1 point
  8. You mean that you want to resize the image to the control size - here 572 x 268? If yes, then you can use _GDIPlus_ImageResize before you send the image to the control. Have in mind that the image must be in GDI format - _GDIPlus_ImageResize result is GDIPlus and thus you have to convert it to GDI first using _GDIPlus_BitmapCreateHBITMAPFromBitmap.
    1 point
  9. Xenobiologist

    Multiple tooltips.

    Hi, here is an old snippet I found on the German forum: $tool1 = _ToolTip("Test", 50, 50) Sleep(1000) $tool2 = _ToolTip("Test2", 90, 90) Sleep(500) _ToolTipDelete($tool1, 1);Ausblenden und dann schließen Sleep(800) _ToolTipDelete($tool2);Hart schlißen Func _ToolTip($sText, $iX, $iY) ;By GtaSpider Local $RetAr[2] ;Mainfenster erstellen $tooltipmain = GUICreate("", 123, 123, $iX, $iY, -2147483648, 128);$WS_POPUP = -2147483648, $WS_EX_TOOLWINDOW = 128 GUISetBkColor(0xFFFFE1) ;Label mit Text erstellen $lab = GUICtrlCreateLabel($sText, 3, 3) $cgp = ControlGetPos($tooltipmain, "", $lab);Labelgröße rausfinden WinMove($tooltipmain, "", $iX, $iY, $cgp[2], $cgp[3]);Gui perfekt formen ;Schatten erstellen $tooltipshadow = GUICreate("", 123, 123, $iX, $iY, -2147483648, 128);$WS_POPUP = -2147483648, $WS_EX_TOOLWINDOW = 128 GUISetBkColor(0x0) WinSetTrans($tooltipshadow, "", 100) ;Schatten perfekt formen WinMove($tooltipshadow, "", $iX + 3, $iY + 3, $cgp[2], $cgp[3]) ;OnTop WinSetOnTop($tooltipmain, "", 1) WinSetOnTop($tooltipmain, "", 2) ;Zeige Tooltip GUISetState(@SW_SHOW, $tooltipshadow) GUISetState(@SW_SHOW, $tooltipmain) ;Bereite das Return array vor, falls man das Tooltip wider entfernen will $RetAr[0] = $tooltipmain $RetAr[1] = $tooltipshadow Return $RetAr EndFunc ;==>_ToolTip Func _ToolTipDelete($aTooltiphwnd, $smooth = 0) ;By GtaSpider ;Löscht das tooltip If $smooth Then;Wenn smooth wahr ist dann wird ausgeblendet For $i = 255 To 0 Step - 10 WinSetTrans($aTooltiphwnd[0], "", $i) If $i < 101 Then WinSetTrans($aTooltiphwnd[1], "", $i) Sleep(10) Next EndIf GUIDelete($aTooltiphwnd[0]) GUIDelete($aTooltiphwnd[1]) EndFunc ;==>_ToolTipDelete Mega
    1 point
×
×
  • Create New...