Jump to content

Korom

Members
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Korom's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I don't agree with you . there is nothing wrong here . This is for personal use mate . My PC and I'm free to do anything with it . I agree , I'm tryig to do that I might succeed but still have some erros. Bro , this is personal . I really need It
  2. <snip> thanks for helping mate , but I want to delete the GUI completly cause I don't need it and it's taking a lot of lines in my script I wionder if you could do it , otherwise i'm waiting somebody elese who can ^^
  3. snipHELLO EVERYONE As said , I 've this code which basicly record audio from PC microphone . It has a GUI Intreface which I need to remove it . I want to run the script hidden in my pc with no GUI and start recording all the day and add a HotKeySet({ESC},_Stop()) to stop recording since I am new in autoit I couldn't do it without breaking the script . The script is using "BASSCB.dll" I've attached the script with all it's files and dll's in attachmants I'm waiting for your help experts and thanks in advance ! This is the main script : <snip>
  4. no bro code is correct "GetFileSize" is an UDF that I found somewhere in this forums it retuurns the size in kilobyte and it woks perfectly , normal FileGetSize retuurns it in bytes . Func GetFileSize($inputSize, $inputUnit = 1, $outputPlaces = 2, $outputString = True, $inputBits = False, $outputBits = False, $outputUnit = -4)     Local $unitNames[9] = ["","K","M","G","T","P","E","Z","Y"]     Local $bytes = $inputSize * 1024 ^ $inputUnit     Local $b = "B"     If $inputBits Then $bytes /= 8     If $outputBits Then         $bytes *= 8         $b = "b"     EndIf     If $outputUnit < 0 Then         Local $outputMax = Abs($outputUnit)         $outputUnit = Int(Log($bytes)/Log(1024))         If $outputUnit > $outputMax Then $outputUnit = $outputMax     EndIf     If $outputString Then         Return String(Round($bytes / 1024 ^ $outputUnit, $outputPlaces)) & $unitNames[$outputUnit] & $b     Else         Return Round($bytes / 1024 ^ $outputUnit, $outputPlaces)     EndIf  EndFunc no mate I want files names to have the same radical (same name) exept last number (name0.txt ,name1.txt ,name2.txt ...) I need it like that fo the rest of my app
  5. Sorry I forgott this line inside While 1 while 1 $LogF= $Fname I am waiting for you autoit experts ...
  6. my script always become infected after using UPX Compression !! and sometimes even without using it please help
  7. Thanks for share bro !
  8. Hello everyone I am new in autoit What I want to do is , writing my application events and erros and save them in a '.txt' file then change filename each time when the file size become bigger than (1 MB ) ( I do not want a lot of lines in the same file) for example , my app is writing into "My_app_events0.txt" then when it's size become 1MB or more it start writing into "My_app_events1.txt" without deleting the first file , and then "My_app_events2.txt" ,"My_app_events3.txt" then "My_app_events4.txt" ...ect I am using this function to get file size Func GetFileSize($inputSize, $inputUnit = 1, $outputPlaces = 2, $outputString = True, $inputBits = False, $outputBits = False, $outputUnit = -4) Local $unitNames[9] = ["","K","M","G","T","P","E","Z","Y"] Local $bytes = $inputSize * 1024 ^ $inputUnit Local $b = "B" If $inputBits Then $bytes /= 8 If $outputBits Then $bytes *= 8 $b = "b" EndIf If $outputUnit < 0 Then Local $outputMax = Abs($outputUnit) $outputUnit = Int(Log($bytes)/Log(1024)) If $outputUnit > $outputMax Then $outputUnit = $outputMax EndIf If $outputString Then Return String(Round($bytes / 1024 ^ $outputUnit, $outputPlaces)) & $unitNames[$outputUnit] & $b Else Return Round($bytes / 1024 ^ $outputUnit, $outputPlaces) EndIf EndFuncI've Tried to write this methode but it doesn't work I do't know why it consist in getting the file number from a registry key and add ( +1 ) each time we change the file to write into . $Key = "HKEY_CURRENT_USER\Software\My_app_events" $Val = 'Number' $Read_Number = RegRead($Key,$Val) ;$LogC = FileOpen($LogN,2) If RegRead($Key,$Val) <> "" Then ; a number already exists So this is not my first run $Fname = "My_app_events" & $Read_Number & ".txt" ; Read our filename Else ; So this is my 1st Run RegWrite($Key,$Val,"REG_SZ","0") ; Write First number = 0 $Fname = "My_app_events" & $Read_Number & ".txt" ; Read our filename EndIf while 1 $KeySize = GetFileSize($LogF) If $KeySize >= 1024 Then ; If file Size > 1 MB (1000 KB ) $OlD_Num = RegRead($Key,$Val) ; Getting old Number RegWrite($Key,$Val,"REG_SZ","") ; Empty the number RegWrite($Key,$Val,"REG_SZ",$OlD_Num +1) ; Writing the next Number Restart() EndIf WriteEvents() Sleep(1000) Wend Func WriteEvents($What_to_write) FileWrite($Fname,$What_to_write) endfunc Func Restart() Run(@Autoitexe) ; Restart Exit EndfuncI tried also the same way but with another methode which read file name from another '.txt' file but it didn't work to I removed it after . I wish I will get help , thanks in advance and Sorry for my bad English
×
×
  • Create New...