So I'm trying to make an automation script to help rip a very large CD library to mp3 with a program called CDex. The problem is that the script doesn't stay open.
The last time I tried to make a script it was really bad, but at least it worked. When it was running the AHK icon was in the systray, but this script appears to do nothing, and there's nothing in task manager under processes.
I'm fairly sure my problem lies with the flow of control and my use of "return". I thought that when you use that it starts the script back at the top?
Here's my code, please help me find where I've gone wrong.
ifwinexist, copying
{
return
}
else
{
Gosub chktry
return
}
chktry:
driveget, traystatus, statuscd
ifequal, traystatus, open
{
return
}
else
{
Gosub matchchk
return
}
matchchk:
ifwinexist, no match found
{
Gosub nomatch
return
}
else
{
Gosub inxmatch
return
}
nomatch:
sendinput {Tab}{Tab}{Tab}{Tab}{Enter}{f9}
Gosub renameunknownloop
return
inxmatch:
ifwinexist, inexact match found
{
sendinput {tab}{tab}{enter}
Gosub inicopy
return
}
else
{
Gosub inicopy
return
}
inicopy:
sendinput {f9}
ifwinexist, overwrite
{
sendinput {tab}{enter}
return
}
else
{
Gosub midoverproa
return
}
midoverproa:
ifwinexist, copying
{
Gosub midoverprob
return
}
else
{
return
}
midoverprob:
ifwinexist, overwrite
{
sendinput {tab}{enter}
return
}
else
{
Gosub midoverproa
return
}
renameunknownloop:
ifwinexist, copying
{
Gosub renameunknownloop
return
}
else
{
formattime, localtime,, MM/dd/yyyy-h.mm.tt
filemovedir, S:\Dad's music\no name, S:\Dad's music\%localtime%, r
return
}
return