#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
; NotepadAddOn
ShellExecute('notepad')
WinWaitActive("[CLASS:Notepad]", "")
$pos_A = WinGetPos("[CLASS:Notepad]", "")
$hGui = GUICreate('YOUR GUI', $pos_A[2], 50, $pos_A[0], $pos_A[1] - 50)
GUISetState(@SW_SHOW) ; will display an empty dialog box
AdlibRegister('_WinMove', 10)
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
GUIDelete()
Func _WinMove()
$p_A = WinGetPos("[CLASS:Notepad]", "")
WinMove($hGui, "", $p_A[0], $p_A[1] + $p_A[3])
EndFunc ;==>_WinMove
這太棒了。非常感謝! –