Modify

Opened 13 years ago

Closed 12 years ago

#2396 closed Feature Request (Fixed)

WinActivate - Remarks - PROPOSAL

Reported by: anonymous Owned by:
Milestone: Component: Documentation
Version: Severity: None
Keywords: Cc:

Description

in Remarks
There is a that description
"@extended contains additional info about how the activated process was done."

I think that this is not a complete description of the @extended
Nowhere is precisely defined, which may contain the macro.

Attachments (0)

Change History (6)

comment:1 by TicketCleanup, 13 years ago

Version: 3.3.9.18

Automatic ticket cleanup.

comment:2 by mlipok, 12 years ago

It is possible that the previous description was not correct, so I will describe this TICKET again:

Please consider developing a more detailed description of what exactly contains @extended

comment:3 by Melba23, 12 years ago

mlipok,

I would rather Jon spent time on more important things. But if you provide the data, I will add it.

M23

comment:4 by mlipok, 12 years ago

The script speaks better than words.
Can you add it as an example to the documentation of this function.

#include <MsgBoxConstants.au3>
Example()
Func Example()
	Local $Extended
	Run("notepad.exe")

	WinWait("[CLASS:Notepad]", "", 10)
	MsgBox($MB_SYSTEMMODAL, 'After Run Notepad <> Before Activate SciTe', 'WinGetTitle("[ACTIVE]") = ' & WinGetTitle('[ACTIVE]'))
	WinActivate('[REGEXPTITLE:(?i)(.*SciTE.*)]')
	$Extended = @extended ; @extended = 2
	MsgBox($MB_SYSTEMMODAL, 'After Activate SciTE <> Before Re Activate SciTE', 'WinGetTitle("[ACTIVE]") = ' & WinGetTitle('[ACTIVE]') & @CRLF & '@extended = ' & $Extended)
	WinActivate('[REGEXPTITLE:(?i)(.*SciTE.*)]')
	WinWaitActive('[REGEXPTITLE:(?i)(.*SciTE.*)]')
	WinActivate('[REGEXPTITLE:(?i)(.*SciTE.*)]')
	$Extended = @extended ; @extended = 1
	MsgBox($MB_SYSTEMMODAL, 'After Re Activate SciTE <> Before Re Activate Notepad', 'WinGetTitle("[ACTIVE]") = ' & WinGetTitle('[ACTIVE]') & @CRLF & '@extended = ' & $Extended)
	WinActivate('[CLASS:Notepad]')
	WinWaitActive('[CLASS:Notepad]')
	$Extended = @extended ; @extended = 0
	MsgBox($MB_SYSTEMMODAL, 'After Activate Notepad', 'WinGetTitle("[ACTIVE]") = ' & WinGetTitle('[ACTIVE]') & @CRLF & '@extended = ' & $Extended)
	WinClose('[CLASS:Notepad]')
EndFunc   ;==>Example

As for the verbal description - my modest linguistic capabilities do not allow me to take this challenge.

comment:5 by Melba23, 12 years ago

Your script is flawed - the 0 return from @extended comes from the WinWaitActive call, not the WinActivate.

When I test I only get returns of 1 or 2 as you can see:

$hSciTE = WinGetHandle("[CLASS:SciTEWindow]")
$hHelp = WinGetHandle("AutoIt Help")

WinActivate($hSciTE)
ConsoleWrite("SciTE from active: " & @extended & @CRLF)
WinWaitActive($hSciTE)

Sleep(1000)

WinActivate($hHelp)
ConsoleWrite("Help from inactive: " & @extended & @CRLF)
WinWaitActive($hHelp)

Sleep(1000)

WinActivate($hHelp)
ConsoleWrite("Help from active: " & @extended & @CRLF)
WinWaitActive($hHelp)

Sleep(1000)

WinActivate($hSciTE)
ConsoleWrite("SciTE from inactive: " & @extended & @CRLF)
WinWaitActive($hSciTE)

Sleep(1000)

Run("Notepad")
WinWaitActive("[CLASS:Notepad]")
$hNotepad = WinGetHandle("[CLASS:Notepad]")

Sleep(1000)

WinActivate($hSciTE)
ConsoleWrite("SciTE from inactive: " & @extended & @CRLF)
WinWaitActive($hSciTE)

Sleep(1000)

WinActivate($hNotepad)
ConsoleWrite("Notepad from inactive: " & @extended & @CRLF)
WinWaitActive($hNotepad)

Sleep(1000)

WinActivate($hHelp)
ConsoleWrite("Help from inactive: " & @extended & @CRLF)
WinWaitActive($hHelp)

Sleep(1000)

WinActivate($hHelp)
ConsoleWrite("Help from active: " & @extended & @CRLF)
WinWaitActive($hHelp)

I will add a comment along the lines of

@extended returns 1 if the GUI was already active; 2 if not

Although frankly I do not see the utility of this information as long as the GUI is activated.

M23

comment:6 by Melba23, 12 years ago

Resolution: Fixed
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.