Jump to content

Help File/Documentation Issues. (Discussion Only)


guinness
 Share

Recommended Posts

Hi everybody
In plenty of topics, we read this in the help file :

Parameters
controlID : The control identifier (controlID) as returned by a GUICtrlCreate...() function, or -1 for the last created control.

But if you look at GUICtrlGetHandle topic, you'll simply read this :

Parameters
controlID : Control identifier as returned by a GUICtrlCreate...() function.

Could we please add the "-1" part as it works too ?
Thanks

Link to comment
Share on other sites

Also what is strange is this :
* -1 works for GUICtrlGetHandle()
* -1 doesn't work for TrayItemGetHandle()

imho it should work for both.
After all we see a few -1 concerning the related "Tray scripts", for example help file, topic TrayCreateItem :

; Create a tray item with the radio item parameter selected.
TrayCreateItem("Radio 1", -1, -1, $TRAY_ITEM_RADIO)
TrayItemSetState(-1, $TRAY_CHECKED) ; -1 as 1st parameter <============

Here again, TrayItemSetState topic doesn't indicate that -1 is accepted as 1st parameter.
All this started while answering TimRude in this post

Link to comment
Share on other sites

  • 3 months later...
@jpm In 2006/2007 @Ultima added some code inside the function _GUICtrlListView_SetItemText, this code was (and still is in the actual release 3.3.16.1) :

If $iSubItem = -1 Then
    Local $sSeparatorChar = Opt('GUIDataSeparatorChar')
    Local $i_Cols = _GUICtrlListView_GetColumnCount($hWnd)
    Local $a_Text = StringSplit($sText, $sSeparatorChar)
    If $i_Cols > $a_Text[0] Then $i_Cols = $a_Text[0]
    For $i = 1 To $i_Cols
        $iRet = _GUICtrlListView_SetItemText($hWnd, $iIndex, $a_Text[$i], $i - 1)
        If Not $iRet Then ExitLoop
    Next
    Return $iRet
EndIf

Until 2012, the help file indicated, for this function _GUICtrlListView_SetItemText :

$iSubItem [optional] 1-based index of the subitem or 0 to set the item 
Remarks : If $iSubItem = -1 row is set

In 2013, suddenly, the help file didn't indicate anything concerning the important remark :
Remarks : None

As Ultima's code is still present in 2023, the actual help file should (imho) indicate again :
Remarks : If $iSubItem = -1 row is set

Edit: here is an example showing what happens when $iSubItem = -1

#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <MsgBoxConstants.au3>

Example()

Func Example()
    Local $idListview
    GUICreate("ListView Set Item Text", 400, 300)
    $idListview = GUICtrlCreateListView("Item        |subitem        |subitem        ", 2, 2, 394, 268)
    GUISetState(@SW_SHOW)

    ; Add row 0
    GUICtrlCreateListViewItem("Item 0|SubItem1|SubItem2", $idListview)
    MsgBox($MB_TOPMOST, "", "Before modifying all text at once")

    ; Alter all text at once in row 0
    _GUICtrlListView_SetItemText($idListview, 0, "Item 0_alt|SubItem1_alt|SubItem2_alt", -1)
    MsgBox($MB_TOPMOST, "Parameter $iSubItem = - 1", "All text has been altered at once")

    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>Example

Thanks for reading :)
Edited by pixelsearch
Link to comment
Share on other sites

  • 3 months later...
Help file, topic _GDIPlus_ImageSaveToFile :
This is not an issue but It would be great to indicate that the compression level is 75% by default for jpg images (tested). If you want a better jpg quality (less compression), then you'll need to use _GDIPlus_ImageSaveToFileEx

For those who are interested, @UEZ indicated in this script how to resize AND rotate a jpg at same time. Not so easy but it can be helpful at times :)
Link to comment
Share on other sites

  • 6 months later...
  • 2 weeks later...

Going trough the help file, I noticed  some "Make sure the web address //ieframe.dll/dnserrordiagoff.htm# is correct " errors.
Comparing sources I found that the error in the links is due to and extra "../" in the links in the Tutorials area.
For example: <a href="../../functions/Run.htm">Run</a>

These errors have been there since the links were added to Tutorials in the help file for every version after v3.3.8.1 .

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

Opening an external link from the CHM now gets:
image.png.1d249c6184e505e3a91ee9613d39eeba.png

and has in any case always been quite impractical, that of opening the link inside the CHM environment.

I believe that external links should if they could, open the link on the default browser. Also for future proofing.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

8 hours ago, jpm said:

I fail how to implement it in chm

Either button like "Open this script" or maybe better, have a TCP/html server in AutoIt3Help.exe that will receive and act on the link to do the did.

http://localhost:8765/redirect?http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k(Wow64EnableWow64FsRedirection);k(DevLang-C);k(TargetOS-WINDOWS)&rd=true

Is not how CHM is supposed to work but is 2002 tech that will not have the code revised and, them limiting it to have everyone use IE4 ( at the time ) was another way to augment browser traffic and, manage security by imposing limitations. ( but I'm getting into rant mode now )

And as a bonus could have "/EditScript?file.au3" as a link to replace "Open this script" button.
To open the link read the registry and if the handler does not exist use the folder structure ".\SciTE\SciTE.exe"

I don't foresee any misuse of the implementation. 

Edit: just found "Example: Link to a File Outside of Your Help System". It could be used for the redirector ?.

Notes
... ...
All other files will open in the program with which they are associated. For example, clicking a link to an .avi file will launch an instance of Microsoft Media Viewer. However, if a user does not have the appropriate program installed, he or she will not be able to open the file.

Edit2: instead of "http://", start with "MyHandler://" to use as redirector ?.

Edited by argumentum
more

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

On 3/11/2024 at 5:20 PM, argumentum said:

Going trough the help file, I noticed  some "Make sure the web address //ieframe.dll/dnserrordiagoff.htm# is correct " errors.
Comparing sources I found that the error in the links is due to and extra "../" in the links in the Tutorials area.
For example: <a href="../../functions/Run.htm">Run</a>

These errors have been there since the links were added to Tutorials in the help file for every version after v3.3.8.1 .

The handling of ../../functions/Run.htm  is OK for the .chm and are modified for the Help's on the WEB

Link to comment
Share on other sites

1 hour ago, jpm said:

The handling of ../../functions/Run.htm  is OK for the .chm

Is not. 
In the CHM, go to "Tutorial - Notepad" and click the Run in "Run("notepad.exe") ". Those links are the ones I'm referring to.
The ones in the text area are fine.

Edit: my bad. 
mk:@MSITStore:autoit.chm::/html/tutorials/functions/Run.htm  should be 
mk:@MSITStore:autoit.chm::/html/functions/Run.htm

Edited by argumentum
oops

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

Coding is a pain. Ever heard "it worked on my PC". Am sure that in the PC that it was developed it runs just fine.

image.png.e63277ee008898265d82a9b999b2ce9d.png
image.png.7c4d759eabe2a2a18d0b1cc0006ca8f5.png

Those in tutorials ( all 5 pages ) are not working on any of my PCs.

One could say that am fighting you for the title of "a Real GUI/debug lover" :P

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...
  • Developers
Posted (edited)

Not sure where the link is generated, as it should point to the AutoItSetOption() page, so copied that one for now to Opt.htm to fix this.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Hello :)
Autoit Help file (3.3.16.1) topic GUICtrlSetState, we read :

$GUI_CHECKED (1) Radio, Checkbox or ListViewItem will be checked.

Shouldn't it be :

$GUI_CHECKED (1) Radio, Checkbox, MenuItem or ListViewItem will be checked.

Same goes for $GUI_UNCHECKED (4)
Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...