Popular Post jaberwacky Posted October 26 Popular Post Posted October 26 (edited) Hello! I'm working on a new GUI builder that I have been making great progress on! A helpful forum member ioa747 answered a question I had which started me on my journey, and now I'd like to present to you an alpha version of the software. As of now only Form and Button works in a rudimentary fashion. To run this, open Guiscape.au3 and go from there! I'd love to hear your feedback and suggestions. 🙂 Latest versions will be on Github from now on. https://github.com/matthewrg/Guiscape Guiscape.zip Downloads: 35 Edited 14 hours ago by jaberwacky 10/28/25 Latest version argumentum, ioa747, Werty and 2 others 4 1 Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
argumentum Posted October 26 Posted October 26 9 minutes ago, jaberwacky said: ... and now I'd like to present to you an alpha version of the software. ... I'd love to hear your feedback. 🙂 Gotta say, nice looking and with the new includes, right on time too. TheSaint and jaberwacky 1 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
jaberwacky Posted October 26 Author Posted October 26 Not sure what you mean about the new includes. Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
argumentum Posted October 26 Posted October 26 2 minutes ago, jaberwacky said: Not sure what you mean about the new includes. #include <Array.au3> ;~ #include <WindowsStylesConstants.au3> #include <ButtonConstants.au3> #include <GuiConstantsEx.au3> #include <AutoItConstants.au3> #include <ColorConstants.au3> ;~ #include <WindowsSysColorConstants.au3> #include <StructureConstants.au3> #include <WinAPISysWin.au3> Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
jaberwacky Posted October 26 Author Posted October 26 Ahhhh, these are recently added to AutoIt? I should probably keep up with stuff like that. 😅 argumentum 1 Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
jpm Posted October 28 Posted October 28 to be in sync with latest autoit release 3.3.18.0 and Au3Check I update the #include Cheers GUIScape.zip jaberwacky 1
MattyD Posted October 28 Posted October 28 Very pretty Just FYI, the AutoitObject startup function is crashing for me when it is run as x64. I'm sure I've used it before at some point - but it would've likely been with the physical dll?? Can't really remember sorry, Its been a while! jaberwacky 1
WildByDesign Posted October 28 Posted October 28 It crashes for me as well on x64. @jaberwacky Are you really running x86? Attached is AutoItObject v1.2.8.3 which will run on 64-bit machines as well. I had this same crashing issue with AutoItObject on a Windows ACL project a while back. AutoItObject.au3 jaberwacky 1
jaberwacky Posted October 28 Author Posted October 28 (edited) 11 hours ago, jpm said: to be in sync with latest autoit release 3.3.18.0 and Au3Check I update the #include Cheers For some reason this doesn't run for me. Says I'm missing a bunch of includes. Seems like I'm definitely doing something wrong. Edited October 28 by jaberwacky Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
jaberwacky Posted October 28 Author Posted October 28 Oh wait, I'm slow sometimes ... I forgot to do something son my end ... doh! Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
jaberwacky Posted October 29 Author Posted October 29 12 hours ago, WildByDesign said: It crashes for me as well on x64. @jaberwacky Are you really running x86? Attached is AutoItObject v1.2.8.3 which will run on 64-bit machines as well. I had this same crashing issue with AutoItObject on a Windows ACL project a while back. AutoItObject.au3 144.4 kB · 7 downloads I have an x64 but I think I went with use x86 when I installed AutoIt ... been awhile can't recall ... WildByDesign 1 Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
jaberwacky Posted October 29 Author Posted October 29 Updated to latest version ... hopefully the includes and autoitobject issues are fixed. Please let me know. Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
argumentum Posted October 29 Posted October 29 44 minutes ago, jaberwacky said: I have an x64 but I think I went with use x86 when I installed AutoIt ... been awhile can't recall ... If #AutoIt3Wrapper_UseX64=y ; some people run 64bit by default then I get AutoIt3 ended. rc:-1073741819 Otherwise in 32 bit it looks good. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
jaberwacky Posted Wednesday at 08:24 AM Author Posted Wednesday at 08:24 AM (edited) 7 hours ago, argumentum said: If #AutoIt3Wrapper_UseX64=y ; some people run 64bit by default then I get AutoIt3 ended. rc:-1073741819 Otherwise in 32 bit it looks good. Thank you! OK, something with AutoitObject ... I saw WildByDesigns post about it but I thought I fixed it by including the whole package. Edited Wednesday at 08:34 AM by jaberwacky Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
jaberwacky Posted Wednesday at 08:42 AM Author Posted Wednesday at 08:42 AM 21 hours ago, WildByDesign said: It crashes for me as well on x64. @jaberwacky Are you really running x86? Attached is AutoItObject v1.2.8.3 which will run on 64-bit machines as well. I had this same crashing issue with AutoItObject on a Windows ACL project a while back. AutoItObject.au3 144.4 kB · 11 downloads Nice! When I replace the autoitobject I was using with this version then x64 works too! WildByDesign 1 Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
MattyD Posted Wednesday at 12:04 PM Posted Wednesday at 12:04 PM Apologies if I'm overstepping - but if its useful, this was something that I was playing with a little while back. Click to place a button, then you can drag and resize it. expandcollapse popup#include <guiConstants.au3> #include <winapi.au3> #include <misc.au3> ;~ #include <SendMessage.au3> Global $hCursor_Cross = _WinAPI_LoadCursor(0, $IDC_CROSS) Global $hGui = GUICreate("", 300, 200, 100, 100, BitOR($WS_SIZEBOX, $WS_MINIMIZEBOX)) Global $hBtnProc = DllCallbackRegister("btnProc", "lresult", "hwnd;uint;wparam;lparam;uint_ptr;dword_ptr") Global $pBtnProc = DllCallbackGetPtr($hBtnProc) Global $hWndProc = DllCallbackRegister("WndProc", "lresult", "hwnd;uint;wparam;lparam;uint_ptr;dword_ptr") Global $pWndProc = DllCallbackGetPtr($hWndProc) _WinAPI_SetWindowSubclass($hGui, $pWndProc, 1000) GUISetState() Local $iMsg While WinExists($hGui) $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd _WinAPI_RemoveWindowSubclass($hGui, $pWndProc, 1000) Func WndProc($hWnd, $iMsg, $wParam, $lParam, $iIdSubclass, $dwRefData) Local $iRet Switch $iMsg Case $WM_SETCURSOR Local $iSrc = BitAND($lParam, 0xFFFF), $iEvent = BitShift($lParam, 16) If $iSrc = $HTCLIENT Then _WinAPI_SetCursor($hCursor_Cross) $iRet = 1 Else $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) EndIf Case $WM_LBUTTONDOWN Local $iX = BitAND($lParam, 0xFFFF), $iY = BitShift($lParam, 16) Local $idBtn = GUICtrlCreateButton("", $iX - 12, $iY - 12, 25, 25) _WinAPI_SetWindowSubclass(GUICtrlGetHandle($idBtn), $pBtnProc, $idBtn) $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) Case $WM_SIZE ;This prevents autoit's docking logic from moving controls around on window restore. $iRet = _WinAPI_DefWindowProcW($hWnd, $iMsg, $wParam, $lParam) Case Else $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) EndSwitch Return $iRet EndFunc Func btnProc($hWnd, $iMsg, $wParam, $lParam, $iIdSubclass, $dwRefData) Local $iRet Switch $iMsg Case $WM_NCHITTEST Local $aPoint[2] = [BitAND($lParam, 0xFFFF), BitShift($lParam, 16)] ;Mouse coords can be negative on edge cases! If BitAND($aPoint[0], 0x8000) Then $aPoint[0] = BitOR(0xFFFF0000, $aPoint[0]) If BitAND($aPoint[1], 0x8000) Then $aPoint[1] = BitOR(0xFFFF0000, $aPoint[1]) Local $aPos = WinGetPos($hWnd), $iMar = 10 $iRet = $HTCAPTION If $aPoint[0] - $aPos[0] < $iMar Then $iRet = $HTLEFT If $aPoint[0] - $aPos[0] > ($aPos[2] - $iMar) Then $iRet = $HTRIGHT If $aPoint[1] - $aPos[1] < $iMar Then Switch $iRet Case $HTLEFT $iRet = $HTTOPLEFT Case $HTRIGHT $iRet = $HTTOPRIGHT Case Else $iRet = $HTTOP EndSwitch ElseIf $aPoint[1] - $aPos[1] > ($aPos[3] - $iMar) Then Switch $iRet Case $HTLEFT $iRet = $HTBOTTOMLEFT Case $HTRIGHT $iRet = $HTBOTTOMRIGHT Case Else $iRet = $HTBOTTOM EndSwitch EndIf If $aPoint[0] < 0 Then $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) If $aPoint[1] < 0 Then $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) _WinAPI_RedrawWindow($hWnd) Case $WM_NCLBUTTONDBLCLK ;Prevent double-click maximizing in "caption" If $wParam <> $HTCAPTION Then $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) Case $WM_SETCURSOR Local $iSrc = BitAND($lParam, 0xFFFF), $iEvent = BitShift($lParam, 16) If $iSrc = $HTCAPTION And $iEvent = $WM_LBUTTONDOWN Then _WinAPI_SetCursor($hCursor_Cross) $iRet = 1 Else $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) EndIf Case Else $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) EndSwitch Return $iRet EndFunc ;==>btnProc ioa747 1
jaberwacky Posted Wednesday at 04:33 PM Author Posted Wednesday at 04:33 PM (edited) 4 hours ago, MattyD said: Apologies if I'm overstepping Not at all! When I get back from work I'll look into this! Thank you! Glancing over it, this is a fffffaaaarrrrr more elegant way than I've done in the past. Edited Wednesday at 04:43 PM by jaberwacky MattyD 1 Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
MattyD Posted Thursday at 12:36 PM Posted Thursday at 12:36 PM (edited) No worries! This one probably needs a tidy up - but here's a rough snappy-snappy version. If this is useful, I can probably just keep chipping away at it over the weekend if you'd like? - Just proof of concept things like click-to-select, or multi-select with shift & ctrl etc.. Edit: You need to drag out rectangles to create buttons in this example! expandcollapse popup#include <guiConstants.au3> #include <winapi.au3> Global Const $MK_LBUTTON = 1 Global Const $iSnap = 15 Global $hCursor_Cross = _WinAPI_LoadCursor(0, $IDC_CROSS) Global $hGui = GUICreate("", 300, 200, 100, 100, BitOR($WS_SIZEBOX, $WS_MINIMIZEBOX)) Global $hBtnProc = DllCallbackRegister("btnProc", "lresult", "hwnd;uint;wparam;lparam;uint_ptr;dword_ptr") Global $pBtnProc = DllCallbackGetPtr($hBtnProc) Global $hWndProc = DllCallbackRegister("WndProc", "lresult", "hwnd;uint;wparam;lparam;uint_ptr;dword_ptr") Global $pWndProc = DllCallbackGetPtr($hWndProc) _WinAPI_SetWindowSubclass($hGui, $pWndProc, 1000) GUISetState() Local $iMsg While WinExists($hGui) $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd _WinAPI_RemoveWindowSubclass($hGui, $pWndProc, 1000) Func WndProc($hWnd, $iMsg, $wParam, $lParam, $iIdSubclass, $dwRefData) Local $iRet Local Static $bDrawRect, $tRect = DllStructCreate($tagRect) Switch $iMsg Case $WM_SETCURSOR Local $iSrc = BitAND($lParam, 0xFFFF), $iEvent = BitShift($lParam, 16) If $iSrc = $HTCLIENT Then _WinAPI_SetCursor($hCursor_Cross) $iRet = 1 Else $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) EndIf Case $WM_LBUTTONDOWN $tRect.Left = BitAND($lParam, 0xFFFF) $tRect.Top = BitShift($lParam, 16) $tRect.Left -= Mod($tRect.Left, $iSnap) $tRect.Top -= Mod($tRect.Top, $iSnap) $bDrawRect = True $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) Case $WM_MOUSEMOVE ;~ Local $iX = BitAND($lParam, 0xFFFF), $iY = BitShift($lParam, 16) If BitAND($wParam, $MK_LBUTTON) = $MK_LBUTTON Then _WinAPI_InvalidateRect($hWnd, $tRect, True) $tRect.Right = BitAND($lParam, 0xFFFF) $tRect.Bottom = BitShift($lParam, 16) $tRect.Right -= Mod($tRect.Right, $iSnap) $tRect.Bottom -= Mod($tRect.Bottom, $iSnap) _WinAPI_InvalidateRect($hWnd, $tRect, True) $iRet = 0 Else $bDrawRect = False $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) EndIf Case $WM_PAINT If $bDrawRect Then Local $tPaintStruct = $tagPAINTSTRUCT Local $hDC = _WinAPI_BeginPaint($hWnd, $tPaintStruct) Local $hPen = _WinAPI_CreatePen($PS_DOT, 1, _WinAPI_RGB(0, 0, 0)) Local $hBrush = _WinAPI_GetStockObject($WHITE_BRUSH) _WinAPI_SelectObject($hDC, $hPen) _WinAPI_SelectObject($hDC, $hBrush) _WinAPI_Rectangle($hDC, $tRect) _WinAPI_DeleteObject($hPen) _WinAPI_DeleteObject($hBrush) _WinAPI_EndPaint($hWnd, $tPaintStruct) $iRet = 0 Else $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) EndIf Case $WM_LBUTTONUP $bDrawRect = False $tRect.Right = BitAND($lParam, 0xFFFF) $tRect.Bottom = BitShift($lParam, 16) $tRect.Right -= Mod($tRect.Right, $iSnap) $tRect.Bottom -= Mod($tRect.Bottom, $iSnap) _WinAPI_InvalidateRect($hWnd, $tRect, True) Local $idBtn = GUICtrlCreateButton("", _ ($tRect.Left < $tRect.Right) ? $tRect.Left : $tRect.Right, _ ($tRect.Top < $tRect.Bottom) ? $tRect.Top : $tRect.Bottom, _ Abs($tRect.Left - $tRect.Right), _ Abs($tRect.Top - $tRect.Bottom)) _WinAPI_SetWindowSubclass(GUICtrlGetHandle($idBtn), $pBtnProc, $idBtn) $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) Case $WM_SIZE ;This prevents autoit's docking logic from moving controls around on window restore. $iRet = _WinAPI_DefWindowProcW($hWnd, $iMsg, $wParam, $lParam) Case Else $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) EndSwitch Return $iRet EndFunc ;==>WndProc Func btnProc($hWnd, $iMsg, $wParam, $lParam, $iIdSubclass, $dwRefData) Local $iRet Local Static $iXOffset, $iYOffset Switch $iMsg Case $WM_NCHITTEST Local $aPoint[2] = [BitAND($lParam, 0xFFFF), BitShift($lParam, 16)] ;Mouse coords can be negative on edge cases! If BitAND($aPoint[0], 0x8000) Then $aPoint[0] = BitOR(0xFFFF0000, $aPoint[0]) If BitAND($aPoint[1], 0x8000) Then $aPoint[1] = BitOR(0xFFFF0000, $aPoint[1]) Local $aPos = WinGetPos($hWnd), $iMar = 10 $iRet = $HTCAPTION If $aPoint[0] - $aPos[0] < $iMar Then $iRet = $HTLEFT If $aPoint[0] - $aPos[0] > ($aPos[2] - $iMar) Then $iRet = $HTRIGHT If $aPoint[1] - $aPos[1] < $iMar Then Switch $iRet Case $HTLEFT $iRet = $HTTOPLEFT Case $HTRIGHT $iRet = $HTTOPRIGHT Case Else $iRet = $HTTOP EndSwitch ElseIf $aPoint[1] - $aPos[1] > ($aPos[3] - $iMar) Then Switch $iRet Case $HTLEFT $iRet = $HTBOTTOMLEFT Case $HTRIGHT $iRet = $HTBOTTOMRIGHT Case Else $iRet = $HTBOTTOM EndSwitch EndIf If $aPoint[0] < 0 Then $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) If $aPoint[1] < 0 Then $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) _WinAPI_RedrawWindow($hWnd) Case $WM_NCLBUTTONDBLCLK ;Prevent double-click maximizing in "caption" If $wParam <> $HTCAPTION Then $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) Case $WM_SIZING Local $tRect = DllStructCreate($tagRect, $lParam) Local $tRect2 = _WinAPI_GetWindowRect($hWnd) $tRect.Left += Mod($tRect2.Left - $tRect.Left, $iSnap) $tRect.Top += Mod($tRect2.Top - $tRect.Top, $iSnap) $tRect.Right += Mod($tRect2.Right - $tRect.Right, $iSnap) $tRect.Bottom += Mod($tRect2.Bottom - $tRect.Bottom, $iSnap) $iRet = True Case $WM_MOVING Local $tRect = DllStructCreate($tagRect, $lParam) Local $tRect2 = _WinAPI_GetWindowRect($hWnd) $iXOffset += $tRect.Left - $tRect2.Left $iYOffset += $tRect.Top - $tRect2.Top Local $iSnapH = Floor($iXOffset / $iSnap) * $iSnap Local $iSnapV = Floor($iYOffset / $iSnap) * $iSnap $iXOffset -= $iSnapH $iYOffset -= $iSnapV $tRect.Left = $tRect2.Left + $iSnapH $tRect.Right = $tRect2.Right + $iSnapH $tRect.Top = $tRect2.Top + $iSnapV $tRect.Bottom = $tRect2.Bottom + $iSnapV $iRet = 0 Case $WM_EXITSIZEMOVE $iXOffset = 0 $iYOffset = 0 $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) Case $WM_SETCURSOR Local $iSrc = BitAND($lParam, 0xFFFF), $iEvent = BitShift($lParam, 16) If $iSrc = $HTCAPTION And $iEvent = $WM_LBUTTONDOWN Then _WinAPI_SetCursor($hCursor_Cross) $iRet = 1 Else $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) EndIf Case Else $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) EndSwitch Return $iRet EndFunc ;==>btnProc Edited Thursday at 12:39 PM by MattyD jaberwacky and Gianni 1 1
jaberwacky Posted Thursday at 10:00 PM Author Posted Thursday at 10:00 PM keep em comin MattyD 1 Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
jaberwacky Posted Saturday at 02:20 PM Author Posted Saturday at 02:20 PM On 10/28/2025 at 7:36 AM, WildByDesign said: Attached is AutoItObject v1.2.8.3 I just noticed something ... where would I find v1.2.8.3? Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
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