Leaderboard
Popular Content
Showing content with the highest reputation on 03/28/2013 in all areas
-
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.zip1 point
-
File Name: IE.au3 File Submitter: DaleHohm File Submitted: 27 Mar 2013 File Category: Libraries Title: Internet Explorer Automation UDF Library for AutoIt3 Filename: IE.au3 Description: A collection of functions for creating, attaching to, reading from and manipulating Internet Explorer Author: DaleHohm Version: T3.0-0 Last Update: 9/3/12 Requirements: AutoIt3 3.3.9 or higher This version is checked into the development stream for the next AutoIt beta release, but will work with the most recently released V3.3.9.x beta. I am releasing it here so that it can get some testing now and help some people with some of the issues it fixes in the realm of COM error handling (and "the WEND error"). This file will be removed when it is included in a public beta release. Dale1 point
-
1 point
-
Combo Boxes
Hallistorm1989 reacted to guinness for a topic
You need to include ComboConstants.au3. A quick search of the help file and you would have figured this out.1 point -
Combo Boxes
Hallistorm1989 reacted to water for a topic
Include the Constant definitions. #include <ComboConstants.au3> $ComboStat1 = GUICtrlCreateCombo("", 96, 72, 121, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_DROPDOWNLIST)) GUICtrlSetData(-1, "1|2|3|4|5", "1")1 point -
Combo Boxes
Hallistorm1989 reacted to water for a topic
Use something like:$ComboStat1 = GUICtrlCreateCombo("", 96, 72, 121, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_DROPDOWNLIST))1 point -
kctvt, If you are trying to find out whether a string exists or not then you can do this $sString = BinaryToString(InetRead("http://vnptonline.net/bb/xxxx1.txt")) ConsoleWrite($sString & @LF) if StringRegExp($sString, '<tr class="alitem"><td>3</td><td>03355</td><td>.*</td><td>This person is here now</td></tr>',0) = 1 then msgbox(0,'HIT','Person Logged On') endif kylomas edit: disregard, was editing this when you posted...1 point
-
This should work #include <Array.au3> $sString = BinaryToString(InetRead("http://vnptonline.net/bb/xxxx1.txt")) $sString = StringRegExpReplace($sString, '(?ms).*?((?:<td>.*?</td>){3}).*?(</tr>)', '\1\2') $aReturn = StringRegExp($sString, '(?s)(<td>.*?</td>)(<td>.*?</td>)(<td>.*?</td>)</tr>', 4) Local $l For $i = 0 To UBound($aReturn) - 1 $l = $aReturn[$i] _ArrayDelete($l, 0) ;Can be commented out to receive the full match. _ArrayDisplay($l, "Item " & $i + 1) Next Please try some debugging before asking for help. Regards1 point
-
#include <Array.au3> #include <IE.au3> $oIEP2 = _IECreate ("http://vnptonline.net/bb/xxxx1.txt") _IELoadWait ($oIEP2) $sString = _IEBodyReadHTML ($oIEP2) ConsoleWrite( $sString & @CR )See what you receive in the Console, its not the string you gave the forum to perform tests on1 point
-
#include <Array.au3> $sString = '<tr class="alitem"><td>1</td><td>03192</td><td>24/11/2011 09:32:12</td><td>This person is not here anymore</td></tr>' & _ '<tr class="alitem"><td>2</td><td>03224</td><td>24/11/2011 09:32:12</td><td>This person is not here anymore</td></tr>' & _ '<tr class="alitem"><td>3</td><td>[b]03355[/b]</td><td>[b]24/11/2011 09:32:12[/b]</td><td>[b]This person is here now[/b]</td></tr>' & _ '<tr class="alitem"><td>4</td><td>02234</td><td>24/11/2011 09:32:12</td><td>This person is not here anymore</td></tr>' $sString = StringRegExpReplace($sString, '(?ms).*?((?:<td>.*?</td>){3}).*?(</tr>)', '\1\2') $aReturn = StringRegExp($sString, '(?s)(<td>.*?</td>)(<td>.*?</td>)(<td>.*?</td>)</tr>', 4) Local $l For $i = 0 To UBound( $aReturn ) -1 $l = $aReturn[$i] _ArrayDelete($l, 0 ) ;Can be commented out to receive the full match. _ArrayDisplay($l, "Item " & $i + 1) NextAsk if you don't get the code Regards1 point
-
Take a look at this thread, it is very similar you your own.1 point
-
#include <Array.au3> Global $X[217]= [-108,-107,-106,-105,-104,-103,-102,-101,-100,-99,-98,-97,-96,-95,-94,-93,-92,-91,-90,-89,-88,-87,-86,-85,-84,-83,-82,-81,-80,-79,-78,-77,-76,-75,-74,-73,-72,-71,-70,-69,-68,-67,-66,-65,-64,-63,-62,-61,-60,-59,-58,-57,-56,-55,-54,-53,-52,-51,-50,-49,-48,-47,-46,-45,-44,-43,-42,-41,-40,-39,-38,-37,-36,-35,-34,-33,-32,-31,-30,-29,-28,-27,-26,-25,-24,-23,-22,-21,-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108] _ArrayDisplay($X) Can't set values into arrays like you have written Or, if you want to set only level at a time: #include <Array.au3> Global $X[217] $iStart = -108 For $i = 0 To UBound($X)-1 $X[$i]=$iStart+$i Next _ArrayDisplay($X)1 point
-
I'm a Harvard moon genius1 point
-
Thanks but I am not fishing for compliments here.I simply would like people to think about what they state and honestly am pretty pissed at the moment because some moron, that hasn't any fucking clue on what has happened, not knows anything about the real reasons of the recent happenings, share his fucking stupid conclusions here. Let me know when you all want to hear how I really feel about all of this. Jos1 point
-
Ahem. This topic is of interest to some people. Please do not derail it any further.1 point
-
I vaguely remember this. I thought it had to do with a mobile device. The thread was stupid anyway. What makes you think all devs have the power to lock threads? This is a presumption. It's also somewhat ridiculous to complain about stuff like this when people invest time and effort to create the best product they can. Mods do a good job - easing the workload, period.1 point
-
AutoCamo - 98.18b
FactquefFat reacted to Mobius for a topic
Thanks for the valuable feedback Emiel, Duh! forgot about those resource type tokens supported by AutoItWrapper. Should be fairly simple to incorporate. Incidentally you could have also put 'RC' instead of 10 Respect Vlad1 point