The code is visible below, if you are worry about spyware etc stuff
# The .ahf file search ver. 0a1 by Xjazz
# The python installation is needed to run this script
# [url]http://www.python.org/[/url]
# Place this script to the AH films folder
# DEFINE YOUR DRIVE AND PATH TO AH FILM FOLDER!!!
path = 'c:/Program Files/HTC/Aces High II/films/'
# DEFINE YOUR DRIVE AND PATH TO THE NOTEPAD.EXE!!!
nppath ='c:/windows/notepad.exe'
import os, sys
FILM_LIST=[]
REPORT=''
def get_ahfFiles(NAME,path, tex=''):
arqs = os.listdir(path)
for a in arqs:
if a.endswith('.ahf'):
find_name(NAME,path,a)
report_file(NAME,FILM_LIST)
def find_name(NAME,path, a):
ahfread = open((path+a),'rb')
ahflines = ahfread.readlines()
ahfread.close()
for l in ahflines:
if l.find(NAME)!=-1:
try:
if FILM_LIST.index(a) is False:
pass
except ValueError:
FILM_LIST.append(a)
def report_file(NAME,FILM_LIST):
fname = ('AHF_'+NAME)+'.txt'
REPORT = path+fname
rfile = open(fname,'w')
fname = fname+'\n'
sps = 'The search parameter was: '+NAME+'. '+(str(len(FILM_LIST)))+' found.' +'\n'+'\n'
rfile.write(sps)
for f in FILM_LIST:
f = f+'\n'
rfile.write(f)
rfile.close()
os.spawnl(os.P_NOWAIT, nppath, 'notepad.exe',REPORT)
def name_chk():
NAME=''
while len(NAME.lstrip(' ')) < 2:
NAME = raw_input("Give a searh parameter or write 'exit' to exit: ")
if NAME == 'exit':
sys.exit()
get_ahfFiles(NAME, path)
# Start
name_chk()