svenjatzu Posted February 11, 2020 Posted February 11, 2020 Hi Someone plase can help me with changeing the windows size from chrome and place it on a special slot on the screen?
Nine Posted February 11, 2020 Posted February 11, 2020 WinMove () ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
svenjatzu Posted February 11, 2020 Author Posted February 11, 2020 Example() Func Example() ; Run Notepad ShellExecute("C:\free\acc 3 - Chrome.lnk") ; Wait 10 seconds for the Notepad window to appear. Local $hWnd = WinWait("[CLASS:Chrome_WidgetWin_1]", "", 10) ; Retrieve the position as well as the height and width of the Notepad window. We will use this when we have to move the window back to the original position. Local $aPos = WinGetPos($hWnd) ; Move the Notepad to the x, y position of 0, 0 and set the height and width at 200, 200. WinMove($hWnd, "", 0, 0, 230, 858) ; Wait for 2 seconds to display the new position of the Notepad window. Sleep(2000) ; Move the Notepad window back to the original position by using the array returned by WinGetPos. ;~ WinMove($hWnd, "", $aPos[0], $aPos[1], $aPos[2], $aPos[3]) ; Wait for 2 seconds to display the original position of the Notepad window. Sleep(2000) ; Close the Notepad window using the handle returned by WinWait. ;~ WinClose($hWnd) EndFunc ;==>Example
svenjatzu Posted February 11, 2020 Author Posted February 11, 2020 29 minutes ago, Nine said: WinMove () ? the point is that if i use winmove its moving the other two windows to another position
svenjatzu Posted February 11, 2020 Author Posted February 11, 2020 Global $sWinTitle = "Neuer Tab - Google Chrome" Global $avWinList = WinList($sWinTitle) ;~ ; Create 5 instances of notepad While $avWinList[0][0] < 3 Run($sRunCmd) Sleep(250); Wait for new process to create its GUI $avWinList = WinList($sWinTitle) WEnd ; Move and ID each instance For $n = 1 To $avWinList[0][0] WinActivate($avWinList[$n][1]) WinMove($avWinList[$n][1], "", 0, 0, 230, 858) Next For $n = 2 To $avWinList[0][0] WinActivate($avWinList[$n][1]) WinMove($avWinList[$n][1], "",539, 0, 230, 858) Next For $n = 3 To $avWinList[0][0] WinActivate($avWinList[$n][1]) WinMove($avWinList[$n][1], "", 1083, 1, 230, 858) Next this orders all windows like id like to have them but
svenjatzu Posted February 11, 2020 Author Posted February 11, 2020 ShellExecute("C:\free\acc 1 - Chrome.lnk") ShellExecute("C:\free\acc 2 - Chrome.lnk") ShellExecute("C:\free\acc 3 - Chrome.lnk") WinWait("Neuer Tab - Google Chrome","") ;~ Global $sRunCmd = "notepad.exe" Global $sWinTitle = "Neuer Tab - Google Chrome" Global $avWinList = WinList($sWinTitle) ;~ ; Create 5 instances of notepad While $avWinList[0][0] < 3 ;~ Run($sRunCmd) Sleep(250); Wait for new process to create its GUI $avWinList = WinList($sWinTitle) WEnd ; Move and ID each instance For $n = 1 To $avWinList[0][0] WinActivate($avWinList[$n][1]) WinMove($avWinList[$n][1], "", 0, 0, 230, 858) ;~ ControlSetText($avWinList[$n][1], "", "Edit1", "This is notepad.exe instance no." & $n) Next For $n = 2 To $avWinList[0][0] WinActivate($avWinList[$n][1]) WinMove($avWinList[$n][1], "",539, 0, 230, 858) ;~ ControlSetText($avWinList[$n][1], "", "Edit1", "This is notepad.exe instance no." & $n) Next For $n = 3 To $avWinList[0][0] WinActivate($avWinList[$n][1]) WinMove($avWinList[$n][1], "", 1083, 1, 230, 858) ;~ ControlSetText($avWinList[$n][1], "", "Edit1", "This is notepad.exe instance no." & $n) Next well this opens three profiles and aranges them on the screen
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now