Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/04/2015 in all areas

  1. mesale0077 asked me whether I could code some CSS loading animations from different web sites. These are the results using GDI+ (AutoIt v3.3.12.0+ required!): _GDIPlus_MonochromaticBlinker.au3 / _GDIPlus_RotatingBokeh.au3 _GDIPlus_SpinningCandy.au3 / _GDIPlus_SteamPunkLoading.au3 _GDIPlus_IncreasingBalls.au3 / _GDIPlus_PacmanProgressbar.au3 _GDIPlus_StripProgressbar.au3 / _GDIPlus_RingProgressbar.au3 _GDIPlus_LineProgressbar.au3 / _GDIPlus_SimpleLoadingAnim.au3 _GDIPlus_TextFillingWithWater.au3 / _GDIPlus_MultiColorLoader.au3 _GDIPlus_LoadingSpinner.au3 / _GDIPlus_SpinningAndPulsing.au3 _GDIPlus_TogglingSphere.au3 / _GDIPlus_CloudySpiral.au3 _GDIPlus_GlowingText.au3 (thanks to Eukalyptus) / _GDIPlus_HypnoticLoader.au3 _GDIPlus_RotatingRectangles.au3 / _GDIPlus_TRONSpinner.au3 _GDIPlus_RotatingBars.au3 / _GDIPlus_AnotherText.au3 (thanks to Eukalyptus) _GDIPlus_CogWheels.au3 (thanks to Eukalyptus) / _GDIPlus_DrawingText.au3 (thanks to Eukalyptus) _GDIPlus_GearsAnim.au3 / _GDIPlus_LEDAnim.au3 _GDIPlus_LoadingTextAnim.au3 / _GDIPlus_MovingRectangles.au3 _GDIPlus_SpinningAndGlowing.au3 (thanks to Eukalyptus) / _GDIPlus_YetAnotherLoadingAnim.au3 _GDIPlus_AnimatedTypeLoader.au3 / _GDIPlus_Carousel.au3 Each animation function has a built-in example how it can be used. AiO download: GDI+ Animated Wait Loading Screens.7z (previous downloads: 1757) Big thanks to Eukalyptus for providing several examples. Maybe useful for some of you Br, UEZ PS: I don't understand CSS - everything is made out of my mind, so it might be different from original CSS examples
    1 point
  2. jchd

    Regexp Warlocks

    So let's try dancing: Local $aIPs = [ _ "10.0.0.0", "10.1.2.3", "10.255.255.255", _ "172.16.0.0", "172.25.1.2.3", "172.31.255.255", _ "192.168.0.0", "192.168.1.2", "192.168.255.255", _ "12.34.56.78", "123.456.789.0", "192.168.0.555" _ ] For $MyIP In $aIPs ConsoleWrite($MyIP & " is a" & (_Valid_LAN_IP($MyIP) ? " " : "n in") & "valid LAN IP address" & @LF) Next Func _Valid_LAN_IP($ip) Return StringRegExp($ip, _ "(?x) (?(DEFINE) (?<byte> 2[0-4]\d | 25[0-5] | 1\d\d | [1-9]?\d) )" & _ " ^ (" & _ " 10 (\.(?&byte)){3} | " & _ " 172 \. ( 1 [6-9] | 2\d | 3[01] ) (\.(?&byte)){2} | " & _ " 192 \. 168 (\.(?&byte)){2} | " & _ ") $") EndFunc
    1 point
  3. BrewManNH

    Regexp Warlocks

    RegEx is terrible for valid IP addresses. Try this one, totally non-regex, modify as you need to. It just looks at the IP address you send to it and check to make sure it's valid. You can do further checks on the returned information to verify that it's within the ranges you need it to be.
    1 point
  4. ;Something like?: HotKeySet("{F1}") Calling without any function you "unset" the hotkey
    1 point
  5. Put in an error handler: $oErrorHandler = ObjEvent("AutoIt.Error", "Var_ErrFunc") Func Var_ErrFunc($oError) ; Com error handling ; Do anything here. ConsoleWrite("err.number is: " & @TAB & $oError.number & @CRLF & _ "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ "err.description is: " & @TAB & $oError.description & @CRLF & _ "err.source is: " & @TAB & $oError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ "err.retcode is: " & @TAB & $oError.retcode & @CRLF & @CRLF) EndFunc ;==>Var_ErrFunc
    1 point
  6. Vlookup in excel is probably more effective as your data seems to be in excel. And excel also has data query toolbar where you can join your ranges.
    1 point
  7. From AutoIt Help file > PixelSearch function > the shade-variation parameter > Reads "[optional] A number between 0 and 255 to indicate the allowed number of shades of variation of the red, green, and blue components of the color. Default is 0 (exact match)." And, experimenting with test examples like this one. #include <GUIConstantsEx.au3> #include <GDIPlus.au3> If FileExists('ColorVariation.png') = 0 Then _ColorVariationPNGCreator() ; Open "ColorVariation.png" with Windows Photo Viewer Run(@ComSpec & ' /c %SystemRoot%\System32\rundll32.exe "%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen ' & _ @ScriptDir & '\ColorVariation.png', _ @ScriptDir, @SW_HIDE, 2 + 4) ; Opt("WinTitleMatchMode", -2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase $hWin = WinWait('ColorVariation.png') ; Searching left to right, and top to bottom should find 0xD60000 first. $aAr = PixelSearch(0, 0, 400, 300, 0xD70100, 0x01, 1, $hWin) ConsoleWrite($aAr[0] & " x " & $aAr[1] & " ") ConsoleWrite(Hex(PixelGetColor($aAr[0], $aAr[1], $hWin), 6) & @LF) MouseMove($aAr[0], $aAr[1]) Sleep(1000) ; Searching right to left, and bottom to top should find 0xD80000 first. $aAr = PixelSearch(400, 300, 0, 0, 0xD70100, 1, 1, $hWin) ConsoleWrite($aAr[0] & " x " & $aAr[1] & " ") ConsoleWrite(Hex(PixelGetColor($aAr[0], $aAr[1], $hWin), 6) & @LF) MouseMove($aAr[0], $aAr[1]) Func _ColorVariationPNGCreator() Local $hGUI, $hGraphics, $hGraphic, $hBitmap, $hBrush, $hFormat, $hFamily, $hFont, $tLayout ; Create GUI $hGUI = GUICreate("GDI+", 400, 300) GUISetState() ; Draw a string _GDIPlus_Startup() $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsClear($hGraphics, 0x00000000) $hBitmap = _GDIPlus_BitmapCreateFromGraphics(400, 300, $hGraphics) $hGraphic = _GDIPlus_ImageGetGraphicsContext($hBitmap) $hFormat = _GDIPlus_StringFormatCreate() $hFamily = _GDIPlus_FontFamilyCreate("Arial") $hFont = _GDIPlus_FontCreate($hFamily, 12, 1) For $h = 0 To 3 For $i = 0 To 15 $tLayout = _GDIPlus_RectFCreate(10 + ($h * 100), 10 + ($i * 15), 100, 15) $hBrush = _GDIPlus_BrushCreateSolid(Number("0xFF" & Hex(12 + $h, 1) & Hex($i, 1) & "0000")) _GDIPlus_GraphicsDrawStringEx($hGraphic, "0x" & Hex(12 + $h, 1) & Hex($i, 1) & "0000", $hFont, $tLayout, $hFormat, $hBrush) Next Next $tLayout = _GDIPlus_RectFCreate(60, 265, 300, 15) $hBrush = _GDIPlus_BrushCreateSolid(0xFF0000FF) _GDIPlus_GraphicsDrawStringEx($hGraphic, "Hex Colour Format: 0xRRGGBB", $hFont, $tLayout, $hFormat, $hBrush) _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, 400, 300) _GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmap, 0, 0, 400, 300) _GDIPlus_ImageSaveToFile($hBitmap, "ColorVariation.png") ; Clean up resources _GDIPlus_FontDispose($hFont) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_BrushDispose($hBrush) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() EndFunc ;==>_ColorVariationPNGCreator From here. is a handy tooltip utility that shows the current client coordinates with the current pixel colour. Best used when compiled, to avoid conflict with running scripts from SciTE. And from here, I use Siao's magnifier and info tool complied. You'll need to comment out, or delete, about six Global Const declarations in the script because those Global Const have been added to the include file. Using Siao's magnifier, the random pixel colours at the border of all the text is visible.
    1 point
  8. Learning To Script with AutoIt V3 Document was last updated 17 February 2010 This document is for you if you are interested in learning to script with AutoIt. Where possible, I will try to assume that you have no prior coding experience and I aim to teach you some good general coding habits, which will be beneficial should you decide to move on to other languages. Download here Learning to Script with AutoIt V3 (Last Updated 17 Feb 2010).zip(Previous Versions = 10152) The download contains the tutorial, example AU3 files contained in the text, printable exercise question/answer sheet and more. If you encounter any issues, with the text, please post them, but this is not a thread for requsting help or requesting scripts. Please do not PM me either. We have this wonderful support forum, so use it! Original Document: Alex Peters (LxP) http://yallara.cs.rmit.edu.au/~apeters/ Updated By: Brett Francis (BrettF) http://signa5.com
    1 point
×
×
  • Create New...