AutoItWinGetTitle: Difference between revisions

From AutoIt Wiki
Jump to navigation Jump to search
(Created page with "===Function=== AutoItWinGetTitle ===Description=== Retrieves the title of the AutoIt window. ===Syntax=== <syntaxhighlight lang='autoit'> AutoItWinGetTitle ( ) </syntaxhigh...")
 
mNo edit summary
Line 1: Line 1:
===Function===
==Function==
AutoItWinGetTitle
AutoItWinGetTitle


===Description===
==Description==
Retrieves the title of the AutoIt window.
Retrieves the title of the AutoIt window.


===Syntax===
==Syntax==
<syntaxhighlight lang='autoit'>
<syntaxhighlight lang='autoit'>
AutoItWinGetTitle (  )
AutoItWinGetTitle (  )
Line 11: Line 11:




===Parameters===
==Parameters==
None.
None.


===ReturnValue===
==ReturnValue==
Returns a string containing the title of the AutoIt window.
Returns a string containing the title of the AutoIt window.




===Remarks===
==Remarks==
None.
None.




===Related===
==Related==
[[AutoItWinSetTitle]], [[WinGetTitle]]
[[AutoItWinSetTitle]], [[WinGetTitle]]




===Example===
==Example==
<syntaxhighlight lang='autoit'>
<syntaxhighlight lang='autoit'>
#include <GUIConstantsEx.au3>
#include <GUIConstantsEx.au3>

Revision as of 16:41, 15 August 2013

Function

AutoItWinGetTitle

Description

Retrieves the title of the AutoIt window.

Syntax

AutoItWinGetTitle (  )


Parameters

None.

ReturnValue

Returns a string containing the title of the AutoIt window.


Remarks

None.


Related

AutoItWinSetTitle, WinGetTitle


Example

#include <GUIConstantsEx.au3>

Example()

Func Example()
	; Set the title of of the AutoIt Hidden Window.
	AutoItWinSetTitle("My AutoIt Window")

	; Display AutoIt's Hidden Window.
	AutoItWinShow()

	While 1
		Switch GUIGetMsg()
			Case $GUI_EVENT_CLOSE
				ExitLoop
		EndSwitch
	WEnd
EndFunc   ;==>Example

; Display AutoIt"s Hidden Window. Returns the handle of the window.
Func AutoItWinShow()
	Local $hWnd = WinGetHandle(AutoItWinGetTitle()) ; Get the handle of the AutoIt Hidden Window by finding out the title of the AutoIt Hidden Window.
	WinMove($hWnd, "", (@DesktopWidth / 2) - 250, (@DesktopHeight / 2) - 250, 500, 500) ; Move the AutoIt Hidden Window and re-size for a better view.
	WinSetState($hWnd, "", @SW_SHOW) ; Show the AutoIt Hidden Window, normally this is hidden, but in the interest of this example I"m displaying it.
	Return $hWnd
EndFunc   ;==>AutoItWinShow