inmysights Posted December 15, 2015 Share 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 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 15, 2015 Moderators Share 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 Link to comment Share on other sites More sharing options...
JohnOne Posted December 15, 2015 Share 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. Link to comment Share on other sites More sharing options...
inmysights Posted December 15, 2015 Author Share Posted December 15, 2015 Like the ones in my topic, examples on how to setup a queue, or a priority queue Link to comment Share on other sites More sharing options...
inmysights Posted December 15, 2015 Author Share Posted December 15, 2015 inmysights,guinness has coded this Queue UDF - any use?M23Thank you! I will see if I can use this! Link to comment Share on other sites More sharing options...
Tekk Posted December 16, 2015 Share 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 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