AutoGUI - Script Editor and GUI Designer

Discuss the AutoGUI IDE with a GUI designer and a script editor.
Guest

Re: AutoGUI - GUI Designer and Script Editor

27 Jan 2017, 06:21

Using Import GUI & Mod does not work for me.
I have re-created and saved the GUI (see source above) in the MOD Version then "Import GUI".
instead of the Text inside the Tab a black rectangle is shown. When changing or adding controls,
the code tab is changed and all text controls are gone.
If closing the file, then re-importing the GUI, then the code Windows is also incorrect,
the GUI Windows is empty, no controls are visible.

Generally what i'm trying to do is creating a GUI then change it by adding/removing controls etc. later after re-starting AutoGUI.
For me at least, I haven't found a working solution, not with the mod, Import GUI, nor Windows Cloning Tool.
chasbas

Re: AutoGUI - GUI Designer and Script Editor

27 Jan 2017, 18:55

I don't know the AutoGUI source code well enough to tell you what the problem is, but from your error message I can see that you have unzipped the AutoGUI file at least twice to a default directory. If it were me, just to uncomplicate things I would re-unzip it into (as it describes in the installation instructions) a subdirectory of the AutoHotKey installation directory, and try to run it from there.

*Then* if you get the same problem it should be easier to work out what's happening. Just a thought. Sorry I don't have any more concrete ideas.

cb

JackPJ wrote:Hi,

could someone tell me if I'm doing something clearly wrong/stupid here?

I've just downloaded the zipped file, unzipped it and tried to run AutoGUI.ahk.

Yet all I get is the attached error?

Am I missing something simple here?

Thanks

Jack
Guest

Re: AutoGUI - GUI Designer and Script Editor

27 Jan 2017, 19:03

Thank you so much RH - I originally posted this question thinking "I can't be the only one having this issue" and sure enough you were kind enough to share your solution. I will definitely try it out.

I was thinking of doing mods myself along the lines of dumping every single executed GUI command into another file (as in, "Gui, Editbox, asdfasdf", ...). Then I thought some more and went to bed.

I have to say to Alguimist that this is the most professional, impressive, complete and robust piece of software I've ever seen one person write, for free. Thank you so much for all your efforts.

RazorHalo wrote:I don't use the window cloning tool.

If you use my mods then you reload the GUI via the file menu>>Import GUI

The code would need to be created from that version of AutoGUI w/the mods to reload properly. I have a GUI I have been working on for a while that has ~100 controls on it and it reloads everything for the GUI. All variables and options and positions etc.
User avatar
SnowFlake
Posts: 365
Joined: 28 Apr 2015, 05:41
Google: floowsnaake
GitHub: floowsnaake
Contact:

Re: AutoGUI - GUI Designer and Script Editor

04 Feb 2017, 09:32

It works with Wine aso if you compile the .ahk script,some hick ups bu it works overall :)

picture:
https://s24.postimg.org/kjrevpev9/desktop_1_001.png
:yawn:
User avatar
joedf
Posts: 5959
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: AutoGUI - GUI Designer and Script Editor

04 Feb 2017, 14:04

Is that ahk with wine?
Rorqual
Posts: 10
Joined: 14 Jan 2017, 13:23

Re: AutoGUI - GUI Designer and Script Editor

15 Feb 2017, 18:49

I'll be making feature requests for reference here, I may implement them myself if I can figure it out

  • Add a new edit box to the top right or bottom left (ideal) of the program which searches the entire menu structure / control types of the program and activates that menu item or control type button upon pressing enter. An autocomplete dropdown should help the user find the menu item or control type that they partially type. This edit box should not have default keyboard focus (the editor should), the hotkey to give it focus should be Esc key, when the editor has focus. Then, Esc key again gives the editor focus back. Inspiration: Google docs and SlickEdit's command line
    Image
    Image
  • Better autocomplete in the editor, even after typing a random word like "RandomWord", typing "R" on the next line should show "RandomWord" as a match in the dropdown. When the autocomplete popup is shown, make the Ctrl+DownArrow and Ctrl+UpArrow keys not do what they normally do which is duplicate lines, instead, make the Caret move down or up respectively and cancel the autocomplete. This way the AutoComplete will not be as annoying when you don't need it and want to change lines. The previous hotkeys for moving / duplicating selection should be reinstated when the autocomplete is not shown.
    Speaking of the ctrl+up and ctrl+down hotkeys, they aren't consistent. Ctrl+down duplicates a line, Ctrl+Up moves a line up. How about ctrl+down moves a line down, and ctrl+shift+up duplicates a line up, and ctrl+shift+down duplicates a line down? Inspiration: LightTable (http://lighttable.com/)
    Image
    Image
  • After dragging something in the GUI design window, allow an undo (Ctrl+Z) and redo (Ctrl+Y) operation to move the selection backward/forward in history of its positions. Inspiration: Photoshop
  • Allow multi line editing of text. Currently holding down ALT and dragging a line will show the multiline cursor, but it does not type on all the lines. Inspiration: Ahk-Studio
  • After using an operation like Comment/Uncomment (Ctrl+K), highlight (select) the previous selection, so you can easily do something else to the selection without having to select again
  • Save text files in the background after every change, so the user never has to save. Save the undo/redo history of a file all the way back to the beginning, so a user can restore a previous state using undo/redo. Inspiration: zed editor (zedapp.org)
  • Display the current zoom percentage in the text editor, and allow to restore default zoom by a menu option. Inspiration: Notepad++
  • Menu option to pretty-format code / indent code / format braces in a given style. Inspiration: Ahk-Studio
  • Clone tool to clone individual tabs of a dialog not just the active tab
  • Code folding
  • Collapse/Expand all code folding, add these as menu options then give them hotkeys like Alt+0 and Alt+Shift+0. Inspiration: Notepad++
  • In the Find dialog, the Find Next/Previous should be able to go wrap the beginning/end of file instead of returning 'could not find' because it reached the beginning/end of a document. This should be an option below "Backslashed characters". The option should be named something like "Wrap at beginning/end". Inspiration: Slickedit (https://www.slickedit.com/)
    Image
  • After doing a "Mark All" operation from the find dialog, list the line numbers of each found string in a pane below the text editor, clicking each match/line should jump to that line in the editor. Inspiration: Notepad++
  • The left hand "Control Types" pane should have multiple tabs at the top or bottom, which can be toggled (when it has keyboard focus, Tab or Shift+Tab navigates to next tab or previous tab, when it doesn't, clicking other tabs navigates to them. Tabs can be disabled by a menu option. The first tab will be "Control Types", then "Function list", then "Label list", and then "Hotkey list" for the active document, which jumps to the function, label, or hotkey. The last tab should be a file explorer similar to AHK studios which shows all the .ahk files in the current workspace so we can quickly switch between many files. Inspiration: SlickEdit
    Image
  • Ability to highlight a selection, save it as a snippet and give the snippet a name in a pop up dialog. There should be a new menu option "Snippets" which lists all the named snippets in a drop down menu. We should be able to nest snippets under parent menus for handling a large amount of them. Entire files or just individual functions could be saved as snippets. Inspiration: Tidbit's editor
  • Menu option to upload the current file (or just a selection if a selection is highlighted) to http://p.ahkscript.org/, and then copy the link to the clipboard and open the default browser to that page. Name it something like "Upload to ahkbin".
  • Create include from selection - Adds a new Include to your project using the currently selected text. Inspiration: AHK-Studio
  • Navigating to Braces, Navigating to the borders of a code block. Navigate to the code block start, press Ctrl+Open Bracket, Navigate to the code block end, press Ctrl+Close Bracket. This seems to already be implemented, but not documented. It needs menu options so people know it's there. Suggest to put under "Edit" menu. It also needs an improvement, detect if the Caret is at a nested brace, if it is, the hotkey should jump to the matching brace at that nest level, not to the start/end of the block. Inspiration: WebStorm (https://www.jetbrains.com/webstorm/)
  • Clicking the line:column number in the status bar should fire the Go to line dialog. It would be fancy if the Go to line dialog was renamed "goto line:column" and allowed us to specify things like 80:4 in the edit box, so we can go to the 4th character position on line 80. Inspiration: WebStorm
    Image
  • Smartpaste (auto indent lines when you paste them in a block such as an if block). Inspiration: AhkStudio and SlickEdit
    Image
  • Change Editor Colors as a menu option similar to the Change Editor Font (the line number background color, font color, editor text color, editor background color)
  • Suggest rename "Constantine" in menu to "Windows API Constants Explorer", Suggest rename "Expressive" in menu to "Regular Expression Tool", Suggest rename "A_Variables" in menu to "AutoHotkey Built-in Variables". Because explanatory names help new users discover/click things for the first time rather than have to learn new vocabulary.
  • Make the Regular Expression Tool the same color scheme as the AutoHotkey Built in variables tool and the Windows API Constants Explorer, same font sizes too
    Image
  • Remove the horizontal scrollbar from the editor when it isn't needed. When "Wrap long lines" is turned off, a scrollbar appears for no reason because there is no whitespace that long (open a new file to test it and uncheck that menu option.)
  • Sort the controls in the Control Types pane alphabetically, it appears to start off this way but there is "ActiveX, Custom Class, and Command Link" at the end out of order
  • Add all of the Control Types to the main menu in its own menu item named "Control Types", then allow us to disable the Control types pane and just work with the menu. Suggest rename "Control Types" menu to "AutoBuild", have a menu item "Control", then all of the controls like Button, Checkbox, Combobox, listed under that parent. Later, you could add other things to be added such as "Snippet" to the "AutoBuild" menu, or even a list of autohotkey commands under a "Commands" menu item, all listed under the parent menu "AutoBuild" on the main menu

Edit:
I've made a couple of formatting changes to Expressive, Constantine, A_Variables, the Import GUI, sorted the controls, changed default font to Consolas size 11 (much easier to read) and I'm starting to get a little familiar with AutoGUI sourcecode, but I've also noticed new things:
The syntax highlighting appears to be messed up, sporadically letters get bolded and the foreground for that character only gets overridden to be transparent.
if you type "#SingleInstance, Force", the "Force" word should be syntax-highlighted but it isn't

changes gif:
Image

@Alguimist, is there a way for me to use Scite4AHK's syntax highlighting style out of the box in AutoGUI, then I could start altering that? I can't seem to narrow down what is causing the weird formatting glitch for AutoGUI's lexer.
Rorqual
Posts: 10
Joined: 14 Jan 2017, 13:23

Re: AutoGUI - GUI Designer and Script Editor

18 Feb 2017, 11:54

Below is a patch for Editor.ahk, previously, the 'Match Brace' behavior was bad, it would especially act up for some reason when word wrap was turned on, highlighting every character that triggered an autocomplete because there was no matchlist for what constituted a brace (Scintilla does not do this automatically).

Added functionality:
1) detects braces to the left AND right of the caret.
2) detects caret change, removes highlighting when caret leaves brace
3) ignores non-brace characters (added IsBrace() function)

Because it was driving me crazy, I also changed the CurPos variable to be named CaretPos, since the CURSOR is the mouse pointer floating around the screen :-)

I also added a background color to matched braces of bright yellow, and the foreground color of black since they become bolded on a match - this is because braces have to have a background color, if you don't specify one, it will default to some color and mess up the 'highlight active line' because the brace will have a different background color - so we might as well give it a consistent one, I chose yellow but that is easy to change.
Line 393,

Code: [Select all] [Download] GeSHi © Codebox Plus

Sci[n].BraceHighlight(Invalid_Position, 999999999)
should ideally be

Code: [Select all] [Download] GeSHi © Codebox Plus

Sci[n].BraceHighlight(Invalid_Position, Invalid_Position)
instead, but the dllcall in Scintilla.ahk could not handle a negative integer value of -1 (which is the value of Invalid_Position). I believe the dllcall was from Pulover's Macro Creator, and I'm not sure why it doesn't handle negative ints. It even has a comment that says it DOES handle negative ints, but it doesn't. Perhaps someone else can tell us?

Here is the dllcall code:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Code: [Select all] [Expand] [Download] (Editor.ahk)GeSHi © Codebox Plus

guest3456
Posts: 2057
Joined: 09 Oct 2013, 10:31

Re: AutoGUI - GUI Designer and Script Editor

18 Feb 2017, 12:01

Rorqual wrote: but the dllcall in Scintilla.ahk could not handle a negative integer value of -1 (which is the value of Invalid_Position). I believe the dllcall was from Pulover's Macro Creator, and I'm not sure why it doesn't handle negative ints. It even has a comment that says it DOES handle negative ints, but it doesn't. Perhaps someone else can tell us?

Here is the dllcall code:

Code: [Select all] [Download] GeSHi © Codebox Plus

    ; The fast way to control Scintilla
return DllCall(%hwnd%_df ; DIRECT FUNCTION
,"UInt" ,%hwnd%_dp ; DIRECT POINTER
,"UInt" ,!(msg+0) ? %msg% : msg
,"Int" ,inStr(wParam, "-") ? wParam : (%wParam%+0 ? %wParam% : wParam) ; handles negative ints
,"Int" ,%lParam%+0 ? %lParam% : lParam)
}



that DllCall code doesn't look right

doing %wParam% (and for lParam) does a double-dereference within an expression

so i have no idea why those ternaries are in there...

may also want to let Pulover know

Rorqual
Posts: 10
Joined: 14 Jan 2017, 13:23

Re: AutoGUI - GUI Designer and Script Editor

18 Feb 2017, 12:12

Fixed the dllcall, so that the lparam now handles negative ints too, the issue was that only the wparam did before - looks like Pulover was lazy in only implementing the one he needed at the time to handle negative ints :)
below are the two modified files

the DllCall is still ugly, I'm sure, as guest pointed out, it doesn't need all the %'s, but I don't want to risk screwing it up.

New functionality:
1) braces which don't have a matching brace are correctly highlighted to show they are broken/no match found, they are colored red.
Image
2) indentation guides, when enabled, also share the same highlighting as the matched braces, image below
Image

Code: [Select all] [Expand] [Download] (Scintilla.ahk)GeSHi © Codebox Plus



Code: [Select all] [Expand] [Download] (Editor.ahk)GeSHi © Codebox Plus

Rorqual
Posts: 10
Joined: 14 Jan 2017, 13:23

Re: AutoGUI - GUI Designer and Script Editor

18 Feb 2017, 15:47

I added code folding to the autogui editor

it works by clicking the + and - boxes only for now, hotkeys aren't yet added, nor menu items for fold all/expand all yet, just to get this started..

Image

Code: [Select all] [Expand] [Download] (Editor.ahk)GeSHi © Codebox Plus

User avatar
Alguimist
Posts: 137
Joined: 05 Oct 2015, 16:41

Re: AutoGUI - GUI Designer and Script Editor

27 Feb 2017, 19:38

Thanks for the code and suggestions, Rorqual. A new version of AutoGUI will be released as soon as I finish some tests.
User avatar
Alguimist
Posts: 137
Joined: 05 Oct 2015, 16:41

Re: AutoGUI - GUI Designer and Script Editor

07 Apr 2017, 22:20

Version 1.3.4:
- Code folding (credits to Rorqual)
- Import GUI: support for tabs (credits to RazorHalo)
- Minor bug fixes

Code folding is disabled by default. To enable it, go to the Options menu and check Code Folding.

:arrow: Download
User avatar
Alguimist
Posts: 137
Joined: 05 Oct 2015, 16:41

Re: AutoGUI - GUI Designer and Script Editor

13 Apr 2017, 08:25

Version 1.3.5:
- Automatic indentation
- Indentation settings
- Minor bug fixes

A recent screenshot of AutoGUI.
User avatar
Alguimist
Posts: 137
Joined: 05 Oct 2015, 16:41

Re: AutoGUI - GUI Designer and Script Editor

19 Apr 2017, 18:01

Version 1.4.0:
- File menu > Open Included File. Thanks to Coco for EnumIncludes.
- File menu > Load/Save Session.
- Tools menu > Add/Remove Tools.

Image

:arrow: Download
User avatar
Soft
Posts: 174
Joined: 07 Jan 2015, 13:18
GitHub: visionary1
Location: Seoul
Contact:

Re: AutoGUI - GUI Designer and Script Editor

21 Apr 2017, 07:26

impressive, btw why dont you use github? It would be the easier way for pushing updates
AutoHotkey & AutoHotkey_H v1.1.22.07
User avatar
joedf
Posts: 5959
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: AutoGUI - GUI Designer and Script Editor

21 Apr 2017, 21:26

Soft wrote:impressive, btw why dont you use github? It would be the easier way for pushing updates

+1
User avatar
Alguimist
Posts: 137
Joined: 05 Oct 2015, 16:41

Re: AutoGUI - GUI Designer and Script Editor

22 Apr 2017, 21:54

Why not SourceForge?
Asmodeus
Posts: 40
Joined: 19 Oct 2015, 15:53

Re: AutoGUI - GUI Designer and Script Editor

26 Apr 2017, 17:30

things I miss / or need refinement:

tab sorting by drag & drop
comment out function of selected text in Edit Menu
code completion for second parameter
Image

highlight current parameter
Image
grey out unavailable commands (eg. Clear all Marks, in case there are no marks)
single instance mode, maybe as an option (allow only one AutoGUI instance)
option to save and load last session automatically
duplicate line shortcut

cheers
User avatar
Alguimist
Posts: 137
Joined: 05 Oct 2015, 16:41

Re: AutoGUI - GUI Designer and Script Editor

26 Apr 2017, 19:33

Thanks for your suggestions, Asmodeus. The keyboard shortcut to duplicate a line is Ctrl + Down arrow.

Return to “AutoGUI”

Who is online

Users browsing this forum: No registered users and 1 guest