Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/15/2014 in all areas

  1. Hi all, i needed an UDF for using the Windows Taskplaner / Task Scheduler. Everything i found was based on at.exe (outdated) orbased on schtasks.exe (limited in functionality) orusing WMI (which can not see task that were not created with WMI and is also limited)The only good solution i found was here: http://www.autoit.de/index.php?page=Thread&postID=214517#post214517 But it only had a Create Function. With my limited knowledge i tried creating more functions and it seems to work quite OK. You can try it out with TestTaskSchedulerUDF(). WinVista or higher is required. All feedback is welcome, but please be kind, i do not have much practise and i am well aware that there is room for improvment. Edit: added new version of the code with more functions: Edit2: updated UDF fixed bugs Edit3: added info for multiinst parameter (_TaskCreate) Edit4: updated UDF (some bugfixes) Edit5: added version info to UDF, added changes/additions suggested in this thread (_TaskIsEnabled(), _TaskEnable(), _TaskDisable() and $duration for _TaskCreate()) Edit6: added new version that does not use a COM errorhandler (this version can be mixed with other com functions with or without errorhandler, but requires current autoit beta 3.3.9.4 or newer) - see this post for details: (if you do not need other COM routines, there is no need to change from the last version to this one, but all newer version will be without errorhandler...) Edit7: added version 5.2 with new TaskCreate option $starwhenavailable Edit8: added version 5.3 fixed versioncompare problems and some typos (now runs with latest beta 3.3.9.22) Edit9: added version 5.4 (the COM errorhandler is back :-)) As long as there is no feedback this will be the last update...for me it works like it should and i can manage all my tasks just fine! Keep in Mind that Autoit does not support using more than one ComError Function so be careful if you use other com udfs that need a com errorfunction - this is not a problem when using the taskplanerCOMneh.au3 version (neh=no error handler) No longer true - use lates version with errorhandler Now we have: Func _TestTaskSchedulerUDF()Func _TaskSchedulerAutostart();check if the schedulerservice is set to autostartFunc _TaskIsValidPlatfrom() ;check if os and autoit versions are OK for use with this udfFunc _TaskFolderCreate($folder);Create folder - only folders that do not already exist can be created without errorFunc _TaskFolderDelete($folder);Delete folder - only folders that do exist and that are empty can be deleted without errorFunc _TaskFolderExists($folder = "");check if a TaskFolder existsFunc _TaskExists($taskname, $folder = "");check if a Task existsFunc _TaskStop($taskname, $folder = "");stop a taskFunc _TaskStart($taskname, $folder = "");start a taskFunc _TaskIsRunning($taskname, $folder = "");check if a Task is runningFunc _TaskIsEnabled($taskname, $folder = "");check if a Task is enabledFunc _TaskEnable($taskname, $folder = "");Enable TaskFunc _TaskDisable($taskname, $folder = "");Disable TaskFunc _TaskDelete($taskname, $folder = "");delete an existing taskFunc _TaskListall($folder = "", $hidden = 1);get a list of all tasks in a given taskfolder (Tasknames only) List is a string with names separeted by "|"Func _TaskCreate($taskname, $TaskDescription, $TriggerEvent, $StartTrigger, $EndTrigger, $DaysOfWeek, $DaysOfMonth, $MonthOfYear, $WeeksOfMonth, $DaysInterval, $Interval, $RepetitionEnabled, $LogonType, $RunLevel, $Username, $Password, $Program, $WorkingDirectory = "", $Arguments = "", $RunOnlyIfNetworkAvailable = True, $active = True, $multiinst = 0, $nobatstart = False, $stoponBat = False, $hidden = False, $idle = False, $WakeToRun = False, $timelimit = "P1D", $priority = 5, $duration="", $StartWhenAvailable = True)taskplanerCOMneh5.2.zip taskplanerCOM_neh5.3.zip taskplanerCOM_5.4.zip
    1 point
  2. LAST VERSION - 3.0 26-Mar-12 The program is designed to synchronize two (per task) folders with fine-tuning the synchronization settings. Despite the fact that SynFolders at first sight may seem a bit complicated to learn and use, it's really pretty easy and self-sufficient tool to periodically synchronize the folders and control of the synchronization process. SynFolders can be especially useful for those who often need to copying files from work to home and vice versa. The program is completely written in AutoIt, is freeware, but closed-source (at least for now). The any questions or comments about SynFolders please post it in this thread. I will be glad to any feedback and suggestions. Major program features Important Usefulness License Supported operating systems Windows XP, Vista, 7 Files to download Installer (recommended) Redirection to SynFolders_setup.zip, 1.57 MB SynFolders_setup.html Binary Redirection to SynFolders_bin.zip, 1.08 MB SynFolders_bin.html Source Redirection to SynFolders_source.zip, 1.62 MB SynFolders_source.html Note The author(s) is NOT RESPONSIBLE for any damages or loss of data resulting from the use of this software. This software is provided "AS IS" and may be used AT YOUR OWN RISK. There is no warranty (expressed or implied) as to the quality of this software.
    1 point
  3. Yeah, it looks that way from the helpfile. By the way, you should reduce the full screen size of the browser window for testing here, because it's covering everything, including the taskbar. Some people won't know how to get out of it.
    1 point
  4. You need to create the event. check the status and set the event state. Look the C++ example above. Saludos
    1 point
  5. According to the help file on #include, you actually can decide between two different #Include precedents. I find using <> vs "" very helpful in keeping my intended UDFs under control.
    1 point
×
×
  • Create New...