How to return an array position Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
songdg
Posts: 50
Joined: 04 Oct 2017, 20:04

How to return an array position

17 Apr 2018, 21:41

An array consist of seven elements,I want to return the position like this

Code: [Select all] [Download] GeSHi © Codebox Plus

;if all the elements is the same return the first position
;return the first position of the elements which occur most
arr := [111, 111, 111, 111, 111, 111, 111] ;return 1
arr := [123, 111, 111, 111, 111, 111, 111] ;return 2
arr := [112, 119, 111, 111, 111, 111, 111] ;return 3
arr := [117, 116, 115, 111, 111, 111, 111] ;return 4
arr := [117, 118, 111, 111, 189, 111, 111] ;return 3
arr := [117, 119, 111, 111, 111, 111, 177] ;return 3
wolf_II
Posts: 1827
Joined: 08 Feb 2015, 20:55

Re: How to return an array position  Topic is solved

17 Apr 2018, 23:10

Try this:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

I hope that helps.
songdg
Posts: 50
Joined: 04 Oct 2017, 20:04

Re: How to return an array position

18 Apr 2018, 21:42

wolf_II wrote:Try this:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

I hope that helps.

Thanks,much appreaciated.

Return to “Ask For Help”

Who is online

Users browsing this forum: Flipeador, Zodie and 38 guests