Sorting question

Get help with using AutoHotkey and its commands and hotkeys
jsmain
Posts: 60
Joined: 07 Feb 2014, 08:21
Google: +JeffMain

Sorting question

13 Apr 2015, 15:21

I have a file I am sorting some content from.

My desired sort would appear like this...

!var[$abm_active,0,1] # tracks abm active state
!var[$deck_a_bend,0,21] # non-zero = currently bending
!var[$deck_b_bend,0,21]
!var[$deck_a_bend_down,0,1] # 1 = bend down
!var[$deck_b_bend_down,0,1]
!var[$deck_a_bend_state,0,1] # tracks jog wheel state for bending
!var[$deck_b_bend_state,0,1]
!var[$deck_a_bend_up,0,1] # 1 = bend up
!var[$deck_b_bend_up,0,1]
!var[$deck_a_frame_search,0,1] # 1 = in frame search mode
!var[$deck_b_frame_search,0,1]
!var[$global_shift,0,1] # global shift state


The actual sort comes out like this...

!var[$abm_active,0,1] # tracks abm active state
!var[$deck_a_bend,0,21] # non-zero = currently bending
!var[$deck_a_bend_down,0,1] # 1 = bend down
!var[$deck_a_bend_state,0,1] # tracks jog wheel state for bending
!var[$deck_a_bend_up,0,1] # 1 = bend up
!var[$deck_a_frame_search,0,1] # 1 = in frame search mode
!var[$deck_b_bend,0,21]
!var[$deck_b_bend_down,0,1]
!var[$deck_b_bend_state,0,1]
!var[$deck_b_bend_up,0,1]
!var[$deck_b_frame_search,0,1]
!var[$global_shift,0,1] # global shift state

Each line is a variable declaration, and I would brefer to keep the Deck A & B declarations side by side.

Any suggestions on how to do this please?

Thanks for any assistance you can provide!
hd0202
Posts: 61
Joined: 04 Oct 2013, 03:07
Location: Germany near Cologne

Re: Sorting question

13 Apr 2015, 15:52

Here is my suggestion:

Code: [Select all] [Expand] [Download] (Script.ahk)GeSHi © Codebox Plus

Hubert
toralf
Posts: 444
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Sorting question

13 Apr 2015, 17:21

Why didn't you use the command Sort?
ciao
toralf
jsmain
Posts: 60
Joined: 07 Feb 2014, 08:21
Google: +JeffMain

Re: Sorting question

13 Apr 2015, 17:35

Personally, I did toraf, and the output wasn't ordered the way I would like.
Hubert, That looks like it will do what I'm after!

Thank you!
User avatar
AlphaBravo
Posts: 354
Joined: 29 Sep 2013, 22:59

Re: Sorting question

13 Apr 2015, 17:52

Code: [Select all] [Expand] [Download] (Script.ahk)GeSHi © Codebox Plus

jsmain
Posts: 60
Joined: 07 Feb 2014, 08:21
Google: +JeffMain

Re: Sorting question

13 Apr 2015, 18:42

Even better!

Wish I understood the RegEx strings.

Thanks AlphaBravo!
IMEime
Posts: 411
Joined: 20 Sep 2014, 06:15

Re: Sorting question

13 Apr 2015, 21:41

Code: [Select all] [Expand] [Download] (Script.ahk)GeSHi © Codebox Plus

IMEime
Posts: 411
Joined: 20 Sep 2014, 06:15

Re: Sorting question

14 Apr 2015, 10:30

Just for Pun

Code: [Select all] [Expand] [Download] (Script.ahk)GeSHi © Codebox Plus


Return to “Ask For Help”

Who is online

Users browsing this forum: Archandrion, Pardeep Tariyal, Prisonfeed and 10 guests