Opened on Sep 8, 2013 at 2:22:34 AM
Closed on Sep 8, 2013 at 8:56:42 AM
Last modified on Sep 13, 2013 at 6:17:34 PM
#2452 closed Feature Request (Completed)
Proposed amendments to the 50 text files
| Reported by: | mlipok | Owned by: | guinness |
|---|---|---|---|
| Milestone: | 3.3.9.21 | Component: | Documentation |
| Version: | Severity: | None | |
| Keywords: | Cc: |
Description
txtlibfunctions
_Date_Time_SetSystemTimeAdjustment.txt
_Date_Time_SetTimeZoneInformation.txt
_GUICtrlEdit_BeginUpdate.txt
_GUICtrlEdit_EndUpdate.txt
_GUICtrlListView_GetStringWidth.txt
txtFunctions
BitAND.txt BitOR.txt
BitRotate.txt ControlClick.txt
ControlCommand.txt ControlDisable.txt
ControlEnable.txt ControlFocus.txt
ControlGetFocus.txt ControlGetHandle.txt
ControlGetPos.txt ControlGetText.txt
ControlHide.txt ControlListView.txt
ControlMove.txt ControlSend.txt
ControlSetText.txt ControlShow.txt
ControlTreeView.txt FileClose.txt
FileFlush.txt FileGetEncoding.txt
FileGetPos.txt FileGetVersion.txt
FileRead.txt FileReadLine.txt
FileReadToArray.txt FileSetPos.txt
FileWrite.txt FileWriteLine.txt
GUICtrlCreateMenuItem.txt GUICtrlSetFont.txt
GUISetFont.txt IniWrite.txt
SendKeepActive.txt SplashImageOn.txt
SplashTextOn.txt StatusbarGetText.txt
WinGetState.txt WinMenuSelectItem.txt
WinMove.txt WinSetOnTop.txt
WinSetState.txt WinSetTitle.txt
WinSetTrans.txt
Attachments (1)
Change History (20)
by , on Sep 8, 2013 at 2:24:04 AM
| Attachment: | CHANGE_1.ZIP added |
|---|
comment:1 by , on Sep 8, 2013 at 8:56:42 AM
| Milestone: | → 3.3.9.21 |
|---|---|
| Owner: | set to |
| Resolution: | → Completed |
| Status: | new → closed |
Added by revision [8975] in version: 3.3.9.21
follow-up: 7 comment:2 by , on Sep 8, 2013 at 9:03:25 AM
Thank you. I made changes that I felt were applicable.
So you remember, direct links aren't applied to the description or parameters section as these are used for calltips in SciTE etc.
follow-ups: 5 6 15 comment:3 by , on Sep 8, 2013 at 9:19:07 AM
All description about Text in Control...() as default are wrong.
"" is not a default but a way to avoid checking for a specific text
comment:5 by , on Sep 9, 2013 at 7:41:59 AM
Replying to jpm:
All description about Text in Control...() as default are wrong.
"" is not a default but a way to avoid checking for a specific text
I understand that they are not only considered as a default in case the parameter is not [Optional]
so in other cases, the proposed text:
You can use "" an empty string, in order to avoid checking this parameter.
ps.
as I understand it, before adding my suggestions to the documentation, you try to immediately correct any mistakes my language :)
follow-up: 9 comment:6 by , on Sep 9, 2013 at 8:33:39 AM
Replying to jpm:
All description about Text in Control...() as default are wrong.
"" is not a default but a way to avoid checking for a specific text
I think it is a special case: ControlGetFocus
ControlGetFocus ( "title" [, "text"] )
comment:7 by , on Sep 9, 2013 at 9:52:39 AM
Replying to guinness:
Thank you. I made changes that I felt were applicable.
So you remember, direct links aren't applied to the description or parameters section as these are used for calltips in SciTE etc.
for example see:
ControlSend
_FileReadToArray
WinWait
comment:9 by , on Sep 9, 2013 at 3:32:44 PM
Replying to mlipok:
Replying to jpm:
All description about Text in Control...() as default are wrong.
"" is not a default but a way to avoid checking for a specific text
I think it is a special case: ControlGetFocus
ControlGetFocus ( "title" [, "text"] )
If we add we have to change in all Win...()
The behavior is decribed in the Window Titles and Text (Basic)
Perhaps to put a "See Text special definition" as for the Title
do not understand the ControlGetFocus() remarks
comment:10 by , on Sep 9, 2013 at 4:27:08 PM
I understand that you mean more or less the description:
"
In some functions, the text parameter is not optional. If you do not wish to specify any text then just use "" (a blank string). A blank string, or nothing at all, in the text tells AutoIt That any text is valid.
"
of this part of the documentation: "Window Titles and Text (Basic)"
I think it would be a good way.
Currently, in fact, in the descriptions of function is not written to omit this parameter, nor is there any link.
The second thing:
You write:
"All description about Text in Control...() as default are wrong."
Generally this is true, but I think not for ControlGetFocus
ControlGetFocus ( "title" [, "text"] ) [optional] The text of the window to access.
unless I'm wrong
comment:11 by , on Sep 10, 2013 at 5:12:10 PM
Generally this is true, but I think not for ControlGetFocus
I disagree the second parameter follow the not checking. checking that is not working must be donz by checking @error.
The return does not mean failure.
If you read carefully the "Window Titles and Text (Basic)" the optional or not behavior is described but the page can be more clear on the behavior
However, the text and timeout parameters are optional. In some functions, the text parameter is not optional. If you do not wish to specify any text then just use "" (a blank string). A blank string, or nothing at all, in the text tells AutoIt that any text is valid.
comment:12 by , on Sep 10, 2013 at 5:27:11 PM
English grammar is quite significantly readjusted in relation to Polish, or vice versa.
In most cases, general conversation context is easy to grasp, but in some cases this is no longer so easy.
I mean the use of language such as specific programming, business, medical, technical.
So I have to intersperse in my head, your answer.
I will return to this TICKET for a few days, and either I agree with you entirely, or if you let me ask a final question.
best regards
mlipok
comment:13 by , on Sep 12, 2013 at 12:21:52 PM
@mlipok
Just proposed a better wording if the current one confused you
comment:14 by , on Sep 13, 2013 at 2:51:15 AM
your wording do not confuse me
The only thing that irritates me is the fact that 20 years ago, I could not learn the English language and as a result I have sort out the problems of international communication.
Public School learned another language (Russian), and at the time for private lessons for me, I could not afford my parents.
comment:15 by , on Sep 13, 2013 at 3:35:03 AM
Simply look at the examle to ControlGetFocus:
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Run Notepad
Run("notepad.exe")
; Wait 10 seconds for the Notepad window to appear.
Local $hWnd = WinWait("[CLASS:Notepad]", "", 10)
; Retrieve the control that has keyboard focus in Notepad. The handle returned by WinWait is used for the "title" parameter of ControlGetFocus.
Local $sControl = ControlGetFocus($hWnd)
; Display the control that has keyboard focus.
MsgBox($MB_SYSTEMMODAL, "", "The control that has keyboard focus in Notepad is: " & $sControl)
; Close the Notepad window using the handle returned by WinWait.
WinClose($hWnd)
EndFunc ;==>Example
how you see, there is
ControlGetFocus($hWnd)
with out using second parameter.
I was only in reference to your comments
Replying to 3 jpm:
All description about Text in Control ... () as default are wrong.
"" Is not a default but a way to avoid checking for a specific text
I pointed that it is more correctly stated as follows:
All description about Text in Control ... () as default are wrong, excluding ControlGetFocus, where Text is indeed optional.
comment:16 by , on Sep 13, 2013 at 3:17:05 PM
I agree that in case of using $hWnd the text can be a litte imprecise.
But if you use a tile as a string , text="" is legimitate.
So still I need your help to rephrase what confuse you in the help text.
Cheers
JP
comment:17 by , on Sep 13, 2013 at 4:29:19 PM
is "legimitate" ??? are you mean "legitimate" ?
I agree that in case of using the Text is bypassed.
from "Window Titles and Text (Advanced)"
"When you use a window handle for the title parameter then the text parameter is completely ignored."
but what happen when we not using $hWnd ?
so let's see
Run('notepad.exe')
WinWaitActive('[CLASS:Notepad]')
Sleep(100)
ConsoleWrite('TEST_1=' & ControlGetFocus("[CLASS:Notepad]") & @CRLF) ; "text" parameter not needed == parameter is optional and default = "" blank string
Local $sRegExp = '[REGEXPTITLE:(?i)(Untitled - Notepad|Bez tytułu — Notatnik)]'
ConsoleWrite('TEST_2=' & ControlGetFocus($sRegExp) & @CRLF) ; "text" parameter not needed == parameter is optional and default = "" blank string
Local $hWnd = WinGetHandle("[CLASS:Notepad]")
ConsoleWrite('TEST_3=' & ControlGetFocus($hWnd, 'alpha beta gamma') & @CRLF)
WinKill("[CLASS:Notepad]")
whats the results:
>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "L:\TOOLs\Macro\test_ControlGetFocus.au3" /UserParams +>17:18:48 Starting AutoIt3Wrapper v.2.1.2.29 SciTE v.3.3.2.0 ; Keyboard:00000415 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0415 Keyboard:00000415 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (3.3.9.21) from:C:\Program Files (x86)\AutoIt3\Beta +>17:18:49 AU3Check ended.rc:0 >Running:(3.3.9.21):C:\Program Files (x86)\AutoIt3\Beta\autoit3.exe "L:\TOOLs\Macro\test_ControlGetFocus.au3" --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop TEST_1=Edit1 TEST_2=Edit1 TEST_3=Edit1 +>17:18:50 AutoIt3.exe ended.rc:0 >Exit code: 0 Time: 1.638
so I steel correct your statement
"All description about Text in Control...() as default are wrong."
not all because
ControlGetFocus , is an "exception to the rule", it is a different case.
follow-up: 19 comment:18 by , on Sep 13, 2013 at 4:45:13 PM
ending...
I think all is clear,
Summary:
@Jpm
"Perhaps to put a "See Text special definition" as for the Title"
I still think it would be a good way to "..to put a "See Text special definition" as for the Title"
comment:19 by , on Sep 13, 2013 at 6:17:34 PM
Replying to mlipok:
"Perhaps to put a "See Text special definition" as for the Title"
I still think it would be a good way to "..to put a "See Text special definition" as for the Title"
So we will add a link pointing to the specific part of "Window Titles and Text (Basic)"

zip with 50 txt files