Jump to content

magus

Members
  • Posts

    7
  • Joined

  • Last visited

magus's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. This progressbar reaches 100% too quickly, please help me fix that. edit: it seems like the server sometimes has a 15MB file, and sometimes a 20MB file. so when inetgetsize and inetget are pointed at different files (even though it's the same URL), the progressbar gets screwed up. any way to make sure the largest file is always downloaded? edit: problem solved. delete please?
  2. One day, software such as this will make it possible for us to live in a world in which documents are NEVER lost! Everyone's documents will be automatically backed up whenever they are modified. It's a completely automated process. Digg: http://digg.com/gadgets/DIGG_THIS_Auto_bac...ments_w_DropBox The compiled program is ready to go out of the box, once DropBox has been installed. Program: Auto_DropBox.exe (updated) ;Written by magus.from.chrono.trigger@gmail.com ;Description: This script will automatically back up every instance of certain filetypes. It will run continuously check for newly modified files in the background, however it will only re-index the host computer when it has been idle for a certain amount of time. ;Requirements: DropBox : http://www.getdropbox.com/ #RequireAdmin #Include <File.au3> #Include <Date.au3> #include <Timers.au3> Opt("TrayIconDebug", 1) ;------------------Preferences---------------- $idle_time_in_minutes = 60;amount of time since last user activity (i.e. KYBD/Mouse) necessary before re-indexing may begin. $auto_backup_cycle = 1;delay to be distributed evenly amongst the tasks to be completed during each auto-backup cycle, in minutes. Increase this if the script slows your computer down. $max_size_in_MB = 20 $extension_list = "pdf txt rtf doc docx docm dotx dotm xls xlsx xlsm xltx xltm xlsb xlam ppt pptx potx potm ppam ppsx ppsm sldx sldm thmx";this is a space-delimited list $destination = @MyDocumentsDir & "\My Dropbox\Document Backup\";location where you'd like your MS Office files backed up. $index_location = @MyDocumentsDir & "\magus\" $parent_directory = "c:\Users\";Only the parent directory and its subdirectories will be indexed. ;--------------------------------------------- $file_formats = StringSplit($extension_list, " ") Global $PID[$file_formats[0] + 1] $idleticks = $idle_time_in_minutes * 60 * 1000 $max_bytes = $max_size_in_MB * 1000000 ProcessSetPriority(@AutoItPID, 1) For $i = 1 to $file_formats[0];EDIT: this only runs the initial search if necessary If NOT FileExists($index_location & $file_formats[$i] & "_list.txt") Then _SearchForFiles() Next While 1 If _Timer_GetIdleTime() > $idleticks Then _SearchForFiles();Searching For Documents, if idle For $i = 1 to $file_formats[0];Uploading recently modified documents $lines = _FileCountLines($index_location & $file_formats[$i] & "_list.txt") For $q = 1 to $lines $source = FileReadLine($index_location & $file_formats[$i] & "_list.txt", $q) If FilegetSize($source) < $max_bytes Then $source_path = StringTrimLeft($source, StringLen($parent_directory)) For $z = 1 to 80;StringLen($source_path) If StringInStr(StringRight($source_path, $z), "\") Then ExitLoop Next $source_path = StringTrimRight($source_path, $z - 1) $filename = StringTrimLeft($source, (StringLen($source) - $z + 1)) If FileExists($destination & $source_path & $filename) Then $source_time = FileGetTime($source) $destination_time = FileGetTime($destination & $source_path & $filename) $date_diff = _DateDiff('s', $source_time[0] & "/" & $source_time[1] & "/" & $source_time[2] & " " & $source_time[3] & ":" & $source_time[4] & ":" & $source_time[5], $destination_time[0] & "/" & $destination_time[1] & "/" & $destination_time[2] & " " & $destination_time[3] & ":" & $destination_time[4] & ":" & $destination_time[5]) If $date_diff < 0 Then FileCopy($source, $destination & $source_path, 9) Else FileCopy($source, $destination & $source_path, 9) EndIf EndIf Sleep($auto_backup_cycle / $file_formats[0] / $lines * 1000 * 60) Next Sleep(500) Next Sleep(1000) WEnd Func _SearchForFiles() For $i = 1 to $file_formats[0] $PID[$i] = Run(@comspec & ' /c dir ' & $parent_directory & '"*.' & $file_formats[$i] & '" /b/oN/s > "' & $index_location & "*" & $file_formats[$i] & '_list.txt"', "", @SW_HIDE);EDIT: added "*" wildcard after index_location ProcessSetPriority ($PID[$i], 0) Next For $i = 1 to $file_formats[0];Waiting for all the command processors to close ProcessWaitClose($PID[$i]) Next EndFunc If you find a bug, post as many details as you can here, and I'll try to fix it.
  3. I have a very cool script to post, but it won't let me start a new thread in Example Scripts.
  4. If I leave #RequireAdmin in the script, it does not close the IE window. It doesn't give me an error either. So it seems to give $x some kind of object variable, but the IE functions can't seem to do anything with that variable. PS I've used #RequireAdmin in many scripts using many other IE.au3 functions, and they still work fine. I only have problems with _IEAttach
  5. This script ONLY works on my computer (running 32-bit Vista) if I REMOVE #RequireAdmin... #include <IE.au3> #RequireAdmin ShellExecute("iexplore.exe", "http://www.google.com") WinWait("Google") Sleep(1000) $x = _IEAttach("Google") _IEQuit($x)
  6. damn, so it's a problem on my end? AutoIt3.exe has encountered a problem and needs to close. We are sorry for the inconvenience. when i click "more info" i get: AppName: autoit3.exe AppVer: 3.2.9.3 ModName: unknown ModVer: 0.0.0.0 Offset: 66006041 any ideas?
  7. ShellExecute("iexplore.exe", "about:blank") whenever i run this, autoit gets an error and crashes. what's up with that?
×
×
  • Create New...