By 'turn machine on' do you mean boot or resume from standby/hibernate? If the latter, you can just keep Alt.Binz running with your options toggled.
Otherwise, you need to invest a bit of time in writing a batch script to monitor the altbinz_status.xml file. Here's a snippet of old one that should give you an idea of what's possible (I do it all with PowerShell now
):
@echo off
rem SNIPPED
:connect_altbinz
find "<connect>true</connect>" "C:\Program files\Altbinz\altbinz_status.xml" >nul
if %ERRORLEVEL%==0 goto scan_RSS
Echo %DATE% %TIME:~0,-3% Connecting Altbinz ................
c:\replace.vbs "C:\Program files\Altbinz\altbinz_status.xml" "<connect>false</connect>" "<connect>true</connect>"
:scan_RSS
echo %DATE% %TIME:~0,-3% Scanning RSS feed .................
set counter=1
:scan_RSS_loop
if %counter%==10 goto disconnect_altbinz
find "<ETA>Unknown</ETA>" "C:\Program files\Altbinz\altbinz_status.xml" >nul
if %ERRORLEVEL%==1 goto check_download_status
set /a counter=%counter% + 1
call c:\wait.bat 60
goto scan_RSS_loop
:check_download_status
Echo %DATE% %TIME:~0,-3% Checking AB download status .......
:check_loop
FOR /f "EOL=- TOKENS=3 DELIMS=<>" %%S IN ('find "<CurrentSpeed>" "C:\Program files\Altbinz\altbinz_status.xml"') DO (echo %date% %TIME:~0,-3% Current Speed: %%S)
find "<ETA>Unknown</ETA>" "C:\Program files\Altbinz\altbinz_status.xml" >nul
if %ERRORLEVEL%==0 goto disconnect_altbinz
call c:\wait.bat 60
goto check_loop
:disconnect_altbinz
Echo %DATE% %TIME:~0,-3% Disconnecting Altbinz .............
c:\replace.vbs "C:\Program files\Altbinz\altbinz_status.xml" "<connect>true</connect>" "<connect>false</connect>"
:hibernate
Echo %DATE% %TIME:~0,-3% Hibernating .......................
%SYSTEMROOT%\System32\rundll32.exe powrprof.dll,SetSuspendState 1,1,0
And in replace.vbs:
Const ForReading = 1
Const ForWriting = 2
strFileName = Wscript.Arguments(0)
strOldText = Wscript.Arguments(1)
strNewText = Wscript.Arguments(2)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strFileName, ForReading)
strText = objFile.ReadAll
objFile.Close
intLength = Len(strText)
strEnd = Right(strText, 2)
If strEnd = vbCrLf Then
strText = Left(strText, intLength - 2)
End If
strNewText = Replace(strText, strOldText, strNewText)
Set objFile = objFSO.OpenTextFile(strFileName, ForWriting)
objFile.WriteLine strNewText
objFile.Close
And in wait.bat:
@echo off
@ping 127.0.0.1 -n 2 -w 1000 > nul
@ping 127.0.0.1 -n %1% -w 1000> nul
LOL, all that reminds me why I moved over to PowerShell. Maybe an Autopush Shutdown option would be easier