Moderators Melba23 Posted April 12, 2017 Moderators Posted April 12, 2017 Quesney, https://www.autoitscript.com/wiki/Adding_UDFs_to_AutoIt_and_SciTE M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Quesney Posted April 12, 2017 Posted April 12, 2017 AHhhhh life saver thank you, I was searching the wrong text to locate it thanks so much “Courage is being scared to death, but saddling up anyway” – John Wayne
MattHiggs Posted June 19, 2017 Posted June 19, 2017 Hey. So I think I may have found a error in the help file. For function _GUICtrlListBox_GetSelCount, the help file states that if no items are selected, the function will return -1. However, it appears that it returns the number of selected items in all cases, even if no items are selected (which means it would return 0). I modified the example script associated with the function so that it would not select any of items in the list, and this was the result:
BrewManNH Posted June 19, 2017 Posted June 19, 2017 This belongs in the bug tracker and not in this thread, this thread is about modifying the FAQ in the help file. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
Skysnake Posted June 22, 2017 Posted June 22, 2017 @BrewManNH, I have also posted on the Help docs thread as I am not allowed onto the bug tracker... @Melba23 knows about that... Skysnake Skysnake Why is the snake in the sky?
Skysnake Posted August 15, 2017 Posted August 15, 2017 ::/html/functions/GUICtrlCreateEdit.htm The Help file does NOT mention the #include <EditConstants.au3> required, but it does show up when you open the example... Skysnake Why is the snake in the sky?
Developers Jos Posted August 15, 2017 Developers Posted August 15, 2017 Why would it need mentioning for this internal function? The example is using the Include file so do expect it there. 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.
Skysnake Posted August 15, 2017 Posted August 15, 2017 For the simple reason that all other Help file entries list the required #includes. Also, in the Help file it is not apparent, unless one opens the example. Uniformity, completeness and accuracy. I think it was an oversight. Skysnake Why is the snake in the sky?
Developers Jos Posted August 15, 2017 Developers Posted August 15, 2017 (edited) Still missing something here I guess. Isn't it the case that for UDF's the required #Include file is listed and for buildin functions none? Jos Edited August 15, 2017 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.
rudi Posted September 3, 2018 Posted September 3, 2018 help file entry for _ArrayDisplay() should mention _DebugArrayDisplay() and vice versa. Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE!
argumentum Posted November 16, 2018 Posted November 16, 2018 (edited) In regards to _WinAPI_MessageBoxCheck(), the Microsoft info is not true. at https://docs.microsoft.com/en-us/windows/desktop/api/shlwapi/nf-shlwapi-shmessageboxchecka they say that the value will be stored at: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\LowRegistry\DontShowMeThisDialogAgain just as in AutoIt help file, but in my Win10 PC is stored at: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\DontShowMeThisDialogAgain even tho, the other one exists. ...just sharing. Edited November 16, 2018 by argumentum clarify Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
argumentum Posted December 3, 2018 Posted December 3, 2018 (edited) in the example of the help file about _Timer_SetTimer(), in the example, the progress bar leaves no room for the clock to show. Spoiler expandcollapse popup#include <GUIConstantsEx.au3> #include <GuiStatusBar.au3> #include <ProgressConstants.au3> #include <Timers.au3> #include <WindowsConstants.au3> Global $g_idMemo, $g_hStatus, $g_idProgress, $g_iPercent = 0, $g_iDirection = 1 _Example_CallBack() Func _Example_CallBack() Local $hGUI, $iTimerProgress, $idChange, $iWait = 10, $idState Local $aParts[3] = [55, 280, -1] ; <--- adjust to show the clock $hGUI = GUICreate("Timers Using CallBack Function(s)", 400, 320) $g_idMemo = GUICtrlCreateEdit("", 2, 32, 396, 226, BitOR($WS_HSCROLL, $WS_VSCROLL)) GUICtrlSetFont($g_idMemo, 9, 400, 0, "Courier New") $idState = GUICtrlCreateButton("Start Progress Bar", 70, 270, 100, 25) $idChange = GUICtrlCreateButton("Change", 215, 270, 90, 25) GUICtrlSetState($idChange, $GUI_DISABLE) $g_hStatus = _GUICtrlStatusBar_Create($hGUI, $aParts) _GUICtrlStatusBar_SetText($g_hStatus, "Timers") _GUICtrlStatusBar_SetText($g_hStatus, @TAB & @TAB & StringFormat("%02d:%02d:%02d", @HOUR, @MIN, @SEC) & " ", 2) ; <--- adjust to show the clock prettier $g_idProgress = GUICtrlCreateProgress(0, 0, -1, -1, $PBS_SMOOTH) GUICtrlSetColor($g_idProgress, 0xff0000) _GUICtrlStatusBar_EmbedControl($g_hStatus, 1, GUICtrlGetHandle($g_idProgress)) GUISetState(@SW_SHOW) _Timer_SetTimer($hGUI, 1000, "_UpdateStatusBarClock" ) ; create timer While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idState If GUICtrlRead($idState) = "Start Progress Bar" Then $iTimerProgress = _Timer_SetTimer($hGUI, $iWait, "_UpdateProgressBar") ; create timer If @error Or $iTimerProgress = 0 Then ContinueLoop GUICtrlSetData($idState, "Stop Progress Bar") GUICtrlSetState($idChange, $GUI_ENABLE) Else GUICtrlSetState($idChange, $GUI_DISABLE) _Timer_KillTimer($hGUI, $iTimerProgress) GUICtrlSetData($idState, "Start Progress Bar") EndIf Case $idChange If $iWait = 10 Then $iWait = 250 Else $iWait = 10 EndIf MemoWrite("Timer for _UpdateProgressBar set at: " & $iWait & " milliseconds") $iTimerProgress = _Timer_SetTimer($hGUI, $iWait, "", $iTimerProgress) ; reuse timer with different interval EndSwitch WEnd ConsoleWrite("Killed All Timers? " & _Timer_KillAllTimers($hGUI) & @CRLF) ; must be True as the timer to "_UpdateStatusBarClock" have not been killed GUIDelete() EndFunc ;==>_Example_CallBack ; call back function Func _UpdateStatusBarClock($hWnd, $iMsg, $iIDTimer, $iTime) #forceref $hWnd, $iMsg, $iIDTimer, $iTime _GUICtrlStatusBar_SetText($g_hStatus, @TAB & @TAB & StringFormat("%02d:%02d:%02d", @HOUR, @MIN, @SEC) & " ", 2) ; <--- adjust to show the clock prettier EndFunc ;==>_UpdateStatusBarClock ; call back function Func _UpdateProgressBar($hWnd, $iMsg, $iIDTimer, $iTime) #forceref $hWnd, $iMsg, $iIDTimer, $iTime $g_iPercent += 5 * $g_iDirection GUICtrlSetData($g_idProgress, $g_iPercent) If $g_iPercent = 100 Or $g_iPercent = 0 Then $g_iDirection *= -1 If $g_iPercent = 100 Then GUICtrlSetColor($g_idProgress, 0xff0000) ElseIf $g_iPercent = 0 Then GUICtrlSetColor($g_idProgress, 0x0000ff) EndIf EndFunc ;==>_UpdateProgressBar ; Write a line to the memo control Func MemoWrite($sMessage) GUICtrlSetData($g_idMemo, $sMessage & @CRLF, 1) EndFunc ;==>MemoWrite ..I added notes to the code where I made changes. Edited December 3, 2018 by argumentum Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Inpho Posted May 8, 2019 Posted May 8, 2019 More of a peeve than anything else; I'd describe this as Melba probably would - a lesson for the student. The function correctly states that it returns either a string or an array: _GUICtrlListView_GetSelectedIndices() And this function correctly states that it accepts an input type of Integer (as the required parameter is formatted as $iIndex): _GUICtrlListView_GetItemText() It took me an embarassing amount of time to realise that the returned string from the GetSelectedIndices() needs to be converted to a number before it can be used in GetItemText() Example to demonstrate. expandcollapse popup#include <GuiListView.au3> #include <GUIConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $sString = "" $hGui = GUICreate('Test', 150, 200) $hListView = GUICtrlCreateListView("1|2", 10, 10, 130, 123) $hButton1 = GUICtrlCreateButton("1", 10, 135) $hButton2 = GUICtrlCreateButton("2", 10, 165) For $i = 1 To 5 GUICtrlCreateListViewItem("a|b", $hListView) Next GUISetState() While True Switch GUIGetMsg() Case -3 Exit Case $hButton1 $sString = "" $iSelected = _GUICtrlListView_GetSelectedIndices($hListView) If $iSelected = "" Then MsgBox(0, "Error", "You must select something", 0, $hGui) ContinueLoop EndIf $sString = _GUICtrlListView_GetItemText($hListView, $iSelected) ConsoleWrite($sString & @CRLF) Case $hButton2 $sString = "" $iSelected = _GUICtrlListView_GetSelectedIndices($hListView) If $iSelected = "" Then MsgBox(0, "Error", "You must select something", 0, $hGui) ContinueLoop EndIf $sString = _GUICtrlListView_GetItemText($hListView, Number($iSelected)) ConsoleWrite($sString & @CRLF) EndSwitch WEnd Imo this something that the help file should inform the user about, what you say?
jchd Posted May 8, 2019 Posted May 8, 2019 Why? _GUICtrlListView_GetItemText() clearly states that the index is expected in integer format. You choose to obtain selected index (or indices) as string, thus it's your responsability to perform the conversion. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
Inpho Posted May 9, 2019 Posted May 9, 2019 I don't think it's a big bother in itself; it's just the inconsistency across functions. There are other functions which state that they require an integer, but if you feed them a string, the function does the conversion (or the function doesn't fail at least). ArrayColDelete comes to mind. I guess if a user doesn't know which functions will automatically convert datatypes, the lesson is to always convert yourself.
jchd Posted May 9, 2019 Posted May 9, 2019 Observe that the function mention Indices (a plural). When more than one item index are selected, the string returned contains a series on numeric indices separated by |. It's up to you the user to decide which index to feed to other functions, so you have to extract the index you want (each in turn if needed) and perform the conversion. Inpho 1 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
Skysnake Posted March 30, 2020 Posted March 30, 2020 Helpfile ChrW Returns a character corresponding to a unicode code. ChrW ( UNICODEcode ) Request for inclusion of an additional example: I used this ChrW ( 0xA0 ) ; hex for non-breaking space Skysnake Why is the snake in the sky?
jchd Posted March 30, 2020 Posted March 30, 2020 1 hour ago, Skysnake said: Request for inclusion of an additional example: I used this ChrW ( 0xA0 ) ; hex for non-breaking space Maybe it would be more enlightning to examplify a codepoint which is <= 0xFF in Windows Occidental codepage but >= 0x100 in Unicode. The first example of such is the Euro symbol: MsgBox(0, "", "Today 1 " & Chr(0x80) & " = 2 " & ChrW(0x20AC)) Because AutoIt strings are using [a subset of] Unicode, Chr(0x80) is interpreted as that value in the Windows codepage (Occidental for me) and internally converted to its Unicode counterpart to be stored as string. We then concat the actual Unicode codepoint to show what happens. Meanwhile it immediately doubles the savings of users who actually read to the help file! Skysnake 1 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
Skysnake Posted March 31, 2020 Posted March 31, 2020 The Help File example is not wrong, but does not show how to use codes in Hex format. All I am asking for is an example that elucidates usage. Skysnake Why is the snake in the sky?
jchd Posted March 31, 2020 Posted March 31, 2020 Correct and by the way we can thusly point out the implied conversion which occurs with Chr(), with no additional cost. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
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