inmysights 0 Posted December 15, 2015 I did a search but nothing was returned for any type of queue I was just looking for examples of how to setup one of these queues. Thank you Share this post Link to post Share on other sites
Melba23 3,411 Posted December 15, 2015 inmysights,guinness has coded this Queue UDF - any use?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 Share this post Link to post Share on other sites
JohnOne 1,603 Posted December 15, 2015 What queues?Can you elaborate? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites
inmysights 0 Posted December 15, 2015 Like the ones in my topic, examples on how to setup a queue, or a priority queue Share this post Link to post Share on other sites
inmysights 0 Posted December 15, 2015 inmysights,guinness has coded this Queue UDF - any use?M23Thank you! I will see if I can use this! Share this post Link to post Share on other sites
Tekk 23 Posted December 16, 2015 Here is an example of a circular FIFO queue.expandcollapse popup#Region Example Global $g_aQueue = QueueCreate(5) Global $g_nDataPush = 1 Global $g_nDataPeek = 0 Global $g_nDataPop = 0 For $i = 1 To 2 While QueuePush($g_aQueue, $g_nDataPush) ConsoleWrite(StringFormat("-->> QueuePush: %i\n", $g_nDataPush)) $g_nDataPush += 1 WEnd QueuePeek($g_aQueue, $g_nDataPeek) ConsoleWrite(StringFormat("+->> QueuePeek: %i\n", $g_nDataPeek)) While QueuePop($g_aQueue, $g_nDataPop) ConsoleWrite(StringFormat(">--> QueuePop: %i\n", $g_nDataPop)) WEnd Next #EndRegion Example Func QueuePush(ByRef $aQueue, $vData) If ($aQueue[0] = $aQueue[1]) Then Return False $aQueue[3] = Mod($aQueue[3] + 1, $aQueue[0]) $g_aQueue[$aQueue[3] + 4] = $vData $aQueue[1] += 1 Return True EndFunc Func QueuePop(ByRef $aQueue, ByRef $vData) If ($aQueue[1] = 0) Then Return False $aQueue[2] = Mod($aQueue[2] + 1, $aQueue[0]) $vData = $g_aQueue[$aQueue[2] + 4] $aQueue[1] -= 1 Return True EndFunc Func QueuePeek(ByRef $aQueue, ByRef $vData) If ($aQueue[1] = 0) Then Return False Local $nTemp = Mod($aQueue[2] + 1, $aQueue[0]) $vData = $g_aQueue[$nTemp + 4] Return True EndFunc Func QueueCreate($nSize) Local $aQueue[$nSize + 4] = [$nSize, 0, 0, 0] Return $aQueue EndFunc Share this post Link to post Share on other sites