Jump to content

Recommended Posts

Posted

hi below i got one script i made which runs audacity starts a recording and ends it at specific times

 

when i run the script even if it isn't the time to start audacity and sits idle on taskbar the pc fan gets very loud, when i close the script it comes back to normal 

 

why this happens ? anything wrong with my code ?? cheers

#include <INet.au3>
#include <Array.au3>
#include <WinAPIFiles.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <string.au3>
#include <FTPEx.au3>
#include <ClipBoard.au3>
#include <date.au3>
#include <ProgressConstants.au3>
#include <IE.au3>
#Include <Constants.au3>
#Include <INET.au3>
#include <SendMessage.au3>
#include <File.au3>
#include <String.au3>
#include <MsgBoxConstants.au3>
#include <StringConstants.au3>
#include <Misc.au3>
#include <FileConstants.au3>
#include <WinAPI.au3>

while 1

if @HOUR = '11' And @MIN = '00' Then 

Run("C:\Program Files (x86)\Audacity\audacity.exe", "", @SW_MAXIMIZE)

SLEEP(2000)


if ProcessExists("audacity.exe") Then
winactivate("Audacity")
EndIf
    

Send("r")

;;KREVATI
Sleep(1000 * 60)

endif


if @HOUR = '23' And @MIN = '00' Then 


if ProcessExists("audacity.exe") Then
winactivate("Audacity")
EndIf


Send("s")

Sleep(1000 * 60)

EndIf

wend

 

Posted
Quote

when i run the script even if it isn't the time to start audacity and sits idle on taskbar the pc fan gets very loud, when i close the script it comes back to normal 

though you should get about 2 minutes of relief a day from the loud fan noise, if I’m reading the script right :)
 

 

Code hard, but don’t hard code...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...