syberschmo Posted September 17, 2006 Share Posted September 17, 2006 (edited) HiI saw some gradient-related posts recently and I though I should share my little contribution. It's poorly coded but will work.;=============================================================================== ; ; Description: Functions to create/update gradient-filled, colored progress ; bar. ; ; Syntax: ; _GProgressOn($sTitle, $hxStartColor, $hxEndColor, ; $sMainText = "Progress Bar", $sSubText = "", ; $iXpos = "", $iYpos = "", $iOntop = 0) ; ; _GProgressSet($iProgress, $sMainText = "", $sSubText = "") ; ; _GProgressOff() ; ; _GUICtrlCreateGProgress($hxStartColor, $hxEndColor, $iXpos, ; $iYpos, $iWidth, $iHeight) ; ; _GuiCtrlSetGProgress($gBar, $sWindowTitle, $iProgress) ;===============================================================================oÝ÷ ØÃE8H4"ÔAH,A1jjezÆ®¶sb6æ6ÇVFRgV÷C¶w&Eö&'2æS2gV÷C° ¢7&VvöâUÕÄU0 £´UÕÄR¢w&FVçB&öw&W74öâW×ÆP¥ôu&öw&W74öâgV÷Cµôu&öw&W74öâW×ÆRgV÷C²ÂsdTSÂ3dTRÂgV÷C´ÖâFWBgV÷C²ÂgV÷Cµ7V%FWBgV÷C²¤f÷"b33c·ÒFò7FW ôu&öw&W756WBb33c·ÂgV÷C´ÖâFWBWW&RgV÷C²ÂgV÷Cµ7V"FWBF÷vâW&S¢gV÷C²fײb33c·fײgV÷C²RgV÷C² 6ÆVWsR¤æW@¤×6t&÷CÂgV÷C´FöæRb333²gV÷C²ÂgV÷C´FöæRb333²gV÷C²¥ôu&öw&W74öfb £´UÕÄR#¢w&FVçBuT7G&Ä7&VFU&öw&W72W×ÆP¢b33c·5væF÷uFFÆRÒgV÷CµôwV7G&Ä7&VFTu&öw&W72W×ÆRgV÷C°¢b33c¶f÷&ÓÒuT7&VFRb33c·5væF÷uFFÆRÂ##ÂsR¢b33c¶v&"ÒôuT7G&Ä7&VFTu&öw&W72sdTSÂ3dTRÂÂÂ#ÂC¤uT6WE7FFR ¤f÷"b33c·ÒFò ôwV7G&Å6WDu&öw&W72b33c¶v&"Âb33c·5væF÷uFFÆRÂb33c· 6ÆVWsR¤æW@¤×6t&÷CÂgV÷C´FöæRb333²gV÷C²ÂgV÷C´FöæRb333²gV÷C² ¢6VæG&Vvöà_GProgressOn:_GuiCtrlCreateGProgress:Note: Use only one bar at a time.Thanks to cyberslug for the gradient code from an old post.UPDATE: Changed variable declarations. Thanks RazerM.Also, I forgot to mention that the bars DO NOT FLICKER as they update! Try it out.grad_bars.au3 Edited September 17, 2006 by syberschmo Gradient-Filled Progress Bars UDF Link to comment Share on other sites More sharing options...
Pakku Posted September 17, 2006 Share Posted September 17, 2006 this is in one word: GREAT keep it up! Arjan How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me Link to comment Share on other sites More sharing options...
RazerM Posted September 17, 2006 Share Posted September 17, 2006 (edited) This is fantastic syberschmo. One tip: put the global variables expandcollapse popup;VARIABLE DECLARATIONS Global $lbl_grad_cover Global $lbl_grad_main Global $lbl_grad_sub Global $gprog_formoÝ÷ Ú²'^¶ºw-첺Ú"µÍÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÂÈØÜ[Û[Ý[ÛÈÈÜX]KÝ]HÜYY[Y[YÛÛÜYÙÜÜÂÈÂÈÞ[^ÑÔÙÜÜÓÛ ÌÍÜÕ]K ÌÍÚÝÛÛÜ ÌÍÚ[ÛÛÜÈ ÌÍÜÓXZ[^H ][ÝÔÙÜÜÈ][ÝË ÌÍÜÔÝX^H ][ÝÉ][ÝËÈ ÌÍÚVÜÈH ][ÝÉ][ÝË ÌÍÚVÜÈH ][ÝÉ][ÝË ÌÍÚSÛÜH BÂÈÑÔÙÜÜÔÙ] ÌÍÚTÙÜÜË ÌÍÜÓXZ[^H ][ÝÉ][ÝË ÌÍÜÔÝX^H ][ÝÉ][ÝÊBÂÈÑÔÙÜÜÓÙ BÂÈÑÕRPÝÜX]QÔÙÜÜÊ ÌÍÚÝÛÛÜ ÌÍÚ[ÛÛÜ ÌÍÚVÜËÈ ÌÍÚVÜË ÌÍÚUÚY ÌÍÚRZYÚ BÂÈÑÝZPÝÙ]ÔÙÜÜÊ ÌÍÙÐ ÌÍÜÕÚ[ÝÕ]K ÌÍÚTÙÜÜÊBÂÂÈØYÙJÊNHÝÜÝÙ[Ý[ÛÈXÝZÙHÙÜÜÓÛ KÈÙÜÜÔÙ] H[ÙÜÜÓÙ K[Z]Ú]Y[È[Y]ÈÜÛÛÜËHÙXÛÛÜÝÙ[Ý[ÛÈXÝÈZÙHHÝZPÝÜX]TÙÜÜÊ H[ÝZPÝÙ]]J BÈ[Ý[ÛËYØZ[Ú]Y[[Y]ËÙYH^[ËÂÈSTÔSÕNÛH]H[YKXÙKÂÈ[Y]ÊN[Y]ÈHÙ[Y^[]ÜKXY[Ý[Û[ØÜÎÜÈÝ[Y[ËÈ[Y]ÝÎÛÛÜÈ]ÝHÜÙYZÙHÚ]Ý]È][ÝË[ÛË ÌÍÚTÙÜÜÈÛHXØÙÈ[XÈ]ÙY[LLÂÈ]Z[Y[ ÊN]]Ò]ÂÈ]]ÜÊNX]]È ÜÞXØÚ[ÈÛÜ[ÉÝÂÂÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÒSÓQTÂÚ[ÛYH ÑÕRPÛÛÝ[Ë]LÉÝÂÚ[ÛYH ØÛÛÜ]LÉÝÂÚ[ÛYH Ø^K]LÉÝÂÕTPPHPÓTUSÓÂÛØ[ ÌÍÛÙÜYØÛÝÛØ[ ÌÍÛÙÜYÛXZ[ÛØ[ ÌÍÛÙÜYÜÝXÛØ[ ÌÍÙÜÙ×ÙÜB[ÈÑÔÙÜÜÓÛ ÌÍÜÕ]K ÌÍÚÝÛÛÜ ÌÍÚ[ÛÛÜ ÌÍÜÓXZ[^H ][ÝÔÙÜÜÈ][ÝË ÌÍÜÔÝX^H ][ÝÉ][ÝË ÌÍÚVÜÈH ][ÝÉ][ÝË ÌÍÚVÜÈH ][ÝÉ][ÝË ÌÍÚSÛÜH BØØ[ ÌÍÙÜK ÌÍÚK ÌÍÜÐÛÛÜÐÛÛÜ[ÝXXÈÙYÈ]ÈHÜYY[ØØ[ ÌÍØÛÛÜTHÐÛÛÜÙ]Y ÌÍÚÝÛÛÜBØØ[ ÌÍØÛÛÜQÈHÐÛÛÜÙ]ÜY[ ÌÍÚÝÛÛÜBØØ[ ÌÍØÛÛÜPHÐÛÛÜÙ]YJ ÌÍÚÝÛÛÜBØØ[ ÌÍÛÝH ÐÛÛÜÙ]Y ÌÍÚ[ÛÛÜHH ÌÍØÛÛÜTHÈØØ[ ÌÍÛÝÈH ÐÛÛÜÙ]ÜY[ ÌÍÚ[ÛÛÜHH ÌÍØÛÛÜQÊHÈØØ[ ÌÍÛÝH ÐÛÛÜÙ]YJ ÌÍÚ[ÛÛÜHH ÌÍØÛÛÜPHÈÔÙ]Y][ÜÚ][ÛÈ]HÙ[Y ÌÍÚVÜÈH ][ÝÉ][ÝÈ[ ÌÍÚVÜÈH ÚÝÜÚYÈHHÈBY ÌÍÚVÜÈH ][ÝÉ][ÝÈ[ ÌÍÚVÜÈH ÚÝÜZYÚÈH ÍHÈBÑ]ÈHXZ[ÕRBY ÌÍÚSÛÜ ÉÝÈ[ ÌÍÙÜÙ×ÙÜHHÕRPÜX]J ÌÍÜÕ]KK ÍK ÌÍÚVÜË ÌÍÚVÜË]Ô ÌÍÕÔ×ÐÐTSÓ ÌÍÕÔ×ÕTÒPK ÌÍÕÔ×ÐÔT ÌÍÕÔ×ÐÓTÒPSÔÊK]Ô ÌÍÕÔ×ÑVÐTÒSÕË ÌÍÕÔ×ÑVÕÓÓÒSÕË ÌÍÕÔ×ÑVÕÒSÕÑQÑK ÌÍÕÔ×ÑVÕÔSÔÕ JB[ÙB ÌÍÙÜÙ×ÙÜHHÕRPÜX]J ÌÍÜÕ]KK ÍK ÌÍÚVÜË ÌÍÚVÜË]Ô ÌÍÕÔ×ÐÐTSÓ ÌÍÕÔ×ÕTÒPK ÌÍÕÔ×ÐÔT ÌÍÕÔ×ÐÓTÒPSÔÊK]Ô ÌÍÕÔ×ÑVÐTÒSÕË ÌÍÕÔ×ÑVÕÓÓÒSÕË ÌÍÕÔ×ÑVÕÒSÕÑQÑJJB[YÓXZ[^ÛÙÈKÕRPÝÙ]ÛÈÚ[ÙHÝ[HÙXZ[^ ÌÍÛÙÜYÛXZ[HÕRPÝÜX]SX[ ÌÍÜÓXZ[^L KJBÕRPÝÙ]Û ÌÍÛÙÜYÛXZ[L BÔÝX^ÛÙÈK ÌÍÛÙÜYÜÝXHÕRPÝÜX]SX[ ÌÍÜÔÝX^L LËJBÐ[ÈÛÝX[ÙYÈÜX]HH[Ú[ÛÙ[Ü[Y[ ÌÍÛÙÜYØÛÝHÕRPÝÜX]SX[ ][ÝÉ][ÝËLÌKJBÐÜX]HHÜYY[ÕRPÝÜX]QÜXÊLÌK ÌÍÔÔ×ÔÕSÑSBÜ ÌÍÚHHÈNNB ÌÍÜÐÛÛÜH ][ÝÌ ][ÝÈ [ÈÝ[ÑÜX] ][ÝÉL L L ][ÝË ÌÍØÛÛÜT È ÌÍÛÝ ÌÍÚK ÌÍØÛÛÜQÈ È ÌÍÛÝÈ ÌÍÚK ÌÍØÛÛÜP È ÌÍÛÝ ÌÍÚJNÑÜX]HÛÛÜÙYÜÈ[HÙHÜYY[ÕRPÝÙ]ÜXÊLK ÌÍÑÕRWÑÔÐÓÓÔ ÌÍÜÐÛÛÜNÜÙ]ÛÛÜÜHÚ[ÛH[H[HÜYY[ÕRPÝÙ]ÜXÊLK ÌÍÑÕRWÑÔÓSÕK ÌÍÚK NÛ[ÝH]Ú[ÈÝÛÜÈÜÙÜXÈÞÈHYÚÙHÝ[H]ÛÕRPÝÙ]ÜXÊLK ÌÍÑÕRWÑÔÓSK ÌÍÚKMÊNÙ]ÈHÝZYÚ[HÛHHÜÙHÜXÈÈHÝÛB^ÕRTÙ]Ý]JÕ×ÔÒÕÊB[[ÈÏOIÝ×ÑÔÙÜÜÓÛ[ÈÑÔÙÜÜÔÙ] ÌÍÚTÙÜÜË ÌÍÜÓXZ[^H ][ÝÉ][ÝË ÌÍÜÔÝX^H ][ÝÉ][ÝÊBØØ[ ÌÍØÛ] ÌÍØÜÝY ÌÍÚTÙÜÜÈ ÝÏH[ ÌÍÚTÙÜÜÈ ÏHL[ ÌÍÚTÙÜÜÈH ÌÍÚTÙÜÜÈÈL[ÙBÙ]ÜJB][YÕÈYXÙHX[XÚÙ[ËÛH]HHXZ[^[HÝX^Y^HÚ[ÙB ÌÍØÛ]HÕRPÝXY ÌÍÛÙÜYÛXZ[B ÌÍØÜÝHÕRPÝXY ÌÍÛÙÜYÜÝXBY ÌÍÜÓXZ[^ ÉÝÈ ][ÝÉ][ÝÊH[ ÌÍÜÓXZ[^ ÉÝÈ ÌÍØÛ] H[ÕRPÝÙ]]J ÌÍÛÙÜYÛXZ[ ÌÍÜÓXZ[^ BY ÌÍÜÔÝX^ ÉÝÈ ][ÝÉ][ÝÊH[ ÌÍÜÔÝX^ ÉÝÈ ÌÍØÜÝ H[ÕRPÝÙ]]J ÌÍÛÙÜYÜÝX ÌÍÜÔÝX^ BÛÛÛ[ÝJ ÌÍÙÜÙ×ÙÜK ][ÝÉ][ÝË ÌÍÛÙÜYØÛÝL È ÌÍÚTÙÜÜÈ JKÌHH ÌÍÚTÙÜÜÈ JKJB[[ÈÏOIÝ×ÑÔÙÜÜÔÙ][ÈÑÔÙÜÜÓÙ BÕRPÝ[]J ÌÍÛÙÜYØÛÝBÕRPÝ[]J ÌÍÛÙÜYÛXZ[BÕRPÝ[]J ÌÍÛÙÜYÜÝXBÕRPÝ[]J ÌÍÙÜÙ×ÙÜJBÕRQ[]J ÌÍÙÜÙ×ÙÜJB[[ÈÏOIÝ×ÑÔÙÜÜÓÙ[ÈÑÕRPÝÜX]QÔÙÜÜÊ ÌÍÚÝÛÛÜ ÌÍÚ[ÛÛÜ ÌÍÚVÜË ÌÍÚVÜË ÌÍÚUÚY ÌÍÚRZYÚ BØØ[ ÌÍÚK ÌÍÜÐÛÛÜÑ]][ÈÛÜÜÈ]YHÚYÈÙY[Ù ÌÍÚUÚYHH[ ÌÍÚUÚY ÏHBÐÛÛÜ[ÝXXÈÙYÈ]ÈHÜYY[ØØ[ ÌÍØÛÛÜTHÐÛÛÜÙ]Y ÌÍÚÝÛÛÜBØØ[ ÌÍØÛÛÜQÈHÐÛÛÜÙ]ÜY[ ÌÍÚÝÛÛÜBØØ[ ÌÍØÛÛÜPHÐÛÛÜÙ]YJ ÌÍÚÝÛÛÜBØØ[ ÌÍÛÝH ÐÛÛÜÙ]Y ÌÍÚ[ÛÛÜHH ÌÍØÛÛÜTHÈ ÌÍÚUÚYØØ[ ÌÍÛÝÈH ÐÛÛÜÙ]ÜY[ ÌÍÚ[ÛÛÜHH ÌÍØÛÛÜQÊHÈ ÌÍÚUÚYØØ[ ÌÍÛÝH ÐÛÛÜÙ]YJ ÌÍÚ[ÛÛÜHH ÌÍØÛÛÜPHÈ ÌÍÚUÚYÐ[ÈÛÝX[ÙYÈÜX]HH[Ú[ÛÙ[Ü[Y[ ÌÍÛÙÜYÑÕRWØÛÝHÕRPÝÜX]SX[ ][ÝÉ][ÝË ÌÍÚVÜË ÌÍÚVÜË ÌÍÚUÚY ÌÍÚRZYÚ ÈJJBÐÜX]HHÜYY[ÕRPÝÜX]QÜXÊ ÌÍÚVÜË ÌÍÚVÜË ÌÍÚUÚY ÌÍÚRZYÚ ÌÍÔÔ×ÔÕSÑSBÜ ÌÍÚHHÈ ÌÍÚUÚYHB ÌÍÜÐÛÛÜH ][ÝÌ ][ÝÈ [ÈÝ[ÑÜX] ][ÝÉL L L ][ÝË ÌÍØÛÛÜT È ÌÍÛÝ ÌÍÚK ÌÍØÛÛÜQÈ È ÌÍÛÝÈ ÌÍÚK ÌÍØÛÛÜP È ÌÍÛÝ ÌÍÚJNÑÜX]HÛÛÜÙYÜÈ[HÙHÜYY[ÕRPÝÙ]ÜXÊLK ÌÍÑÕRWÑÔÐÓÓÔ ÌÍÜÐÛÛÜNÜÙ]ÛÛÜÜHÚ[ÛH[H[HÜYY[ÕRPÝÙ]ÜXÊLK ÌÍÑÕRWÑÔÓSÕK ÌÍÚK NÛ[ÝH]Ú[ÈÝÛÜÈÜÙÜXÈÞÈHYÚÙHÝ[H]ÛÕRPÝÙ]ÜXÊLK ÌÍÑÕRWÑÔÓSK ÌÍÚK ÌÍÚRZYÚHÊJNÙ]ÈHÝZYÚ[HÛHHÜÙHÜXÈÈHÝÛB^] ÌÍÛÙÜYÑÕRWØÛÝ [ÈÔ [È ÌÍÚVÜÈ [ÈÔ [È ÌÍÚVÜÈ [ÈÔ [È ÌÍÚUÚY [ÈÔ [È ÌÍÚRZYÚ[[ÈÏOIÝ×ÑÕRPÝÜX]QÔÙÜÜÂ[ÈÑÝZPÝÙ]ÔÙÜÜÊ ÌÍÙØ ÌÍÜÕÚ[ÝÕ]K ÌÍÚTÙÜÜÊBØØ[ ÌÍÝØY ÌÍÚTÙÜÜÈ ÝÏH[ ÌÍÚTÙÜÜÈ ÏHL[ ÌÍÚTÙÜÜÈH ÌÍÚTÙÜÜÈÈL[ÙBÙ]ÜJB][Y ÌÍÝØHÝ[ÔÜ] ÌÍÙØÔBY ÌÍÝØÌH ÉÝÈ H[Ù]ÜJB][YÉÌÍÛÈHÛÛÛ[ÝJ ÌÍÜÕÚ[ÝÕ]K ][ÝÉ][ÝË[X ÌÍÛÙÜYÑÕRWØÛÝK ÌÍÚVÜÊÈ ÌÍÚTÙÜÜÈ ÌÍÚUÚY K ÌÍÚVÜË ÌÍÚUÚYH ÌÍÚTÙÜÜÈ ÌÍÚUÚY K ÌÍÚRZYÚ B ÌÍÛÈHÛÛÛ[ÝJ ÌÍÜÕÚ[ÝÕ]K ][ÝÉ][ÝË[XÝ[ÔÝÔÊ ÌÍÝØÌWK JKÝ[ÔÝÔÊ ÌÍÝØÌK H È ÌÍÚTÙÜÜÈ Ý[ÔÝÔÊ ÌÍÝØÍK JKÝ[ÔÝÔÊ ÌÍÝØÌ×K KÝ[ÔÝÔÊ ÌÍÝØÍK HH ÌÍÚTÙÜÜÈ Ý[ÔÝÔÊ ÌÍÝØÍK JKÝ[ÔÝÔÊ ÌÍÝØÍWK JB[[ÈÏOIÝ×ÑÝZPÝÙ]ÔÙÜÜÈ The reason being au3check reports warnings. Edited September 17, 2006 by RazerM My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop. Link to comment Share on other sites More sharing options...
syberschmo Posted September 17, 2006 Author Share Posted September 17, 2006 Thanks for the feedback. I used to declare the globals outside the function, but I thought it looked too sloppy. I'll change it to what you suggested. Gradient-Filled Progress Bars UDF Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now