Jump to content

WinMove Non Visible Windows


Recommended Posts

Hi, recently i had 2 monitors on this pc, and i had to remove one at one point, but then i noticed that some applications would start in the "ghost/second/removed" monitor, so i cannot interact with them, so i thought about doing a simple app, that on a double click would drag the specified window to coordinates x0 y0.

the problem is that it only works on windows on the monitor 1, applications on 2 just don't come to 1.

Hoping for some hints to solve this.

#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <Misc.au3>
Opt("GUIOnEventMode", 1)
Opt("WinSearchChildren", 0)

$GUI = GUICreate('BringBack', 605, 335)

#Region ;ListView
$cListView = GUICtrlCreateListView("#|Title|Handle", 8, 10, 585, 250, $LVS_SHOWSELALWAYS, $LVS_EX_GRIDLINES + $LVS_EX_FULLROWSELECT)
GUICtrlSetFont($cListView, 9, 600, 0, '', 5)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 40)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 370)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 160)
#EndRegion ;ListView
WinSetOnTop($GUI, '', 1)

Func WList()
    Local $aList = WinList()
    For $i = 1 To $aList[0][0]
        If $aList[$i][0] <> "" And BitAND(WinGetState($aList[$i][1]), 2) Then
            GUICtrlCreateListViewItem($i & '|' & $aList[$i][0] & '|' & $aList[$i][1], $cListView)
EndFunc   ;==>WList


Func Quit()
EndFunc   ;==>Quit


While 1
    $CursorInfo = GUIGetCursorInfo($GUI)
    If $CursorInfo[4] = $cListView Then
        If _IsPressed("01") Then
            If _IsPressed("01") Then
                $GetLTLV = _GUICtrlListView_GetNextItem($cListView, -1, 0, 8)
                If $GetLTLV <> -1 Then
                    $GetItemTxtT = _GUICtrlListView_GetItemText($cListView, $GetLTLV, 1)
                    ConsoleWrite('Title - ' & $GetItemTxtT & @CRLF)
                    WinMove($GetItemTxtT, '', 0, 0)
                    WinSetOnTop($GetItemTxtT, '', 1)





Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...