AutoGUI - Script Editor, GUI Designer, Debugger and Tools
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
Comment out the lines below in autogui.ahk by putting them inside /* */
If (A_ScreenDPI != 96) {
Gui Auto: +OwnDialogs
MsgBox 0x30, Warning, %g_AppName% has not been adapted to High-DPI display scaling.`n`nThe program will exit.
ExitApp
}
If (A_ScreenDPI != 96) {
Gui Auto: +OwnDialogs
MsgBox 0x30, Warning, %g_AppName% has not been adapted to High-DPI display scaling.`n`nThe program will exit.
ExitApp
}
-
- Posts: 150
- Joined: 28 Sep 2016, 11:14
- Contact:
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
@Franktic Thank you!
-
- Posts: 3
- Joined: 14 Jan 2020, 03:54
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
Hello.
I found a possible bug with saving files to network drives.
I just downloaded the latest version from SF (2.6.2, using AutoHotkey 1.1.30.03)
Steps to reproduce
* create a file
* save it to a network drive, say G:\
* modify the file
* try saving again
It will fail with error "The request is not supported." (error 0x50: ERROR_NOT_SUPPORTED). The issue happens in this function
Edit: Fixed by restoring the behavior from 2.5.8.
Instead of this
I used this
I found a possible bug with saving files to network drives.
I just downloaded the latest version from SF (2.6.2, using AutoHotkey 1.1.30.03)
Steps to reproduce
* create a file
* save it to a network drive, say G:\
* modify the file
* try saving again
It will fail with error "The request is not supported." (error 0x50: ERROR_NOT_SUPPORTED). The issue happens in this function
Code: Select all
WriteFile(Filename, String, Encoding := "UTF-8") {
f := FileOpen(Filename, "w", Encoding)
If (!IsObject(f)) {
ErrorMsgBox("Error saving """ . Filename . """.`n`n" . GetErrorMessage(A_LastError), "Auto")
Return -1
}
Bytes := f.Write(String)
f.Close()
Return Bytes
}
Instead of this
Code: Select all
If (WriteFile(FullPath, SciText, Encoding) < 0) {
SetWindowTitle("Error saving file: " . FullPath)
Return 0
}
Code: Select all
FileDelete %FullPath%
FileAppend %SciText%, %FullPath%, %Encoding%
If (ErrorLevel) {
ErrorMsgBox("Error saving """ . FullPath . """.`n`n" . GetErrorMessage(A_LastError), "Auto", g_AppName)
SetWindowTitle("Error saving file: " . FullPath)
Return 0
}
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
Hi haichen. I created a tool called Relativity to do add relative positioning of controls after the GUI has been laid out. Perhaps you will find it useful.haichen wrote: ↑16 Aug 2019, 04:34I like AutoGui very much. At the moment i'm only missing the possibility of relative positioning of the controls in the code. I like to see positioning with wp, hp, xp, yp xm, ym etc and maybe xs, ys. May be this could be built in the Alignmenttools. Perhaps as an option.
Thank you very much for your very helpful program.
haichen
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
hi amazing app becouse i copy alot i added this, maybe you could add it to the program? ctrl + alt + click to get a copy on your mouse of the control u clicked here is a video https i.imgur.com /8Dz16UB.mp4 Broken Link for safety
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
@anotherbyte: sorry for the late reply.
Recently I was checking the documentation of OPENFILENAME, where there is a mention to "create-nonmodify network share", which is probably your case. I could check the drive type when an error occurs when saving, with the commmand DriveGet (Type, Network), and maybe check for permissions, since the error message is vague, and then provide an alternative save function.
Recently I was checking the documentation of OPENFILENAME, where there is a mention to "create-nonmodify network share", which is probably your case. I could check the drive type when an error occurs when saving, with the commmand DriveGet (Type, Network), and maybe check for permissions, since the error message is vague, and then provide an alternative save function.
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
I added a topic to main thread. Should I have reported a fix request here?
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
Greetings
I've discovered AutoGUI a few days ago, and it's awesome! So useful and with the most polished interface!
Thanks a lot for your great work!
I'd like to make a feature suggestion regarding: File|'Script Directives':
to be able to manage the directives of the current content (an existing script, or some still unsaved script code) via 'Script Directives',
i.e. AutoGUI to parse the current content for directives, and populate the 'Script Directives' fields.
And, as asked in here, it would be great to also be able to save the current directives as templates, for future use.
Thank you
I've discovered AutoGUI a few days ago, and it's awesome! So useful and with the most polished interface!
Thanks a lot for your great work!
I'd like to make a feature suggestion regarding: File|'Script Directives':
to be able to manage the directives of the current content (an existing script, or some still unsaved script code) via 'Script Directives',
i.e. AutoGUI to parse the current content for directives, and populate the 'Script Directives' fields.
And, as asked in here, it would be great to also be able to save the current directives as templates, for future use.
Thank you
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
@zakk
Thank you for the feedback and suggestions.
A simple template mechanism has been added to the version I'm working on, where the current file can be saved as a template.
Thank you for the feedback and suggestions.
A simple template mechanism has been added to the version I'm working on, where the current file can be saved as a template.
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
Whenever I'm designing a window in AutoGUI, i get en error:
Bug often appears when I copy and paste GUI controls.
This error appears several minutes after the start of work. Please fix this bug!
Bug often appears when I copy and paste GUI controls.
This error appears several minutes after the start of work. Please fix this bug!
Last edited by madsounds on 02 Jun 2020, 15:30, edited 2 times in total.
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
Also pls add snap-to-grid resize
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
I think maybe the bug is caused by encoding. At this moment, almost all of AutoGUI *.ahk files are encoded as UTF-8, not as UTF-16 w-BOM (which is better for support other languages).
I've just tried to save all of AutoGUI *.ahk files as UTF-16 w-BOM. And after I did that, even mouse hovering on AutoGUI system toolbar started to cause same error: "The following variable name contains an illegal character". So I'm pretty sure encoding is the reason of bug.
I've just tried to save all of AutoGUI *.ahk files as UTF-16 w-BOM. And after I did that, even mouse hovering on AutoGUI system toolbar started to cause same error: "The following variable name contains an illegal character". So I'm pretty sure encoding is the reason of bug.
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
@madsounds
I could reproduce the error you described by hardcoding a negative value as the Scintilla handle passed to the function __SCI. This function dynamically converts a Scintilla handle to a static variable associated with the Scintilla object. Variable names cannot contain a minus sign, hence the error message. In order to determine what is wrong, I need information about the AHK and AutoGUI versions you are running. You can get it in Help > About.
Snap-to-grid resize: AutoGUI offers multiple ways to resize controls, but only one of them is compatible with the automatic grid alignment option: Shift-drag.
I could reproduce the error you described by hardcoding a negative value as the Scintilla handle passed to the function __SCI. This function dynamically converts a Scintilla handle to a static variable associated with the Scintilla object. Variable names cannot contain a minus sign, hence the error message. In order to determine what is wrong, I need information about the AHK and AutoGUI versions you are running. You can get it in Help > About.
Snap-to-grid resize: AutoGUI offers multiple ways to resize controls, but only one of them is compatible with the automatic grid alignment option: Shift-drag.
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
@Alguimist
My versions of AutoGUI and AHK:
Btw I made some modifications in Scintilla.ahk and now the bug is gone! Here's what I changed.
Before:
After:
But I don't quite understand what this function does. Is there an attempt to create variables whose names consist of numbers only? If so, it's very confusing for me. And just in order to avoid variable names consisting of numbers, I replaced operators := with = (again, if I understand the logic of this function correctly).
My versions of AutoGUI and AHK:
Btw I made some modifications in Scintilla.ahk and now the bug is gone! Here's what I changed.
Before:
Code: Select all
__SCI(var, val="") {
static
lvar := %var%, val ? %var% := val : 0
return lvar
}
Code: Select all
__SCI(var,val="") {
static
lvar = %var%
if( val )
{
%var% = val
}
return lvar
}
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
@madsounds
The code you posted doesn't work and, as a result, some features of the editor that rely on notifications become unavailable.
One possible solution: search for __SCI(NumGet(lParam + 0)) and replace it by __SCI(NumGet(lParam + 0, 0, "Ptr")).
The code you posted doesn't work and, as a result, some features of the editor that rely on notifications become unavailable.
One possible solution: search for __SCI(NumGet(lParam + 0)) and replace it by __SCI(NumGet(lParam + 0, 0, "Ptr")).
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
@Alguimist
Okay I'll try that, thank you!
Here's another serious issue - session save is impossible. When I try to save session file, the result is an empty file. Its size is just 3 bytes - probably UTF header. Is this the way that shall work?
Okay I'll try that, thank you!
Here's another serious issue - session save is impossible. When I try to save session file, the result is an empty file. Its size is just 3 bytes - probably UTF header. Is this the way that shall work?
Last edited by madsounds on 06 Jun 2020, 01:29, edited 3 times in total.
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
@madsounds
Since I couldn't find a way to properly reproduce the bug you described, I rely on your feedback and attention to perform the following:
- Make sure you are running an unmodified version of AutoGUI. You may need to extract the files again to a new location. Also make sure that the settings file (AutoGUI.ini) is being saved in the program folder, otherwise it is on %APPDATA%.
- Replace the function __SendEditor in Scintilla.ahk with this:
- And the function __SCI with this:
It should be noted that this function receives either the return value of CreateWindowEx, which is null in case of failure, or the lParam of WM_NOTIFY, which is, at offset 0 of a NMHDR structure, the hWnd of the Scintilla control.
Notice the presence of the OutputDebug command in __SendEditor. If you keep an utility called DebugView running while attempting to reproduce the bug in AutoGUI, that utility will display the list of message codes executed by the DLL.
In regard to session saving: this feature doesn't ask the user to save files, it is simply a list of open files. Session saving was highly improved in the version I'm working on, where all sort of metadata within the editor is preserved: cursor position, line markers, text markers (indicators), selections and folds.
Since I couldn't find a way to properly reproduce the bug you described, I rely on your feedback and attention to perform the following:
- Make sure you are running an unmodified version of AutoGUI. You may need to extract the files again to a new location. Also make sure that the settings file (AutoGUI.ini) is being saved in the program folder, otherwise it is on %APPDATA%.
- Replace the function __SendEditor in Scintilla.ahk with this:
Code: Select all
__SendEditor(hWnd, msg := 0, wParam := 0, lParam := 0) {
Static
If (!%hWnd%_df) {
SendMessage, SCI_GETDIRECTFUNCTION, 0, 0,, ahk_id %hWnd%
%hWnd%_df := ErrorLevel ; Direct function
SendMessage, SCI_GETDIRECTPOINTER, 0, 0,, ahk_id %hWnd%
%hWnd%_dp := ErrorLevel ; Direct pointer
If (!msg && !wParam && !lParam) { ; Called from __Add.
Return
}
}
If !(msg + 0) {
msg := "SCI_" . msg
msg := %msg%
}
OutputDebug %msg%
; Scintilla_DirectFunction: int (*fn)(void*,int,int,int)
Return DllCall(%hWnd%_df, "Ptr", %hWnd%_dp, "Int", msg, "Int", wParam, "Int", lParam)
}
Code: Select all
__SCI(hWnd, o := 0) {
Static
__o := %hWnd%
o ? %hWnd% := o : 0
Return __o
}
Notice the presence of the OutputDebug command in __SendEditor. If you keep an utility called DebugView running while attempting to reproduce the bug in AutoGUI, that utility will display the list of message codes executed by the DLL.
In regard to session saving: this feature doesn't ask the user to save files, it is simply a list of open files. Session saving was highly improved in the version I'm working on, where all sort of metadata within the editor is preserved: cursor position, line markers, text markers (indicators), selections and folds.
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
@Alguimist on a side note, this next version must be a huge leap based on the things I’ve read that you’re working on!
Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
@Alguimist
Sorry, I don't get it What's the purpose of File -> Save Session menu? Why it saves 3-byte file that I can't open later? Is it broken in current version? And I need to save designed form (buttons, checkboxes etc), not the text editor features (like cursor position, line markers, text markers, selections, folds). Is there a method to save current design form into the file, so one can reopen that file in AutoGUI later to continue designing this form?In regard to session saving: this feature doesn't ask the user to save files, it is simply a list of open files. Session saving was highly improved in the version I'm working on, where all sort of metadata within the editor is preserved: cursor position, line markers, text markers (indicators), selections and folds.
Last edited by madsounds on 19 Jun 2020, 02:35, edited 7 times in total.