I’m editing a program called TF2idle that can be seen here:
http://facepunch.com/showthread.php?t=1161862
I’m adding a button to defrag any of the accounts that are selected using the person’s source he has available.
I found in the python files that this is where all the magic happens and is what I need to edit to add my Defrag button.
Lines 136 – 142 and 328-337 I added myself. These lines are below:
startDefragIcon = QtGui.QIcon()
startDefragIcon.addPixmap(QtGui.QPixmap(returnResourcePath('images/defrag.png')), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.startDefragAction = self.mainwindow.htoolBar.addAction(startDefragIcon, 'Defrag Accounts')
QtCore.QObject.connect(self.startDefragAction, QtCore.SIGNAL('triggered()'), curry(self.startUpAccounts, action='start_Defrag'))
and
if action == 'start_Defrag':
command = r'"%s/Steam.exe" -login %s %s' % (sandbox_install, username, password)
if easy_sandbox_mode == 'yes' and self.settings.get_option('Account-' + account, 'sandbox_install') == '':
self.commandthread.addSandbox('TF2Idle' + username)
self.createdSandboxes.append(username)
command = r'"%s/Start.exe" /box:%s %s' % (sandboxielocation, 'TF2Idle' + username, command)
else:
command = r'"%s/Start.exe" /box:%s %s' % (sandboxielocation, sandboxname, command)
#Right here add script to launch steam://defrag/440
A way the program can defrag the accounts is to launch “steam://defrag/440” and that will automatically do it. For an example, I can put in my google chrome address bar that address and it will tell steam to defrag the program with the ID 440, which is TF2.
Thing is, I have no idea how to add that to the script. I was thinking of adding a BAT file which would have “steam://defrag/440” inside it and add a line that would launch said BAT file at line 336.
I’m hoping someone here knows how I can accomplish this.
Second problem is that I have no idea how to turn all these source files after I finished editing into an .EXE. I know this is all advanced for me, but I gotta start learning if I want to go to college for computer science, plus this would really help out many users using this tool.
I suspect you want the webbrowser module: