[PA] 업무자동화/[AH]Autohotkey

AH mutiple GUI in one script

Weneedu 2023. 3. 6. 06:36

2023.03.05

 

REF

[1] "https://stackoverflow.com/questions/29174984/multiple-guis-not-launching-from-autohotkey"

 

Gui, x1:add, edit, w90 h40 hwndxEdit, drop file here
	Gui, x1:add, button, gbtn_ok, &OK
	Gui, x1:add, button, x+0 gbtn_exit, &Exit
	Gui, x1:show, w200 h100, gui_Test
return

go_second_gui:
Gui, x2: add, edit, , aaa gui
	Gui, x2:show, w200 h100
return	

btn_ok:
	gui, x1:destroy
	gosub, go_second_gui
return

btn_exit:
	ExitApp
return

x1GuiDropFiles:
	MouseGetPos,,,,Hdrop,2
	if(Hdrop=xEdit)
		MsgBox,% A_GuiEvent ;the names of the files that were dropped
	Gui, show,,gui_Test
return

^ESC:: ExitApp