pixelsearch Posted January 30, 2023 Posted January 30, 2023 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
jpm Posted January 30, 2023 Posted January 30, 2023 8 hours ago, pixelsearch said: ould we please add the "-1" part as it works too ? Thanks did you that it works?
pixelsearch Posted January 30, 2023 Posted January 30, 2023 Hi @jpm yes I checked that it works, for example : GUICreate("My GUI") Local $idLabel = GUICtrlCreateLabel("label", 10, 30, 70) GUISetState() Local $h1 = GUICtrlGetHandle(-1) Local $h2 = GUICtrlGetHandle($idLabel) MsgBox(0, "Label handle", "$h1 = " & $h1 & @crlf & "$h2 = " & $h2) GUIDelete()
pixelsearch Posted January 30, 2023 Posted January 30, 2023 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
pixelsearch Posted May 10, 2023 Posted May 10, 2023 (edited) @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 setEdit: 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 May 11, 2023 by pixelsearch
pixelsearch Posted August 26, 2023 Posted August 26, 2023 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
Werty Posted February 27 Posted February 27 Helpfile, _SendMessage() example is missing #include <WindowsConstants.au3> Some guy's script + some other guy's script = my script!
argumentum Posted March 11 Posted March 11 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.
argumentum Posted March 12 Posted March 12 Opening an external link from the CHM now gets: 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.
jpm Posted March 13 Posted March 13 I try to avoid such warning, but I fail how to implement it in chm snif!!!
argumentum Posted March 13 Posted March 13 (edited) 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 March 13 by argumentum more Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
jpm Posted March 13 Posted March 13 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
argumentum Posted March 13 Posted March 13 (edited) 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 March 13 by argumentum oops Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
jpm Posted March 14 Posted March 14 I don't understand why we need to change something working both .chm and Web
argumentum Posted March 14 Posted March 14 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. 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" Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
jpm Posted March 15 Posted March 15 I fix the pb and commit the build change. it will be OK for the next beta/Release Thanks for your help argumentum 1
argumentum Posted April 1 Posted April 1 @jpm, please take a look at https://www.autoitscript.com/forum/topic/211745-_guictrlbutton_setsplitinfo/?do=findComment&comment=1532380 The example for _GUICtrlButton_SetSplitInfo() crashes. ioa747 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Werty Posted June 13 Posted June 13 (edited) WEB help, link to Opt() is broken. Opt() AutoItSetOption() Edited June 13 by Jos Test added ... Jos Some guy's script + some other guy's script = my script!
Developers Jos Posted June 13 Developers Posted June 13 (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 June 13 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.
pixelsearch Posted June 17 Posted June 17 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 argumentum 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now