Modify

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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_1.ZIP (39.4 KB) - added by mlipok 11 years ago.
zip with 50 txt files

Download all attachments as: .zip

Change History (20)

Changed 11 years ago by mlipok

zip with 50 txt files

comment:1 Changed 11 years ago by guinness

  • Milestone set to 3.3.9.21
  • Owner set to guinness
  • Resolution set to Completed
  • Status changed from new to closed

Added by revision [8975] in version: 3.3.9.21

comment:2 follow-up: Changed 11 years ago by 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.

comment:3 follow-ups: Changed 11 years ago by 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

comment:4 Changed 11 years ago by guinness

Removed this reference in rev 8978.

comment:5 in reply to: ↑ 3 Changed 11 years ago by 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 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 :)

comment:6 in reply to: ↑ 3 ; follow-up: Changed 11 years ago by 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"] )

comment:7 in reply to: ↑ 2 Changed 11 years ago by mlipok

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:8 Changed 11 years ago by guinness

I meant description sorry.

comment:9 in reply to: ↑ 6 Changed 11 years ago by Jpm

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 Changed 11 years ago by mlipok

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 Changed 11 years ago by Jpm

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 Changed 11 years ago by mlipok

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 Changed 11 years ago by Jpm

@mlipok
Just proposed a better wording if the current one confused you

comment:14 Changed 11 years ago by mlipok

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 in reply to: ↑ 3 Changed 11 years ago by mlipok

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 Changed 11 years ago by Jpm

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 Changed 11 years ago by mlipok

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.

comment:18 follow-up: Changed 11 years ago by mlipok

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 in reply to: ↑ 18 Changed 11 years ago by Jpm

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)"

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.

Add Comment

Modify Ticket

Action
as closed The owner will remain guinness.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.