Round Robin Help Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
RoundRobin

Round Robin Help  Topic is solved

12 Aug 2014, 09:49

I am trying to figure out how round robin a list of tickets and users. What I would like to do is put a username with a ticket number and round robin the username till all the tickets are assigned.

Say I have a list of tickets and usernames

Tickets = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
Usernames = name1,name2,name3,name4

would like the output of:

1 - name1
2 - name2
3 - name3
4 - name4
5 - name1
6 - name2
7 - name3
8 - name4
an so on... till all tickets have a username.


Thanks in advance
ahcahc
Posts: 110
Joined: 25 Jul 2014, 23:55

Re: Round Robin Help

12 Aug 2014, 10:42

Code: Select all

Tickets = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
Usernames = name1,name2,name3,name4
result :=
ticketno=0
tmp=0
Loop,parse,Usernames, `,
	total_users := A_Index
Loop,Parse, Tickets, `,
{
if (tmp=total_users)
	tmp=0
tmp++
ticketno := A_LoopField
Loop,parse,Usernames, `,
	if (A_index=tmp)
		result := result . ticketno " - " A_LoopField "`n"
}
MsgBox % result
RoundRobin

Re: Round Robin Help

12 Aug 2014, 12:55

Thank you very much! Exactly what I needed.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: filipemb, Google [Bot], Rohwedder, slowwd and 228 guests