AutoGUI - Script Editor, GUI Designer, Debugger and Tools

Old Topics related to the original "AutoGUI" ahk script editor.
hunter99
Posts: 129
Joined: 20 Jan 2014, 17:57

Re: AutoGUI - GUI Designer and Script Editor

02 Dec 2015, 19:40

Alguimist:
Great work, it the best I have seen and keeps getting better.
One feature seems to be broken in version 1.1.0:

In Properties window the g-Label is put in the controls option field when the Apply button is hit; as before. But now the Target label and its return do not get built in script, as in previous version .
That, in IMHO was a very neat feature, not seen in other published GUI builder.
Thanks for this useful and time saving program.

hunter99
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

02 Dec 2015, 23:46

The line "; End of the GUI section" is a delimiter after which routines or functions can be written. This is more convenient, since code can be tested while the GUI has not been finished yet.

For example:

Code: Select all

#NoEnv
#Warn
SetWorkingDir %A_ScriptDir%

Menu Tray, Icon, shell32.dll, 112
Gui Color, White
Gui Add, GroupBox, x9 y6 w277 h95
Gui Add, Text, x20 y27 w68 h23 +0x200, Username:
Gui Add, Edit, hWndhUsername vUsername gValidateUsername x93 y27 w180 h23, @
Gui Add, Text, x20 y62 w68 h23 +0x200, Password:
Gui Add, Edit, vPassword x93 y62 w180 h23 Password, PASSWORD
Gui Add, ListView, x-1 y112 w300 h49 -Hdr Disabled, ListView
Gui Add, Button, gCheckPassword x68 y125 w75 h23 Default, &OK
Gui Add, Button, gGuiClose x153 y125 w75 h23, &Cancel
Gui Show, w297 h160, Login
Return

GuiEscape:
GuiClose:
    ExitApp

; End of the GUI section

ValidateUsername:
	Gui Submit, Nohide
	If (RegExMatch(Username, "[^\w\-]")) {
		PtrType := (A_PtrSize = 8) ? "Ptr" : "UInt"
		EM_SHOWBALLOONTIP := 0x1503
		Title := "Invalid input"
		Text := "Only letters, numbers, underscores and hyphens are allowed."
		cbSize := (A_PtrSize = 8) ? 32 : 16
		VarSetCapacity(EDITBALLOONTIP, cbSize)
		NumPut(cbSize, EDITBALLOONTIP, 0, "Int")
		NumPut(&Title, EDITBALLOONTIP, (A_PtrSize = 8) ? 8 : 4, PtrType)
		NumPut(&Text,  EDITBALLOONTIP, (A_PtrSize = 8) ? 16 : 8, PtrType)
		NumPut(3, EDITBALLOONTIP, (A_PtrSize = 8) ? 24 : 12, "Int")
		SendMessage EM_SHOWBALLOONTIP, 0, &EDITBALLOONTIP,, ahk_id%hUsername%
	}
Return

CheckPassword:
	Gui Submit, NoHide
	If (Password == "password") {
		Run Notepad
	} Else {
		MsgBox 0x2010, Error, The password is incorrect.
	}
Return
Eventually, the script will be generated in a way that only the affected lines will be updated, and then, double-clicking a control, rather than displaying the change text dialog, will place the cursor inside a function block.
hunter99
Posts: 129
Joined: 20 Jan 2014, 17:57

Re: AutoGUI - GUI Designer and Script Editor

03 Dec 2015, 07:42

Hi Alguimist:
Thanks for the fast reply, see the reasoning now. I'm getting too old and lazy, thought I could save some typing of the labels and their returns. Plus not having to remember the label name. I could have saved a post if I did a little more testing. Thanks again for straightening me out.
hunter99
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

13 Dec 2015, 16:07

Version 1.1.1. Improved Menu Editor.
Menu Editor.png
(131.11 KiB) Downloaded 11 times
Edit: reuploaded screenshot.
Last edited by Alguimist on 04 Aug 2021, 12:27, edited 1 time in total.
User avatar
huyaowen
Posts: 109
Joined: 28 Jul 2014, 01:15

Re: AutoGUI - GUI Designer and Script Editor

14 Dec 2015, 02:16

looks very well done, one of the most polished scripts ive seen
User avatar
huyaowen
Posts: 109
Joined: 28 Jul 2014, 01:15

Re: AutoGUI - GUI Designer and Script Editor

14 Dec 2015, 02:20

@Alguimist Can Autogui support to resize the control size in drag-drop method?

I re-open a file which saved at windows7 using windows2003 with 32bit-ahk,all controls are invisable.then add a control again.all the saved code is empty.

I also run Autogui on surface windows10,the position where I want to place the control has a long distance with the location of controls' actual appear.
Last edited by huyaowen on 16 Dec 2015, 05:23, edited 1 time in total.
hunter99
Posts: 129
Joined: 20 Jan 2014, 17:57

Re: AutoGUI - GUI Designer and Script Editor

14 Dec 2015, 07:38

Hi Alguimist:

AutoGUI just gets better and better, I'm sure many appreciate all your hard work.

Scaling problems are seen at higher than normal DPIs. Found this right after I tried your first version.
Had seen the same thing the year before on another GUI builder. I put these changes in your first version, but waited to post it. Wanted to see if anyone else uses higher than normal DPI. Then forgot about it. Guess I'm the only old guy.

These two changes are only needed if computer display DPI is higher than 100%.
Control panel display may say Smaller, or 100%, or default.
To see what I mean change your to higher than normal, temporarily.

This fixes the controls Placement, Alignment t & b, Center h & v, and Space h & v.
Change Line 624 "Gui %Child%: New, LabelChild hWndhChildWnd Resize OwnerAuto"
to add "-DPIScale" at its end.

This fixes placement of selection highlight on controls. The highlight is placed to the right and low, the distance increases with each control added.
Change Line 1327 "Gui New, hWndhSelWnd ToolWindow -Border -Caption +E0x20 +OwnerAuto +LastFound"
to add "-DPIScale" at its end.

hunter99
ozzii
Posts: 481
Joined: 30 Oct 2013, 06:04

Re: AutoGUI - GUI Designer and Script Editor

15 Dec 2015, 03:06

Hi Alguimist,
Just try the script, and to say that it's great ;).
I've just test a simple GUI. One think that missing (or maybe not found), add a label to a button and maybe also add it to a label. On my example it's the gBTOK.

Code: Select all

	Gui New, +AlwaysOnTop
	Gui Font, s12 Bold cRed, Calibri
	Gui Add, Text, x64 y24 w120 h23 +0x200 Center, Pas d'erreur !!
	Gui Font
	Gui Add, Button, x83 y80 w75 h23 Default gBTOK, Sortie
	Gui Show, w241 h117, Résultat
	Return

	BTOK:
	GuiEscape:
	GuiClose:
		Gui, Destroy
		ExitApp
	return
User avatar
TheDewd
Posts: 1503
Joined: 19 Dec 2013, 11:16
Location: USA

Re: AutoGUI - GUI Designer and Script Editor

15 Dec 2015, 09:33

Here are a few more GUI samples I cloned:

Notepad Page Setup

Code: Select all

#NoEnv
#Warn
#SingleInstance Force
SetWorkingDir %A_ScriptDir%

Gui +LastFound -MaximizeBox -MinimizeBox -Resize
DllCall("uxtheme\SetWindowThemeAttribute", "ptr", WinExist(), "int", 1, "int64*", 6 | 6<<32, "uint", 8)
Gui Add, GroupBox, x12 y13 w336 h91, Paper
Gui Add, Text, x24 y39 w54 h13, Si&ze:
Gui Add, DropDownList, x96 y37 w240, 11" x 17"|12" x 18"|16K (195 x 267 mm)|5.5" x 8.5"|8" x 13"|8.25" x 13"|8.5" x 13"|8K (267 x 390 mm)|A3 (297 x 420 mm)|A4 (210 x 297 mm)|A5 (148 x 210 mm)|A6 (105 x 148 mm)|B4 JIS (257 x 364 mm)|B5 JIS (182 x 257 mm)|B6 JIS (128 x 182 mm)|C5 Env. (162 x 229 mm)|C6 Env. (114 x 162 mm)|Com10 Env. (4.125" x 9.5")|Custom Paper Size|Custom Paper Size1(8.50" x 11.00")|Custom Paper Size10(8.50" x 11.00")|Custom Paper Size2(8.50" x 11.00")|Custom Paper Size3(8.50" x 11.00")|Custom Paper Size4(8.50" x 11.00")|Custom Paper Size5(8.50" x 11.00")|Custom Paper Size6(8.50" x 11.00")|Custom Paper Size7(8.50" x 11.00")|Custom Paper Size8(8.50" x 11.00")|Custom Paper Size9(8.50" x 11.00")|DL Env. (110 x 220 mm)|Executive (7.25" x 10.5")|Legal (8.5" x 14")|Letter (8.5" x 11")||Monarch Env. (3.875" x 7.5")
Gui Add, Text, x24 y73 w54 h13, &Source:
Gui Add, DropDownList, x96 y68 w240, Auto Tray Select||Blue|Bond|Cardstock|Coated|Color|Color 1|Color 2|Envelope|Glossy|Gray|Green|Inkjet Plain Paper|Inkjet Postcard|Ivory|Labels|Letterhead|Orange|Pink|Plain|Plain & Recycled|Postcard|Preprinted|Prepunched|Purple|Recycled|Red|Special|Special 2|Special 3|Tab Stock|Thick|Thick 2|Thick 3|Thin|Translucent|Transparency|Tray 1|Tray 2|Tray 3|Tray 4|Tray 5|Yellow
Gui Add, GroupBox, x12 y112 w96 h91, Orientation
Gui Add, Radio, x24 y133 w78 h20 Checked, P&ortrait
Gui Add, Radio, x24 y167 w78 h20, L&andscape
Gui Add, GroupBox, x120 y112 w228 h91, Margins (inches)
Gui Add, Text, x132 y138 w48 h13, &Left:
Gui Add, Edit, x180 y133 w42 h20, 0.75
Gui Add, Text, x246 y138 w48 h13, &Right:
Gui Add, Edit, x294 y133 w42 h20, 0.75
Gui Add, Text, x132 y169 w48 h13, &Top:
Gui Add, Edit, x180 y167 w42 h20, 1
Gui Add, Text, x246 y169 w48 h13, &Bottom:
Gui Add, Edit, x294 y167 w42 h20, 1
Gui Add, Text, x12 y219 w44 h13, &Header:
Gui Add, Edit, x84 y218 w261 h20, &f
Gui Add, Text, x12 y250 w44 h13, &Footer:
Gui Add, Edit, x84 y249 w261 h20, Page &p
Gui Add, Button, x366 y283 w75 h23 Default, OK
Gui Add, Button, x447 y283 w75 h23, Cancel
Gui Add, GroupBox, x360 y13 w162 h257, Preview
Gui, Add, Progress, x399 y83 w100 h130 CA0A0A0 BackgroundA0A0A0 -Theme, 100
Gui, Add, Progress, x391 y75 w100 h130 CFFFFFF Background808080 -Theme, 100
Gui Show, w534 h319, Page Setup - Sample GUI
Return

GuiEscape:
GuiClose:
    ExitApp

; End of the GUI section
WordPad Page Setup

Code: Select all

#NoEnv
#Warn
#SingleInstance Force
SetWorkingDir %A_ScriptDir%

Gui +LastFound -MaximizeBox -MinimizeBox -Resize
DllCall("uxtheme\SetWindowThemeAttribute", "ptr", WinExist(), "int", 1, "int64*", 6 | 6<<32, "uint", 8)
Gui, Font, s9, Segoe UI
Gui Add, Progress, x161 y24 w115 h150 CA0A0A0 BackgroundA0A0A0 -Theme, 100
Gui Add, Progress, x152 y15 w115 h150 CFFFFFF Background808080 -Theme, 100
Gui Add, GroupBox, x14 y180 w392 h105, Paper
Gui Add, Text, x28 y210 w63 h15, Si&ze:
Gui Add, DropDownList, x112 y206 w280, 11" x 17"|12" x 18"|16K (195 x 267 mm)|5.5" x 8.5"|8" x 13"|8.25" x 13"|8.5" x 13"|8K (267 x 390 mm)|A3 (297 x 420 mm)|A4 (210 x 297 mm)|A5 (148 x 210 mm)|A6 (105 x 148 mm)|B4 JIS (257 x 364 mm)|B5 JIS (182 x 257 mm)|B6 JIS (128 x 182 mm)|C5 Env. (162 x 229 mm)|C6 Env. (114 x 162 mm)|Com10 Env. (4.125" x 9.5")|Custom Paper Size|Custom Paper Size1(8.50" x 11.00")|Custom Paper Size10(8.50" x 11.00")|Custom Paper Size2(8.50" x 11.00")|Custom Paper Size3(8.50" x 11.00")|Custom Paper Size4(8.50" x 11.00")|Custom Paper Size5(8.50" x 11.00")|Custom Paper Size6(8.50" x 11.00")|Custom Paper Size7(8.50" x 11.00")|Custom Paper Size8(8.50" x 11.00")|Custom Paper Size9(8.50" x 11.00")|DL Env. (110 x 220 mm)|Executive (7.25" x 10.5")|Legal (8.5" x 14")|Letter (8.5" x 11")||Monarch Env. (3.875" x 7.5")
Gui Add, Text, x28 y248 w63 h15, &Source:
Gui Add, DropDownList, x112 y244 w280, Auto Tray Select||Blue|Bond|Cardstock|Coated|Color|Color 1|Color 2|Envelope|Glossy|Gray|Green|Inkjet Plain Paper|Inkjet Postcard|Ivory|Labels|Letterhead|Orange|Pink|Plain|Plain & Recycled|Postcard|Preprinted|Prepunched|Purple|Recycled|Red|Special|Special 2|Special 3|Tab Stock|Thick|Thick 2|Thick 3|Thin|Translucent|Transparency|Tray 1|Tray 2|Tray 3|Tray 4|Tray 5|Yellow
Gui Add, GroupBox, x14 y293 w112 h105, Orientation
Gui Add, Radio, x28 y319 w91 h23 Checked, P&ortrait
Gui Add, Radio, x28 y356 w91 h23, L&andscape
Gui Add, GroupBox, x140 y293 w266 h105, Margins (inches)
Gui Add, Text, x154 y323 w56 h15, &Left:
Gui Add, Edit, x207 y319 w56 h23, 1.25
Gui Add, Text, x287 y323 w56 h15, &Right:
Gui Add, Edit, x340 y319 w56 h23, 1.25
Gui Add, Text, x154 y360 w56 h15, &Top:
Gui Add, Edit, x207 y356 w56 h23, 1
Gui Add, Text, x287 y360 w56 h15, &Bottom:
Gui Add, Edit, x340 y356 w56 h23, 1
Gui Add, CheckBox, x14 y413 w138 h19 Checked, Print Page &Numbers
Gui Add, Button, x231 y443 w84 h26 Default, OK
Gui Add, Button, x322 y443 w84 h26, Cancel
Gui Show, w420 h478, Page Setup - Sample GUI
Return

GuiEscape:
GuiClose:
    ExitApp

; End of the GUI section
Paint Image Properties

Code: Select all

#NoEnv
#Warn
#SingleInstance Force
SetWorkingDir %A_ScriptDir%

Gui +LastFound -MaximizeBox -MinimizeBox -Resize
DllCall("uxtheme\SetWindowThemeAttribute", "ptr", WinExist(), "int", 1, "int64*", 6 | 6<<32, "uint", 8)
Gui, Font, s9, Segoe UI
Gui Add, GroupBox, x12 y13 w343 h84, File Attributes
Gui Add, Text, x23 y34 w126 h15, Last Saved:
Gui Add, Text, x151 y34 w156 h15, 12/14/2015 4:16 PM
Gui Add, Text, x23 y53 w126 h15, Size on disk:
Gui Add, Text, x151 y53 w156 h15, 37.8KB
Gui Add, Text, x23 y71 w126 h15, Resolution:
Gui Add, Text, x151 y71 w156 h15, 96 DPI
Gui Add, Text, x12 y221 w63 h19, &Width:
Gui Add, Edit, x72 y218 w63 h23, 560
Gui Add, Text, x142 y221 w70 h19, &Height:
Gui Add, Edit, x198 y218 w63 h23, 300
Gui Add, Button, x268 y218 w88 h26, &Default
Gui Add, Button, x173 y266 w88 h26 Default, OK
Gui Add, Button, x268 y266 w88 h26, Cancel
Gui Add, GroupBox, x12 y103 w168 h105, Units
Gui Add, Radio, x23 y131 w86 h19, &Inches
Gui Add, Radio, x23 y150 w142 h19, Centi&meters
Gui Add, Radio, x23 y169 w91 h19 Checked, &Pixels
Gui Add, GroupBox, x187 y103 w168 h105, Colors
Gui Add, Radio, x198 y131 w135 h19, &Black and white
Gui Add, Radio, x198 y150 w91 h19 Checked, Co&lor
Gui Show, w368 h306, Image Properties - Sample GUI
Return

GuiEscape:
GuiClose:
    ExitApp

; End of the GUI section
User avatar
fischgeek
Posts: 433
Joined: 29 Jan 2014, 21:39

Re: AutoGUI - GUI Designer and Script Editor

17 Dec 2015, 14:20

When I try to run it, I receive an error on line 3356 "... missing an end percent sign". So, naturally I go and look and find everything is just fine. You're using an expression to call out a property. Cool. Fine. It should work. So, as a troubleshooting step I switched the line

Code: Select all

SplitPath, % Sci[g_TabIndex].FullFileName,, Folder
to

Code: Select all

test := Sci[g_TabIndex].FullFileName
SplitPath, %test% ,, Folder
But, when I run it now, I just see a "Developer" script running, and when I edit it, it is just a notepad with default ahk instructions. What on earth am I doing wrong? lol.
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

17 Dec 2015, 22:57

@fischgeek: Which version of AHK do you use? Can you test the script on another computer or on a virtual machine?
Gabriel_ACE
Posts: 2
Joined: 17 Dec 2015, 14:10

Re: AutoGUI - GUI Designer and Script Editor

18 Dec 2015, 13:08

the password for the file?
User avatar
TheDewd
Posts: 1503
Joined: 19 Dec 2013, 11:16
Location: USA

Re: AutoGUI - GUI Designer and Script Editor

18 Dec 2015, 14:04

Gabriel_ACE wrote:the password for the file?
There is no password... Extract with 7-Zip
http://skylineservers.dl.sourceforge.ne ... I-1.1.1.7z
gallaxhar
Posts: 143
Joined: 03 Sep 2014, 06:35

Re: AutoGUI - GUI Designer and Script Editor

19 Dec 2015, 10:10

this is like, super impressive
please keep developing it
User avatar
fischgeek
Posts: 433
Joined: 29 Jan 2014, 21:39

Re: AutoGUI - GUI Designer and Script Editor

22 Dec 2015, 16:14

Just installed the latest version of ahk. Tried it and get the same results. Also same thing on another machine. One is windows8 and one is windows10. Am I just stupid? All I need to do is open the script file named AutoGUI.ahk no?
aaffe
Posts: 192
Joined: 16 Jan 2014, 04:23

Re: AutoGUI - GUI Designer and Script Editor

23 Dec 2015, 02:43

Yes, thats right.
User avatar
maestrith
Posts: 825
Joined: 16 Oct 2013, 13:52

Re: AutoGUI - GUI Designer and Script Editor

23 Dec 2015, 11:56

Neat project :) If you need any help with SciLexer.dll let me know. I have a small project that uses it. https://autohotkey.com/board/topic/85996-ahk-studio/
John H Wilson III 05/29/51 - 03/01/2020. You will be missed.AHK Studio OSDGUI Creator
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
User avatar
SnowFlake
Posts: 368
Joined: 28 Apr 2015, 05:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

23 Dec 2015, 16:54

@maestrith "a small project" Hahahahahah Nice Joke xD, its a huge project!

also Merry Christmas guys :D
:yawn:
User avatar
kunkel321
Posts: 957
Joined: 30 Nov 2015, 21:19

Re: AutoGUI - GUI Designer and Script Editor

23 Dec 2015, 18:33

WOW! Love this! Thanks for making and sharing it.
I tried putting it here: C:\Program Files\AutoHotkey\AutoGUI-1.1.1 (64x Windows)
Got this error
---------------------------
Program
---------------------------
Script file not found:
C:\Program
---------------------------
OK
---------------------------
Then I moved the AutoGUI folder to: C:\AutoGUI-1.1.1
It seems to work fine now.

EDIT: Actually, upon looking at the code, maybe this is only designed for 32bit installations(?) Please advice.
Also, is it okay to compile the script? (Just so that I'll have fewer little green Hs in my system tray :) )
ste(phen|ve) kunkel

Return to “Old Topics”

Who is online

Users browsing this forum: No registered users and 4 guests