Jump to content

AndyK70

Members
  • Posts

    12
  • Joined

  • Last visited

About AndyK70

  • Birthday 09/01/1970

Profile Information

  • Location
    Germany

Recent Profile Visitors

336 profile views

AndyK70's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thanks so much, that's doing the job beautifully.
  2. Hi guys, I know the function WinSetOnTop and also the extended style $WS_EX_TOPMOST which you can give while creating a GUI, but... How do I check if a window has this set, aka AlwaysOnTop? My goal is to have a little script waiting for a hotkey to be pressed and then toggle the $WS_EX_TOPMOST of the [ACTIVE] window. In order to do that I have to be able to retrieve that flag to do a bitwise XOR on it, just don't know how to query it. thx in advance
  3. I don't think a natural tray icon, but you can do a script with only a tray icon which then does action on the window/application you want to control. Like controlling Outlook, or Word, or smth. else.
  4. Yes, that would definitely help. Do you have a hint, where I should look for more information to check this? I was looking in the helpfile, online help and even msdn but only found sth. how to suspend and resume a process, but not how to check if a process is suspended.
  5. Oh, yes right. Changed it, but doesn't help either. I did dig a littler deeper, got the PIDs and nearly all of them were the same which confused me a little bit. Process Explorer then showed me, that this specific PID was for ApplicationFrameHost.exe, the others are for tasks which are suspended: Notice the "Winstore.App.exe"(found as Microsoft Store), "SystemSettings.exe" (Einstellungen) and "Calculator.exe" (Rechner) are all those metro apps and so is the found Netflix app which is hiding behind the ApplicationFrameHost.exe. I hope these are some useful information, even if I still don't know how I could filter them out. @jdelaney I checked them and found the Class "ApplicationFrameWindow" for all of them, but this class is for all metro apps, it doesn't tell me if they are hidden or not. Edit: If you want me anything to try, to search for or use some different tool to investigate further, please tell me.
  6. I did, please have a closer look into the example code I provided.
  7. I'm trying to fill a ListView with all normal viewable windows to act with them. First I tried with WinList: Local $aWinList = WinList("[REGEXPTITLE:(?i)(.+)]") Local $aTmp, $iID ;~ _ArrayDisplay($aWinList) For $i = $aWinList[0][0] To 1 Step -1 ; going backwards not disturbing the index while cycling through and deleting some If StringStripWS( $aWinList[$i][0], 3) == "" Or _ Not BitAND(WinGetState($aWinList[$i][1]), $WIN_STATE_VISIBLE) Or _ BitAND(WinGetState($aWinList[$i][1]), $WIN_STATE_MINIMIZED ) Then _ArrayDelete($aWinList, $i) Else ; Window has a Title and is "visible" $aTmp = WinGetPos($aWinList[$i][1]) If $aTmp[0] < -1000 Or $aTmp[1] < -1000 Then ; Window is minimized or tray icon _ArrayDelete($aWinList, $i) EndIf EndIf Next $aWinList[0][0] = UBound($aWinList)-1 ; getting actual # of windows ; Each row is now [ID]=> [Title], [hWnd] But it keeps getting Windows which are definitely not there at least not visible: Those windows "Rechner", "Einstellungen", "Netflix", "Microsoft Store", ... are not there!?! It should list only the first three windows, which are real. I even tried it with _WinAPI_ UDF: $hWnd = _WinAPI_GetForegroundWindow() ; Add items _GUICtrlListView_BeginUpdate($idListview) If $hWnd <> 0 Then $iI = 0 Do If _WinAPI_IsWindow($hWnd) And _WinAPI_IsWindowVisible Then _GUICtrlListView_AddItem($idListview, WinGetTitle($hWnd)) _GUICtrlListView_AddSubItem($idListview, $iI, $hWnd, 1) $iI += 1 $hWnd = _WinAPI_GetWindow($hWnd, $GW_HWNDNEXT) EndIf Until $hWnd = 0 EndIf But it is the same... How can i distinguish those invisible windows from normal ones? PS: I'm using Windows 10, maybe it is important to know?
  8. huh? strange as technet says it is: http://technet.microsoft.com/en-US/library/cc754891.aspx
  9. Yepp, that's my thought, too. Now I'm at Post #30 where you present _GUIScrollbars_Locate_Ctrl() and my face grin up brightly. You are my hero! You nailed it years before I needed it, I'm so happy. Thank you man! Great work! (Even if it is not included in the _GUIScrollbars_Size UDF, now I know how to handle it) continuing to read the thread, don't want to miss anything else
  10. yep, shame on me I edited my post as I encountered it
  11. Really nice UDF. Seems to fit my needs. I have a GUI in which I am enabling/showing more or less controls and therefore the GUI will stretch or shrink, obviously. I had something working already, but I had a strange Bug. I hope with your UDF I'll avoid that bug. I'll let you know if I will happy or get into trouble again.
  12. I made my own update routine and had nearly the same outcome, but yours is more flexible. One thing to mention though. In your UDF you have: Local Const $sData = '@ECHO OFF' & @CRLF & 'SET TIMER=0' & @CRLF _ & ':START' & @CRLF _ & 'PING -n ' & $iInternalDelay & ' 127.0.0.1 > nul' & @CRLF _ & $sDelay & @CRLF _ & 'SET /A TIMER+=1' & @CRLF _ & @CRLF _ & 'TASKLIST /NH /FI "' & $sImageName & ' EQ ' & $sAppID & '" | FIND /I "' & $sAppID & '" >nul && GOTO START' & @CRLF _ & 'GOTO MOVE' & @CRLF _ & @CRLF _ & ':MOVE' & @CRLF _ & 'TASKKILL /F /FI "' & $sImageName & ' EQ ' & $sAppID & '"' & @CRLF _ & $sBackupPath & _ 'GOTO END' & @CRLF _ & @CRLF _ & ':END' & @CRLF _ & 'MOVE /Y ' & '"' & $sUpdatePath & '"' & ' "' & $sScriptPath & '"' & @CRLF _ & $sRestart & @CRLF _ & 'DEL "' & $sTempFileName & '"' The whole TIMER thing could be exchanged by the cmd command TIMEOUT. If you want the user having the ability to cancel the operation at this point only use /T timeoutInSeconds as parameter. If the user should not be able to cancel the operation add the parameter /nobreak at the end: Local Const $sData = '@ECHO OFF' & @CRLF & 'TIMEOUT /T ' & $iInternalDelay & ' /nobreak' & @CRLF _ & ':START' & @CRLF _ & @CRLF _ & 'TASKLIST /NH /FI "' & $sImageName & ' EQ ' & $sAppID & '" | FIND /I "' & $sAppID & '" >nul && GOTO START' & @CRLF _ & 'GOTO MOVE' & @CRLF _ & @CRLF _ & ':MOVE' & @CRLF _ & 'TASKKILL /F /FI "' & $sImageName & ' EQ ' & $sAppID & '"' & @CRLF _ & $sBackupPath & _ 'GOTO END' & @CRLF _ & @CRLF _ & ':END' & @CRLF _ & 'MOVE /Y ' & '"' & $sUpdatePath & '"' & ' "' & $sScriptPath & '"' & @CRLF _ & $sRestart & @CRLF _ & 'DEL "' & $sTempFileName & '"'
×
×
  • Create New...