08-01-2018, 01:22 PM
Hi everybody
I tried to follow http://www.quickmacros.com/forum/showthr...p?tid=6283 to sort my Array by number - I would prefer Descending (highest first)
I will make an array with products in column 0 and the number value in column 1 that I want to order by
My array looks like:
Product1 -> 95
Product2 -> 112
I wish it would look like:
Product2 -> 112
Product1 -> 95
My macro is:
My 'sortwordHits' function to sort by the number is
thanks everybody for this great community
I have been using Quick Macro for many many years, it truely is #1 for task automation
I tried to follow http://www.quickmacros.com/forum/showthr...p?tid=6283 to sort my Array by number - I would prefer Descending (highest first)
I will make an array with products in column 0 and the number value in column 1 that I want to order by
My array looks like:
Product1 -> 95
Product2 -> 112
I wish it would look like:
Product2 -> 112
Product1 -> 95
My macro is:
ARRAY(str) am.create(2 2)
int i j
am[0 0]="Product1"
am[0 1]="95"
am[1 0]="Product2"
am[1 1]="112"
str d
am.sort(8 sortwordHits &d )
for i 0 am.len(1)
for j 0 am.len(2)
out am[i j]
My 'sortwordHits' function to sort by the number is
function# param str&a str&b
&a=&a+(3*sizeof(a))
&b=&b+(3*sizeof(b))
ret StrCompare(b a)
thanks everybody for this great community
I have been using Quick Macro for many many years, it truely is #1 for task automation