z3r0c00l12 Posted May 17, 2010 Share Posted May 17, 2010 Hi all, I was wondering if any of you could clarify this a bit, I am just asking because I fell others might have a problem with this function. When performing a Syntax error Check on my Script, I got an error on the UDF _GUICtrlListView_SimpleSort. Now the problem is that, I compiled the script and it works, even the erroneous function works, but the syntax check gives me an error, so I was wondering If I was just getting lucky or there really is an error. Here is the output : >C:\Program Files\AutoIt3\SciTE\..\au3check.exe "C:\Documents and Settings\[username]\My Documents\Script\[name].au3" AutoIt3 Syntax Checker v1.54.8 Copyright (c) Tylo 2007 C:\Documents and Settings\[username]\My Documents\Script\[name].au3(52,52) : ERROR: _GUICtrlListView_SimpleSort() called with Const or expression on ByRef-param(s). _GUICtrlListView_SimpleSort($List, "True", $column) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files\AutoIt3\Include\GuiListView.au3(6763,67) : REF: definition of _GUICtrlListView_SimpleSort(). Func _GUICtrlListView_SimpleSort($hWnd, ByRef $vDescending, $iCol) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\[username]\My Documents\Script\[name].au3 - 1 error(s), 0 warning(s) >Exit code: 2 Time: 0.305 Here is parts of the code, just so you don't get lost : $List = GuiCtrlCreateListView($text, 10, 10, $width -20, $height - 20) $column = _GUICtrlListView_GetColumn($List, 0) _GUICtrlListView_SimpleSort($List, "True", $column) GuiSetState() If there is any information missing, please tell me. z3r0c00l12 Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 17, 2010 Share Posted May 17, 2010 (edited) When the helpfile says things like: Can be: True - Sort Descending False - Sort AscendingThen they mean the Keyword True/False, not that you should use the words in a string! So to fix that: _GUICtrlListView_SimpleSort($List, True, $column) But then you would still be doing "Const or expression on ByRef-param" so change it again to something like: $something = True _GUICtrlListView_SimpleSort($List, $something, $column) Edit: Your Au3Check looks ancient, you should go and install the latest SciTE4AutoIt3 ASAP! Edited May 17, 2010 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
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