Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/27/2018 in all areas

  1. TV-Show-Manager is a small, easy to use application that manages all your favorite tv shows. It is a perfect program for you, if you like watching many tv-shows and need help with keeping track of the airdates and times. Features Manage all your favorite TV-Shows with a single program See all airing times of your shows and how many days/hours/minutes you have to wait for the next episode Don't get confused with all the time zones, TV-Show-Manager converts the airing times to your timezone TV-Schedule - See what shows will be airing in the next 48 hours in US an UK Windows 10 inspired user interface - Customize the user interface with different themes See if your favorit tv shows are canceled or renewed with colored status in your list. Download episodes with one click! (Warning: See notes in full description) Supports link collection for one-click hosters and torrents. (Warning: See notes in full description) Stream episodes with one click (Warning: See notes in full description) I have completely rewritten the program over the past months. It uses the latest version of my MetroGUI UDF and demonstrates what you can do with Autoit if you put in enough time You can download the script and the main program from sourceforge. I have removed all download link collection and other anti-bot-protection bypass features from the script that might be used to damage the site owners. So please don't ask for any of these functions on this forum. Images: Download Script and Main program: https://sourceforge.net/projects/tvshowcountdown/files/
    1 point
  2. @PramodR Depending on how much administrative control you have over your users' environment, you can suppress the UAC prompt for users that are local admins of their workstation by either using group policy or by modifying the registry. The following link should give you all of the information that you need to make the modifications. In your case, if the users are truly local admins, you want to direct your attention to the "ConsentPromptBehaviorAdmin" registry key or "User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode" group policy. If this is configured correctly, then local admins will not be prompted when you add the #RequireAdmin directive to your scripts. User Account Control Group Policy and registry key settings A very helpful UDF lib for getting and setting UAC-related registry settings is UAC.au3 submitted by @AdamUL
    1 point
  3. Sorry just reread your post and see you had already tried #RequireAdmin, if you are going to launch Cmd as elevated you will always see the UAC prompt, for example, I'm an administrator on my machine, however if I run cmd.exe it will always start in user mode, I still require Run As Administrator which then show UAC. The only way around this would be switch UAC off.
    1 point
  4. You do it this way: #RequireAdmin #include <File.au3> #include <Array.au3> #include <IE.au3> #include <GuiTreeView.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ;variables Global $GUI Global $TreeParent[3] Global $TreeChild[6], $iChilds = 0 Global $aStyle = BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS) ;Create GUI Form $GUI = GUICreate("TreeView", 300, 428) GUISetState(@SW_SHOW, $GUI) ;Create TreeView Local $TreeObject = GUICtrlCreateTreeView(0, 0, 300, 428,$aStyle, $WS_EX_CLIENTEDGE) ;Get SubFolders and Add Child to Tree View Item Local $iStart = GUICtrlCreateDummy() for $a = 1 to UBound($TreeParent) - 1 $TreeParent[$a] = GUICtrlCreateTreeViewItem("Parent " & $a,$TreeObject) for $b = 0 to UBound($TreeChild) / 2 - 1 $TreeChild[$iChilds] = GUICtrlCreateTreeViewItem("Child " & $iChilds ,$TreeParent[$a]) $iChilds += 1 Next Next Local $iEnd = GUICtrlCreateDummy() ;Repeat Show GUI While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $iStart + 1 To $iEnd - 1 For $c = 0 to $iChilds - 1 If $iMsg = $TreeChild[$c] Then MsgBox(0,"", GUICtrlRead($iMsg, 1)) ExitLoop EndIf next Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete($GUI)
    1 point
  5. You can start with this: #include <GDIPlus.au3> #include <GUIConstantsEx.au3> AutoItSetOption("MouseCoordMode", 2) AutoItSetOption("GUIOnEventMode", 1) Global Const $iW = 400, $iH = 400, $iBgColor = 0xF0F0F0 Global Const $hGUI = GUICreate("", $iW, $iH) GUISetBkColor($iBgColor, $hGUI) GUISetState() _GDIPlus_Startup() Global Const $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) Global Const $hPen1 = _GDIPlus_PenCreate(0xFF0000FF) ; blå Global Const $hPen2 = _GDIPlus_PenCreate(0xFFFF0000) Global Const $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH) Global Const $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsSetSmoothingMode($hCtxt, 5) _GDIPlus_GraphicsSetPixelOffsetMode($hCtxt, 4) Global Const $iPosX = 50, $iPosY = 50, $iWidth = 300, $iHeight = 300 Global Const $fDeg = ACos(-1) / 180, $fRad = 180 / ACos(-1), $iWh = $iW / 2, $iHh = $iH / 2 Global $fDiameter = 30, $fRadius = $fDiameter / 2, _ ; circles $mpos, $mwx, $mwy, $pd GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") Do _GDIPlus_GraphicsClear($hCtxt, 0xFF000000 + $iBgColor) _GDIPlus_GraphicsDrawRect($hCtxt, $iPosX, $iPosY, $iWidth, $iHeight, $hPen1) $iWidthh = @DesktopWidth $iHeighth = @DesktopHeight ; circle1 _GDIPlus_GraphicsDrawEllipse($hCtxt , $iWh - $fRadius, $iHh - $fRadius, $fDiameter , $fDiameter , $hPen1) _GDIPlus_GraphicsDrawEllipse($hCtxt , $iWh , $iHh , 1 , 1 , $hPen1) ; circle2 $mpos = MouseGetPos() ;get the mouse position $mwx = $mpos[0] - $iWh ;get the x coordinate $mwy = $iHh - $mpos[1] ;get the y coordinate $pd = Sqrt($iWh * $iHh + $mpos[0] * $mpos[1]) ;calculate the distance between mouse position and center $fAngle = 2 * -ATan($mwy / ($mwx + Sqrt($mwx * $mwx + $mwy * $mwy))) * $fRad ; calculate the angle between center and mouse position -> trigonometry ;-) $fDistance = $fDiameter ;calculate the distance between both circles so that they always touch each other ;calculate x/y position of 2nd circle with a little adjustment $x = $iWh - $fRadius + Cos($fAngle * $fDeg) * ($fDistance + 1) $y = $iHh - $fRadius + Sin($fAngle * $fDeg) * ($fDistance + 1) $hPos = MouseGetPos() $iWidthh = $iWh $iHeighth = $iHh $iMPosX = $hPos[0] < $iPosX ? $iPosX : $hPos[0] > $iPosX + $iWidthh ? $iPosX + $iWidthh : $hPos[0] $iMPosY = $hPos[1] < $iPosY ? $iPosY : $hPos[1] > $iPosY + $iHeighth ? $iPosY + $iHeighth : $hPos[1] $x = $iWh + Cos($fAngle * $fDeg) * ($fDistance + 1) $y = $iHh + Sin($fAngle * $fDeg) * ($fDistance + 1) _GDIPlus_GraphicsDrawEllipse($hCtxt , $x, $y, 1, 1, $hPen2) ;center of circle 2 _GDIPlus_GraphicsDrawEllipse($hCtxt , $x - $fRadius , $y - $fRadius , $fDiameter , $fDiameter , $hPen2) ;circle 2 ;_GDIPlus_GraphicsDrawline($hCtxt , $x, $y, 200 , 200 , $hPen2) $m = ( 200 - $y ) / ( 200 - $x ) ; slope $fSqrt = 4 * Sqrt( $fDiameter ) If $x < 200 - $fSqrt Then ; Right line section $x1 = $x $y1 = $m * $x1 - $m * 200 + 200 $x2 = 350 $y2 = $m * $x2 - $m * 200 + 200 _GDIPlus_GraphicsDrawline($hCtxt, $x1, $y1, $x2, $y2, $hPen2) _GDIPlus_GraphicsDrawline($hCtxt, $x2, $y2, $x1, $y2 + $y2 - $y1, $hPen2) ElseIf $x >= 200 - $fSqrt And $x <= 200 + $fSqrt Then If $y < 200 Then ; Bottom line section $y1 = $y $x1 = ( $y1 - 200 ) / $m + 200 $y2 = 350 $x2 = ( $y2 - 200 ) / $m + 200 _GDIPlus_GraphicsDrawline($hCtxt, $x1, $y1, $x2, $y2, $hPen2) _GDIPlus_GraphicsDrawline($hCtxt, $x2, $y2, $x2 + $x2 - $x1, $y1, $hPen2) Else ; Top line section $y1 = $y $x1 = ( $y1 - 200 ) / $m + 200 $y2 = 50 $x2 = ( $y2 - 200 ) / $m + 200 _GDIPlus_GraphicsDrawline($hCtxt, $x1, $y1, $x2, $y2, $hPen2) _GDIPlus_GraphicsDrawline($hCtxt, $x2, $y2, $x2 + $x2 - $x1, $y1, $hPen2) EndIf Else ; $x > 200 + $fSqrt ; Left line section $x1 = $x $y1 = $m * $x1 - $m * 200 + 200 $x2 = 50 $y2 = $m * $x2 - $m * 200 + 200 _GDIPlus_GraphicsDrawline($hCtxt, $x1, $y1, $x2, $y2, $hPen2) _GDIPlus_GraphicsDrawline($hCtxt, $x2, $y2, $x1, $y2 + $y2 - $y1, $hPen2) EndIf _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $iW, $iH) Until Not Sleep(10) Func _Exit() _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_GraphicsDispose($hCtxt) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_PenDispose($hPen1) _GDIPlus_PenDispose($hPen2) _GDIPlus_Shutdown() GUIDelete() Exit EndFunc
    1 point
  6. #include <GuiSlider.au3> #include <SendMessage.au3> #include <WindowsConstants.au3> $iPercent = 30 ; volume % (0-100) $hWnd = WinGetHandle("SoundWire Server") $hCtrl = ControlGetHandle($hWnd, "", "msctls_trackbar324") _GUICtrlSlider_SetPos($hCtrl, (100 - $iPercent) * 655.35) _SendMessage($hWnd, $WM_VSCROLL, 0, $hCtrl)
    1 point
  7. funkey

    AutoIt Snippets

    My version of getting the actual NTP timestamp if someone needs it. #include <Date.au3> TCPStartup() Global $NtpServer1 = "time.google.com" Global $NtpServer1_IP = TCPNameToIP($NtpServer1) Global $sTime = _NTP_GetTimestamp($NtpServer1_IP) ConsoleWrite("Actual UTC time: " & $sTime & @CRLF) Func _NTP_GetTimestamp($IP, $maxReadTries = 2) ;funkey 2018.05.08 Local Const $tagNtpPacket = "BYTE li_vn_mode;BYTE stratum;BYTE poll; BYTE precision;DWORD rootDelay;DWORD rootDispersion;DWORD refId;DWORD refTm_s;DWORD refTm_f;DWORD origTm_s;DWORD origTm_f;DWORD rxTm_s;DWORD rxTm_f;DWORD txTm_s;DWORD txTm_f" Local Const $tagNtpPacket_Help = "byte NtpPacket[48]" Local $NtpPacket = DllStructCreate($tagNtpPacket) Local $NtpPacket_Help = DllStructCreate($tagNtpPacket_Help, DllStructGetPtr($NtpPacket)) Local $sec, $frac, $sTimeStamp DllStructSetData($NtpPacket, "li_vn_mode", 0x1b) UDPStartup() Local $aSock = UDPOpen($IP, 123) UDPSend($aSock, DllStructGetData($NtpPacket_Help, "NtpPacket")) While $maxReadTries > 0 Local $data = UDPRecv($aSock, 48) If $data <> "" Then DllStructSetData($NtpPacket_Help, "NtpPacket", $data) $sec = _ntohl(DllStructGetData($NtpPacket, "txTm_s")) $frac = _ntohl(DllStructGetData($NtpPacket, "txTm_f")) $sTimeStamp = _DateAdd('s', $sec, "1900/01/01 00:00:00") & "," & StringFormat("%06s", Round($frac * 1000000 / 2 ^ 32)) ExitLoop Else Sleep(10) $maxReadTries -= 1 EndIf WEnd UDPCloseSocket($aSock) UDPShutdown() Return $sTimeStamp EndFunc ;==>_NTP_GetTimestamp Func _ntohl($iNetLong) Local $aRet = DllCall("ws2_32.dll", "ULONG", "ntohl", "ULONG", $iNetLong) Return $aRet[0] EndFunc ;==>_ntohl
    1 point
  8. AutoIt has a built in application that allows the user to find x and y coordinates. See picture below. Another option is to use this script that displays the coordinates of where the cursor is click on the computer. #include <Misc.au3> HotKeySet("{END}", "_Quit") ; Hit "END" to quit $dll = DllOpen("user32.dll") While 1 If _IsPressed("01", $dll) Then $avMousePos = MouseGetPos() ToolTip("x = " & $avMousePos[0] & " y = " & $avMousePos[1]) EndIf WEnd Func _Quit() DllClose($dll) Exit EndFunc ;==>_Quit And if you want to move the mouse to a certain location and then reset the cursor back in the original position then you can use this piece of code. Sleep(3000) $pos=MouseGetPos() MouseClick("left",200,200,1,0) MouseMove($pos[0],$pos[1],0) Feel free to browse the forums!
    1 point
  9. jmon

    AutoIt Snippets

    _stringExtractPaths : returns the paths from a string as an array: #include <Array.au3> ;used for _ArrayDisplay only $sText = "Hello Autoit programmers! C:\Folder\Folder\File.ini " $sText &= "this is a function that extracts paths from a string=C:\Windows\System32\shell32.dll " $sText &= "\\192.168.0.1 \\192.168.0.151\Folder\file.ini \\192.168.0.126\Folder " $sText &= "c:/folder/file.ini c:\folder\file.ini X:\Temp\Jo\autoit.txt! some text " $sText &= "my site:http://www.jmontserrat.com googlehttps://www.google.co.jp some ftp link ftp://www.mysite.com/index ftps://www.mysite.com/index twitter;www.twitter.com " $sText &= "rtp://www.mysite.com/index mms://www.mysite.com/index.php rtsp://www.mysite.com/index.php " $sText &= "check this link:'http://www.autoitscript.com/forum/index.php?showtopic=9296&hl=' link http://www.autoitscript.com/forum/topic/51547-scilexer-udf/page__st__80#entry1024458 " $sText &= "\\Computer12 \\computer\folder \\vfx_node02\testfolder\file.ini //vfx_node02/testfolder/file.ini" $aPaths = _StringExtractPath($sText) _ArrayDisplay($aPaths) ; #FUNCTION# ==================================================================================================================== ; Name ..........: _StringExtractPath ; Description ...: Extracts the paths from a text and return an array of paths. ; Syntax ........: _StringExtractPath($sText) ; Parameters ....: $sText - The String to extract the paths from. ; Return values .: 1D Array of paths. Array[0] contains the number of paths found. ; Author ........: Jmon ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: Yes ; =============================================================================================================================== Func _StringExtractPath($sText) Local $aRet[1] = [0], $a $a = StringRegExp($sText, '(?i)((?:(?:https?|rtp|mms|rtsp|file|ftps?)\:)?[\\|\/]{2}[\w-_]*[\w\\\/?&=.~;\-+!*_#%]*)|([a-z]:[\\\/][\w\.-_\\\/]*)|(w{3}\.[\w\\\/?&=.~;\-+!*_#%]*)', 3) If @error = 0 Then For $i = 0 To UBound($a) - 1 If $a[$i] <> "" Then $aRet[0] += 1 ReDim $aRet[$aRet[0] + 1] $aRet[$aRet[0]] = $a[$i] EndIf Next EndIf Return $aRet EndFunc ;==>_StringExtractPath I had a hard time finding a regexp to find them all! [EDIT] Sorry, it seems that the forum formatting messed up my post. I'll try to fix it. For the moment the example doesn't work... [EDIT2] ok now it works. [EDIT3] added other streaming protocols in the regexp. Thanks cyberbit [EDIT4]Fixed again the same problem as edit1
    1 point
  10. You just taught me that "for all intensive purposes" wasn't a phrase; and for that, I thank you.
    1 point
×
×
  • Create New...