Leaderboard
Popular Content
Showing content with the highest reputation on 08/30/2019 in all areas
-
Monitor typing speed?
Davidowicza and one other reacted to Nine for a topic
For the fun of it : #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <StringConstants.au3> Local $hGUI = GUICreate("Typing Speed Test", 434, 369, 192, 124) Local $Label1 = GUICtrlCreateLabel("Speed : ", 240, 26, 36, 17) Local $Label2 = GUICtrlCreateLabel("0", 280, 26, 26, 17, $SS_SUNKEN) Local $Label3 = GUICtrlCreateLabel("wpm", 312, 26, 23, 17) Local $Label4 = GUICtrlCreateLabel("Test Duration", 32, 26, 68, 17) Local $Combo = GUICtrlCreateCombo("1 min.", 104, 24, 97, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "2 mins.|3 mins.|4 mins.|5 mins.") Local $Edit = GUICtrlCreateEdit("", 8, 64, 417, 241, $ES_AUTOVSCROLL) GUICtrlSetState (-1, $GUI_DISABLE) Local $Button1 = GUICtrlCreateButton("Start", 170, 320, 89, 25) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Button1 GUICtrlSetData ($Edit, "") AdlibRegister ("CheckSpeed") Local $hTimer = TimerInit() GUICtrlSetState ($Button1, $GUI_DISABLE) GUICtrlSetState ($Edit, $GUI_ENABLE) ControlFocus ($hGUI, "", $Edit) EndSwitch WEnd Func CheckSpeed () Local $sTest = StringStripWS (GUICtrlRead ($Edit),$STR_STRIPLEADING+$STR_STRIPTRAILING+$STR_STRIPSPACES) StringReplace ($sTest, " ", "|") Local $iWords = @extended GUICtrlSetData ($Label2, $iWords) Local $iTime = Int (StringLeft (GUICtrlRead ($Combo),1)) If TimerDiff ($hTimer) >= $iTime*1000*60 Then GUICtrlSetState ($Edit, $GUI_DISABLE) GUICtrlSetState ($Button1, $GUI_ENABLE) AdlibUnRegister () GUICtrlSetData ($Label2, Round($iWords/$iTime,1)) EndIf EndFunc2 points -
Version 1.6.0.1
2,270 downloads
Extensive library to control and manipulate Microsoft Task Scheduler Service. Please check this site for the implementation status! Please check the History.txt file in the archive for the changelog. Please check the WIKI for details about how to use the UDF. BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort KNOWN BUGS (last changed: 2021-02-03) None Things to come (last changed: 2021-02-03) None1 point -
I'm able to connect to another computer with the Task Scheduler GUI and the UDF, but my AD account is in an AD group that is in the local Administrators group on that server. In the example for _TS_TaskList, I changed the folder path to "\" due to "\Microsoft\Windows\Plug and Play" folder not existing on the Server 2008 R2. i was able to get task lists from the following with the UDF connecting from. Windows 7 -> Server 2008 R2 Windows 10 -> Server 2008 R2 Windows 7 -> Server 2012 R2 Windows 10 -> Server 2012 R2 Windows 7 -> Windows 7 Windows 7 -> Windows 10 Windows 10 -> Windows 7 Windows 10 -> Windows 10 Server 2008 R2 -> Server 2012 R2 Server 2012 R2 -> Server 2008 R2 Server 2008 R2 -> Server 2008 R2 Server 2012 R2 -> Server 2012 R2 Note: These are all in the AD domain. Update: I was also able to connect to a non-domain Server 2012 R2 with "." for the domain and using the local Administrator account. Adam1 point
-
Tested on win7 and win10 and it is working fine with this : _WinAPI_SetWindowPos($hWnd, $HWND_BOTTOM, 0, 0, 0, 0, BitOR($SWP_FRAMECHANGED, $SWP_NOMOVE, $SWP_NOSIZE))1 point
-
Fingerprint authorization
FrancescoDiMuro reacted to Jos for a topic
A userid/password is a "what I know" security measure, which is less of an issue, but a fingerprint scan is a "what I have" security measure and is in my view a manipulation. There is a reason why this is done, which is that only the authorised person(s) can open the program, which you would invalidate when you make this scriptable. So this is a NoNo for me unless somebody can think of any reason why this would ever be plausible. Jos1 point -
Nice, another 30% speed gained in my tests. Please comment your code (also, please don't strip comments from mine; I'd like them to remain personally if it's not an unfavourable request :)).1 point
-
Yet an extra shave off all so if there are no empty rows found it will return faster than previous examples .. Func _ArrayDelEmptyRows(ByRef $aArray, $bUBound = False, $sDelim = "'") Local $iArrayColumns = UBound($aArray, 2) If $iArrayColumns >= 1 Then Local $iCopyTo_Index = 0 For $i = 0 To UBound($aArray) - 1 For $j = 0 To $iArrayColumns - 1 If $aArray[$i][$j] <> "" Then ExitLoop If $j = $iArrayColumns - 1 Then ContinueLoop 2 Next If $i <> $iCopyTo_Index Then For $j = 0 To $iArrayColumns - 1 $aArray[$iCopyTo_Index][$j] = $aArray[$i][$j] Next EndIf $iCopyTo_Index += 1 Next If UBound($aArray) > $iCopyTo_Index Then ReDim $aArray[$iCopyTo_Index][$iArrayColumns] If $bUBound Then _ArrayInsert($aArray, 0, UBound($aArray)) Return ($aArray) Else Local $pattern = $sDelim & "[" & $sDelim & "]*[" & $sDelim & "]" $str = StringRegExpReplace($sDelim & _ArrayToString($aArray, $sDelim), $pattern, $sDelim) $sString = StringRegExpReplace($str, $sDelim & "$", "") Return StringSplit(StringTrimLeft($sString, 1), $sDelim, $bUBound ? "" : 3) EndIf EndFunc1 point
-
Doubtful... but I guess anything is possible. Is this an internally developed site? If so, check with the devs.1 point
-
Creating a "brushed up" Task Scheduler UDF?
argumentum reacted to water for a topic
I posted the first ALPHA for you to play with in the download section. Have fun!1 point -
Send Email - Very Simple
antonioj84 reacted to xcaliber13 for a topic
I found this script awhile back on this forum. This works great for me. Simple to use and understand. I use it in 100's of scripts. ;Send Email ; Variables ;################################## $SmtpServer = "" ; address for the smtp-server to use - REQUIRED $FromName = "" ; name from who the email was sent $FromAddress = "" ; address from where the mail should come $ToAddress = "" ; destination address of the email - REQUIRED $Subject = "" ; subject from the email - can be anything you want it to be $Body = "" ; the messagebody from the mail - can be left blank but then you get a blank mail $AttachFiles = "" ; the file(s) you want to attach seperated with a ; (Semicolon) - leave blank if not needed $CcAddress = "" ; address for cc - leave blank if not needed $BccAddress = "" ; address for bcc - leave blank if not needed $Importance = "Normal" ; Send message priority: "High", "Normal", "Low" $Username = "" ; username for the account used from where the mail gets sent - REQUIRED $Password = "" ; password for the account used from where the mail gets sent - REQUIRED $IPPort = 0 ; port used for sending the mail $ssl = 0 ; enables/disables secure socket layer sending - put to 1 if using httpS ;~ $IPPort=465 ; GMAIL port used for sending the mail ;~ $ssl=1 ; GMAILenables/disables secure socket layer sending - put to 1 if using httpS ;################################## ; Script ;################################## Global $oMyRet[2] Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") $rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl) If @error Then MsgBox(0, "Error sending message", "Error code:" & @error & " Description:" & $rc) EndIf ; The UDF Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance="Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0) Local $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' $objEmail.To = $s_ToAddress Local $i_Error = 0 Local $i_Error_desciption = "" If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress $objEmail.Subject = $s_Subject If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF EndIf If $s_AttachFiles <> "" Then Local $S_Files2Attach = StringSplit($s_AttachFiles, ";") For $x = 1 To $S_Files2Attach[0] $S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x]) ;~ ConsoleWrite('@@ Debug : $S_Files2Attach[$x] = ' & $S_Files2Attach[$x] & @LF & '>Error code: ' & @error & @LF) ;### Debug Console If FileExists($S_Files2Attach[$x]) Then ConsoleWrite('+> File attachment added: ' & $S_Files2Attach[$x] & @LF) $objEmail.AddAttachment($S_Files2Attach[$x]) Else ConsoleWrite('!> File not found to attach: ' & $S_Files2Attach[$x] & @LF) SetError(1) Return 0 EndIf Next EndIf $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer If Number($IPPort) = 0 then $IPPort = 25 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort ;Authenticated SMTP If $s_Username <> "" Then $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password EndIf If $ssl Then $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True EndIf ;Update settings $objEmail.Configuration.Fields.Update ; Set Email Importance Switch $s_Importance Case "High" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "High" Case "Normal" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Normal" Case "Low" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Low" EndSwitch $objEmail.Fields.Update ; Sent the Message $objEmail.Send If @error Then SetError(2) Return $oMyRet[1] EndIf $objEmail="" EndFunc ;==>_INetSmtpMailCom ;; Com Error Handler Func MyErrFunc() $HexNumber = Hex($oMyError.number, 8) $oMyRet[0] = $HexNumber $oMyRet[1] = StringStripWS($oMyError.description, 3) ConsoleWrite("### COM Error ! Number: " & $HexNumber & " ScriptLine: " & $oMyError.scriptline & " Description:" & $oMyRet[1] & @LF) SetError(1); something to check for when this function returns Return EndFunc ;==>MyErrFunc1 point -
Agreed. The environment in which I work pretty much classifies any AutoIT script I write as a virus and quarantines it immediately, forcing me to use powershell. Initially I thought I was just stupid (and/or lazy for disregarding the trial/error approach) for having difficulty in determining the autoit function that each powershell function was related to , but seeing as I am not the first to request that information be included with the module, I feel less stupid. Please do include at least the autoit function that corresponds to the given powershell function in the autoit powershell module. That would be greeeaaaattttt.1 point
-
Using the AutoIt PowerShell Cmdlets
satocha reacted to PrakashVel for a topic
Could we have examples for each commandlets in autoitx. Example : get-help autoit-commandlet -full If that provides examples it would really help to incorporate faster.could not find any other resources in internet also.1 point -
HTML5 svg and _IECreateEmbedded
HamidZaeri reacted to trancexx for a topic
The X-UA-Compatible meta tag should do the trick. Try it.1 point -
I've made this so far: #include <GUIConstants.au3> #include <GuiListView.au3> #include <Misc.au3> $dll = DllOpen("user32.dll") $Form1 = GUICreate("Form1", 633, 447, 193, 125) $listt = GUICtrlCreateListView("", 72, 32, 441, 305) _GUICtrlListView_AddColumn($listt, "Item(s)", 120) _GUICtrlListView_AddItem($listt, "Something1") _GUICtrlListView_AddItem($listt, "Something2") _GUICtrlListView_AddItem($listt, "Something3") _GUICtrlListView_AddItem($listt, "Something4") _GUICtrlListView_AddItem($listt, "Something5") GUISetState(@SW_SHOW) While 1 if StringInStr(ControlGetFocus($Form1), "SysListView32") then If _IsPressed("01", $dll) Then Do Until NOT _IsPressed("01", $dll) $readings = GUICtrlRead($listt, 1) for $i = 0 to _GUICtrlListView_GetItemCount($listt) if _GUICtrlListView_GetItemSelected($listt, $i) = true Then $display = _GUICtrlListView_GetItemText($listt, $i) ExitLoop EndIf Next MsgBox(0, "", $display) EndIf EndIf $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE DllClose($dll) Exit case $listt MsgBox(0, "ok", "list") EndSwitch WEnd it can set listitem as a case, but only as double click, I can't figure how to set it as 1 click = case can anyone help?1 point
-
Nice, but what is the question/issue? Jos0 points