Opened 12 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 Changed 12 years ago by TicketCleanup
- Version 3.3.9.18 deleted
comment:2 Changed 12 years ago by mlipok
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 Changed 12 years ago by Melba23
mlipok,
I would rather Jon spent time on more important things. But if you provide the data, I will add it.
M23
comment:4 Changed 12 years ago by mlipok
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 Changed 12 years ago by Melba23
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 Changed 12 years ago by Melba23
- Resolution set to Fixed
- Status changed from new to closed
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.

Automatic ticket cleanup.