Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9320511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T03:39:07+00:00 2026-06-19T03:39:07+00:00

I’m working on a program in AutoHotKey that automates the process for mass converting

  • 0

I’m working on a program in AutoHotKey that automates the process for mass converting .FTM (FamiTracker) files to .WAV. The problem is that I want it to increment the value of the “send {down}” statement +1 each loop (to select the next song in the folder).

edit I’ve updated the code. The increment statement works, I just need to find a way to make the whole program loop as many times as needed to convert all the files in the folder (adding +1 to send {down} each loop). The problem right now is it’s not looping the whole program. Any help is appreciated!

Here’s an excerpt of how the program looks after launching the FamiTracker music application:

  Sleep, 800 ; I want the program to loop back to here when it reaches the last line
click 20,30 ; clicks "file"
  Sleep, 500
Send {down 2} ; clicks "open"
send {enter}
  Sleep, 1200
click 211,128 ; clicks first filename in folder
  Sleep, 1200
send {enter}
  Sleep, 1000
click 20,30 ; clicks "file"
send {down 6}
send {enter} ; clicks "create wav"
  Sleep, 1000
click 157,57 ; increase playcount to 2
  Sleep, 500
send {enter}
  Sleep, 1000
send {enter}
  Sleep, 2500
send {enter}
click 20,30 ; clicks "file"
  Sleep, 500
Send {down 2} ; clicks "open"
send {enter}
  Sleep, 1200
click 211,128 ; clicks first filename in folder
  Sleep, 1000
Jmp:=1
Loop
{
    Send, {Down %Jmp%}
    Jmp+=1
return
}
sleep, 100
send {enter}
  Sleep, 1000
click 20,30 ; clicks "file"
send {down 6}
send {enter} ; clicks "create wav"
  Sleep, 1000
click 157,57 ; increase playcount to 2
  Sleep, 500
send {enter}
  Sleep, 1000
send {enter}
  Sleep, 2500
send {enter}
  Sleep, 1000 ; final line of code, want it to loop back to line 1 to repeat process till all files in folder are converted

I’ve been stuck for quite some time, any ideas? I essentially want the cursor to move onto the next song after each loop of the program. The first time the program runs, it loads song1, then once song1 is finished, it’ll repeat the process but go on and click song2, and so forth.

Thanks a lot

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T03:39:08+00:00Added an answer on June 19, 2026 at 3:39 am

    f you want to skip one more file in a loop, you could use something like this.
    You should add a test to compare the last file name with the current filename, to exit this loop at the end of the list.

    Jmp:=1
    Loop
    {
        Send, {Down %Jmp%}
        Jmp+=1
    }
    Return
    

    I have updated your code to show how to use the Loop. The curly brackets define what will be executed inside the loop.

    InputBox, Jmp , Start, Enter Start number,,,,,,,,1
    Loop
    {
    Sleep, 800
    click 20,30 ; clicks "file"
      Sleep, 500
    Send {down 2} ; clicks "open"
    ; Copy the file name somewhere here
    ; Send, ^c ; Copy highlighted text to ClipBoard
    ; ClipWait
    ; If (ClipBoard = PreviousName)
    ; {
    ;    Break
    ;    MsgBox, Next filenumber = %Jmp%
    ; }
    ; PreviousName = %ClipBoard%
    send {enter}
      Sleep, 1200
    click 211,128 ; clicks first filename in folder
      Sleep, 1200
    send {enter}
      Sleep, 1000
    click 20,30 ; clicks "file"
    send {down 6}
    send {enter} ; clicks "create wav"
      Sleep, 1000
    click 157,57 ; increase playcount to 2
      Sleep, 500
    send {enter}
      Sleep, 1000
    send {enter}
      Sleep, 2500
    send {enter}
    click 20,30 ; clicks "file"
      Sleep, 500
    Send {down 2} ; clicks "open"
    send {enter}
      Sleep, 1200
    click 211,128 ; clicks first filename in folder
      Sleep, 1000
    Send, {Down %Jmp%}
    Jmp+=1
    sleep, 100
    send {enter}
      Sleep, 1000
    click 20,30 ; clicks "file"
    send {down 6}
    send {enter} ; clicks "create wav"
      Sleep, 1000
    click 157,57 ; increase playcount to 2
      Sleep, 500
    send {enter}
      Sleep, 1000
    send {enter}
      Sleep, 2500
    send {enter}
      Sleep, 1000
    ;    If (Jmp > "1000")
    ;        Break
    }
    Return
    

    Your original code will run until the end of the file list and then continue to perform the same action on the last file over and over again. Therefore I added a filename comparison inside the code. On file open, you probably have the filename available in text form, this is what you copy onto your ClipBoard and compare the ClipBoard with the previous filename. By adding a starting number you can restart at a certain file.

    I see that your code uses a lot of mouseclicks. This is no problem if you only run this once, but if you want to run this reliably, there are other methods.

    Overall checking:
    Check EVERY window that is opened during this process and verify that the right window is open. In this example I check to see if the window with the title “File Open” is indeed opened and active (an other process or program [chat, updates, etc.] can take over the focus and your script would execute the code in this other program…).

    SetTitleMatchMode = 2
    WinWaitActive, File Open, , 5 ; Wait up to five seconds for the screen
      if ErrorLevel ; Execute this when the window is not activated within 5 seconds
      { 
        SoundBeep 1000 , 1000 ; Warn the user
        Break
      }
    

    Also try to use keyboard shortcuts when possible or (more advanced) use the AutoHotKey Windows Spy and check the ClassNN: at the section “Now under Mouse Cursor” then use this to directly activate these buttons unstead of through the mouse coordinates.

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want use html5's new tag to play a wav file (currently only supported
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.