Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Basic GUI creator.


  • Please log in to reply
339 replies to this topic
ruespe
  • Members
  • 567 posts
  • Last active: Dec 01 2014 07:59 PM
  • Joined: 17 Jun 2008
Hi maestrith,

congrats, it's becoming more and more perfect. I only found some small things:

- adding comments behind a code-line are shown as label-text in preview, while being stored and working well in the script
Gui,17:add,Checkbox,x33 y299 w110 h10,Checkbox ;asdf
- GUI,font is not saved to Clipboard

- GUI,font changes the font for the whole GUI, because it's inserted as 1st line. When I change the position of that line, the preview is shown correctly, but at storing the line moves to 1st position again

- GUI,font: changing from bold, italic, strike, underline to norm is ignored by the preview (code is correct).

- GUI Number is ignored when not numeric. With latest version of AHK_L also names and long numbers are allowed.

- Options like "Left" are ignored in preview
Gui,17:add,Button,x23 y429 w70 h40 Left  +0x1,Button
- "Test script" seems to reload the GUI in GuiCreator instead of showing a test-version of the generated script (what I would expect; see my comment above "Why did you remove the "testing" option? You simply could store the code as Temp-file and call it by "Run, temp.ahk"."). Perhaps you can leave the current functionality to the menu as "Refresh GUI"

- Please add the shortcuts (for moving/resizing and for self-defined hotkeys) to the menu

- Please change the label "Copy GUI to Clipboard" to "Save GUI to Clipboard" and move it 1 line up. Don't show the MsgBox afterwards (or kill it automaticaly after 1 second).

- What about a Menu item "Copy size", which combines width and hight?

- And what about some submenus? I.e.
File
> New Gui
> Load Gui
> ....

Copy
> Copy Size
> Copy Width
> Copy Hight



Sorry for having only such nice-to-have-features, but unfortunately I didn't find any severe bugs :p

I think, you really now can start supporting manually created/changed scripts. I'm sure, you'll have some good ideas.

maestrith
  • Members
  • 786 posts
  • Last active: Apr 10 2019 01:28 PM
  • Joined: 17 Sep 2005
Welcome back ruespe. I hope that you enjoyed your holiday. I am not home currently so I will have to wait until I get home to look into it but I did not get the font portion of the script working for individual controls, i just wanted to get something in the script to have a global effect. I will try to work on making it a control by control option but that will take a lot of time.

r7393s
  • Members
  • 22 posts
  • Last active: Apr 02 2012 05:06 PM
  • Joined: 26 Feb 2011
I just tried the updated version and now it loads the GUI and asks for the font to use, but it seems there's another bug that cropped up I believe.

After I load the GUI and select the font to use, the right-click menus don't show up at all. There's no error, just nothing comes up, so I can't edit the GUI.

Again, thank you for your great work!! :)

maestrith
  • Members
  • 786 posts
  • Last active: Apr 10 2019 01:28 PM
  • Joined: 17 Sep 2005
0.001.42
Changed:
-Fonts can be set per control
Removed:
-Global font removed for now.

ruespe
  • Members
  • 567 posts
  • Last active: Dec 01 2014 07:59 PM
  • Joined: 17 Jun 2008
IMPRESSIVE!

Code: Mmmhhh..., do you find everything at once in your code?

For now, I'm sure, you do!

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007
I've tried this on two of my computers today and get an error at startup,
Error at line 519,  Iniread requires at least 4 parameters.
Is this an AHK_L script?
I you need new version of any scripts I haven't re-uploaded yet feel free to pm me.

maestrith
  • Members
  • 786 posts
  • Last active: Apr 10 2019 01:28 PM
  • Joined: 17 Sep 2005
Yes this script was developed using AHK_L but I do have a compiled version that should work with any version.

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007
Ok, thanks. I thought I had read on the first page that it should work with both versions but I didn't read any further. The compiled version seems to work. Looks great, will be very handy
I you need new version of any scripts I haven't re-uploaded yet feel free to pm me.

maestrith
  • Members
  • 786 posts
  • Last active: Apr 10 2019 01:28 PM
  • Joined: 17 Sep 2005
0.001.45
Changed:
-Some of the names, like move, have been changed to move control. I am working on making this a plugin for my Script Writer and I needed to change them. Let me know if something does not work.
0.001.44
Fixed:
-Had an issue with renaming not working properly with newly created GUIs
0.001.43
Fixed:
-Test script does not lose font properties

xxOrpheus
  • Members
  • 134 posts
  • Last active: Jul 21 2014 12:15 AM
  • Joined: 27 Sep 2011
Resizing is really buggy :S it flickers alot and is impossible to see

ruespe
  • Members
  • 567 posts
  • Last active: Dec 01 2014 07:59 PM
  • Joined: 17 Jun 2008
Suggestion 1:
Instead of +LButton and ^LButton use doubleclick as a more intuitive hotkey with both moving and sizing the Control.

Suggestion 2:
Instead of/additional to menuitems "Add..." create a new toolwindow (or a small area in the program-window) with icons for adding the controls.

Bug:
Hotkey F1 works independent of the active window.

Resizing is really buggy :S it flickers alot and is impossible to see

Hmmm... not at me.

maestrith
  • Members
  • 786 posts
  • Last active: Apr 10 2019 01:28 PM
  • Joined: 17 Sep 2005
f1 is no longer a global hotkey (sorry about that). I am not sure if I can make double click a hotkey. I will see what I can do

ruespe
  • Members
  • 567 posts
  • Last active: Dec 01 2014 07:59 PM
  • Joined: 17 Jun 2008
One possibility:
~LButton::
	If DblClk() 
	{
		MouseGetPos,,,,Control
		If Control
		{
			move_control(Control)
			resize_control(Control)
		}
	}
	Else
	{
		Click Down
		KeyWait,LButton
		Click up	
	}
Return


DblClk(DC_Time=0,DC_Circle=0)
{
	Static DC_LastX,DC_ThisX,DC_LastY,DC_ThisY,DC_LastWin,DC_ThisWin
	
	If (DC_Time + DC_Circle = 0)
	{
	; User eingestellte Werte aus der Windows Registry 
		RegRead,DC_Time,HKCU,Control Panel\Mouse,DoubleClickSpeed 
		RegRead,DC_Circle,HKCU,Control Panel\Mouse,DoubleClickHeight 
		DC_Time := max(DC_Time,400)
	}
	
	MouseGetPos DC_ThisX,DC_ThisY,DC_ThisWin
	; ToolTip,% DC_ThisX DC_LastX "`n"  DC_ThisY DC_LastY "`n" DC_ThisWin DC_LastWin
	If ( A_ThisHotkey != A_PriorHotkey 
	or A_TimeSincePriorHotkey > DC_Time
	or (abs(DC_LastX - DC_ThisX) > DC_Circle)
	or (abs(DC_LastY - DC_ThisY) > DC_Circle)
	or DC_LastWin != DC_ThisWin)
	{
;Singleclick / first click: remember last mouse-position
		DC_LastX := DC_ThisX
		DC_LastY := DC_ThisY
		DC_LastWin := DC_ThisWin
		Return 0
	}
	Else
	{
;Doubleclick
		Return 1
	}
}


Another one:
~LButton:: 
	If (A_ThisHotkey = A_PriorHotkey and A_TimeSincePriorHotkey < 400)
	{
	;Dblclk
		MouseGetPos,,,,Control
		If Control
		{
			move_control(Control)
			resize_control(Control)
		}
	}
	Else
	{
		Click Down
		KeyWait,LButton
		Click up	
	}
Return


maestrith
  • Members
  • 786 posts
  • Last active: Apr 10 2019 01:28 PM
  • Joined: 17 Sep 2005
Very nice suggestion! I have never used A_TimeSincePriorHotkey before. It is a very handy variable. I also was not aware of the registry value RegRead,DC_Time,HKCU,Control Panel\Mouse,DoubleClickSpeed for getting the doubleclick speed. Very handy. I have added it to the script.

maestrith
  • Members
  • 786 posts
  • Last active: Apr 10 2019 01:28 PM
  • Joined: 17 Sep 2005
0.001.53
Added:
-Reset font. When you change a font for a control all of the controls added after the change will come up at the new font. If you want to go back to the default font right click on any object and click on reset font. It will reset the font to the default
0.001.52
Added:
-When you open a program with a GUI it will find the first instance of the gui and allow you to edit it. All data will be saved and placed below the created or edited GUI in the script.
0.001.51
Changed:
-Double click to move and resize now depends on weather or not you have the option "Auto Resize after Create" checked. I personally do not use the auto resize all the time.
0.001.50
Added:
-Double click to move and resize
0.001.49
Fixed:
-f1 is no longer a hotkey