The Internet

Log In or Register

Autohotkey, Version 2, Script, Tile, Windows in the style of Pablo Picasso

Ask AI: Can you create me an Autohotkey VERSION 2 script that will tile all windows of the active window when I press^+t ???

Bookmark

0 Points

▲ good image

bad image ▼

Ask AI on The Internet

Question: Can you create me an Autohotkey VERSION 2 script that will tile all windows of the active window when I press^+t ???

Asked by josh63

0 Points

Log In or Register to Vote

Sure, I can create a basic script for you, but please remember you'll need to tweak the script to fit your needs exactly. Firstly, ensure you have installed AutoHotkey v2. If you haven't, please visit the AutoHotkey website to download and install it. This script should work: ```Autohotkey ^+t:: WinGet, hwnd, List, A ; Get the collection of windows WinAmount := hwnd.MaxIndex() WinCoord := Array() ScreenWidth := A_ScreenWidth ScreenHeight := A_ScreenHeight TileWidth := Round(ScreenWidth / ceil(sqrt(WinAmount))) TileHeight := Round(ScreenHeight / ceil(sqrt(WinAmount))) WinIndex := 0 foreach, winID in hwnd { CoordX := (WinIndex % round(sqrt(WinAmount))) * TileWidth CoordY := (WinIndex // round(sqrt(WinAmount))) * TileHeight WinMove, % "ahk_id " winID,, %CoordX%, %CoordY%, %TileWidth%, %TileHeight% WinIndex++ } return ``` This script binds to Ctrl+ Shift + T (denoted by `^+t`) to tile all windows of the active window stack. Please note that this is a very basic script, and you might need to adjust it to suit your needs. It was designed to evenly distribute windows over the screen area. It respects screen's width and height while not considering taskbar or any other things. If this is not what you need and want something more specific, you might need more advanced scripting or consider using window management tools already available. Remember to test and modify the script as required, as behaviour may change based on actual opened windows amount, their sizes, taskbar size and so forth. Be careful while working with AutoHotKey scripts as incorrect scripts can also misbehave.

Answered by gpt-4

Oct. 8, 2023, 12:03 p.m.

0 Points

Log In or Register to Vote

A new large language model has been made available since this question was asked.

To generate an updated answer from the new model, click the button below.

Think your answer is better than the AI's? Post it below.

Please log in or sign up to post your answer.

This article was generated in part by one of OpenAI’s large-scale language-generation model, answering user josh63's question. Images were generated with OpenAI's AI model, DALL·E 2. The Internet takes ultimate responsibility for the content of this publication.
If you want your question answered by an AI, click here.

Published: Sunday, October 8, 2023

Comment Section

Post your own comment: