You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to make the gui window more interactive, like allowing us to move and resize it? Sometimes I'd like to keep the window open while checking other apps, but it's always stuck in the middle of the screen unable to be moved. I end up having to open notepad and pasting the output, which is bothersome.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
I am just trying to change the same. Have no experience with AHK. Especially the v2 syntax is difficult to learn as it seems ChatGPT cannot change AHKv2 Code properly. I am trying now with Claude Sonnet 3.5, which seems to give better answers.
To get a small title bar on the top of window change all occurences of -Caption to +Caption. Then you can move it I think.
Also add resize. Like this: Response_Window := Gui("+Caption +Resize", "Response")
Now you can resize the window, but the contents will not resize.
Claude said you need to add an event handler that will will resize the contents... Still trying to figure that out. It said to add after Response_Window.Add("Button", "x+30", "Close").OnEvent("Click", Close) the following:
; Register event handler for window resizing
; This allows the window to respond when user changes its size
Response_Window.OnEvent("Size", GuiResize)
; Function that handles window resizing events
; Parameters:
; - thisGui: reference to the GUI being resized
; - MinMax: window state (minimized/maximized)
; - Width: new width of window
; - Height: new height of window
GuiResize(thisGui, MinMax, Width, Height) {
if WebView { ; Check if WebView object exists
try {
; Get reference to the text control containing WebView
; "Text1" is the automatic name given to first text control
control := thisGui["Text1"]
; Resize the control to match new window size
; Width-40 and Height-80 provide margins around the content
; Empty parameters (,,) skip x,y positioning
control.Move(,, Width-40, Height-80)
}
}
}
But not sure if that works, still need to test it.
Is it possible to make the gui window more interactive, like allowing us to move and resize it? Sometimes I'd like to keep the window open while checking other apps, but it's always stuck in the middle of the screen unable to be moved. I end up having to open notepad and pasting the output, which is bothersome.
Thanks in advance.
The text was updated successfully, but these errors were encountered: