@@LAPIII
I now understand what you were getting at, I fixed the clone code.
@@LAPIII
@LAPIII you're doing nothing wrong, that's an example of the Clone Tool where I clone a Notepad++ GUI to ahkv2.
Code: Select all
#Requires Autohotkey v2
;AutoGUI 2.5.8 creator: Alguimist autohotkey.com/boards/viewtopic.php?f=64&t=89901
;AHKv2converter creator: github.com/mmikeww/AHK-v2-script-converter
;Easy_AutoGUI_for_AHKv2 github.com/samfisherirl/Easy-Auto-GUI-for-AHK-v2
myGui := Gui()
ButtonWarranty := myGui.Add("Button", "x16 y48 w80 h23", "&Warranty")
ButtonPayment := myGui.Add("Button", "x104 y48 w80 h23", "&Payment")
ButtonPermit := myGui.Add("Button", "x192 y48 w80 h23", "&Permit")
ButtonCancellation := myGui.Add("Button", "x280 y48 w80 h23", "&Cancellation")
myGui.Add("GroupBox", "x8 y0 w457 h81", "TERMS AND CONDITIONS")
Radio1 := myGui.Add("Radio", "x16 y16 w64 h23", "BIG JOB")
Radio2 := myGui.Add("Radio", "x88 y16 w82 h23", "SMALL JOB")
ButtonWarranty.OnEvent("Click", Warranty)
ButtonPayment.OnEvent("Click", OnEventHandler)
ButtonPermit.OnEvent("Click", OnEventHandler)
ButtonCancellation.OnEvent("Click", OnEventHandler)
myGui.OnEvent('Close', (*) => ExitApp())
myGui.Title := "ANIRAF"
myGui.Show("w480 h660")
OnEventHandler(*)
{
ToolTip("Click! This is a sample action.`n"
. "Active GUI element values include:`n"
. "ButtonWarranty => " ButtonWarranty.Text "`n"
. "ButtonPayment => " ButtonPayment.Text "`n"
. "ButtonPermit => " ButtonPermit.Text "`n"
. "ButtonCancellation => " ButtonCancellation.Text "`n", 77, 277)
SetTimer () => ToolTip(), -3000 ; tooltip timer
}
Warranty(*)
{
Msgbox "Warranty"
}
That's not a bug. It's not supposed to do what you're trying to do. It builds the GUI code when you build a GUI using its GUI tool, but it doesn't take existing code and show it in the GUI builder. There is a GUI import feature (looks like it's called the "Window Cloning Tool") where it would take a GUI window that's actually displayed in Windows and build it in the GUI builder tool so you can use that as a starting point. So you could run your code to display its GUI, then import it from the displayed GUI window, but then it loses any "smarts" you have built into it. It's not like a two-way back-and-forth.
negative, @JSDboiler wrote: ↑29 May 2024, 17:17It's been a while, but I'm pretty sure that's not a bug. It's not supposed to do what you're trying to do. It builds the GUI code when you build a GUI using its GUI tool, but it doesn't take existing code and show it in the GUI builder. There is (or was, at least) a GUI import feature (the "Window Cloning Tool"?) where it would a GUI window that's actually displayed in Windows and build it in the GUI builder tool so you can use that as a starting point. So you could run your code to display its GUI, then import it from the displayed GUI window, but then it loses any "smarts" you have built into it. It's not like a two-way back-and-forth.
Return to “Scripts and Functions (v2)”
Users browsing this forum: No registered users and 35 guests