Sign in to follow this  
Followers 0
GtaSpider

FireFox download on G15

3 posts in this topic

Hi every one

Here is now my first little addon for the G15 LCD Remote.

I hope you like it :)

This version only works for the english version of Firefox (not tested, but should work :P)

Here is also a version for the German Firefox: click me

#include<AvLCD.au3>

Opt("WinTitleMatchMode", 2)

_StartLCD("Firefox")

_ShowBitmap(_CreateLCDText("Wait for download"))

While 1
    $hWnd = WinGetHandle("[REGEXPTITLE:.*?% of .*? - Downloads]")
    If @error Or WinGetTitle($hWnd) = "Downloads" Then
        Sleep(200)
        ContinueLoop
    EndIf
    While WinExists($hWnd)
        $iPrz = WinGetTitle($hWnd)
        If $iPrz = "Downloads" Or WinExists($iPrz) = 0 Then
            _ShowBitmap(_CreateLCDText("Komplett!"))
            ExitLoop
        EndIf
        $iPrz = Number(StringLeft($iPrz, 3))
        _Progress($iPrz)
        Sleep(100)
    WEnd
WEnd

Func _Progress($iPrz)
    Local $hPrg
    $hPrg = _CreateLCDText("Firefox Download   " & $iPrz & "%")
    $hPrg = _CreateLCDRect(10, 20, 140, 15, $hPrg); Optional, Pen größe 4px statt 1px
    $hPrg = _CreateLCDRect(12, 22, Round(137 * $iPrz / 100), 12, $hPrg, 1)
    _ShowBitmap($hPrg)
EndFunc   ;==>_Progress


Func OnAutoItExit()
    _CloseLCD()
EndFunc   ;==>OnAutoItExit

Mfg /best regards Spider


www.AutoIt.de - Moderator of the German AutoIt Froum

Share this post


Link to post
Share on other sites



Hi every one

Here is now my first little addon for the G15 LCD Remote.

I hope you like it :)

This version only works for the english version of Firefox (not tested, but should work :P)

Here is also a version for the German Firefox: click me

#include<AvLCD.au3>

Opt("WinTitleMatchMode", 2)

_StartLCD("Firefox")

_ShowBitmap(_CreateLCDText("Wait for download"))

While 1
    $hWnd = WinGetHandle("[REGEXPTITLE:.*?% of .*? - Downloads]")
    If @error Or WinGetTitle($hWnd) = "Downloads" Then
        Sleep(200)
        ContinueLoop
    EndIf
    While WinExists($hWnd)
        $iPrz = WinGetTitle($hWnd)
        If $iPrz = "Downloads" Or WinExists($iPrz) = 0 Then
            _ShowBitmap(_CreateLCDText("Komplett!"))
            ExitLoop
        EndIf
        $iPrz = Number(StringLeft($iPrz, 3))
        _Progress($iPrz)
        Sleep(100)
    WEnd
WEnd

Func _Progress($iPrz)
    Local $hPrg
    $hPrg = _CreateLCDText("Firefox Download   " & $iPrz & "%")
    $hPrg = _CreateLCDRect(10, 20, 140, 15, $hPrg); Optional, Pen größe 4px statt 1px
    $hPrg = _CreateLCDRect(12, 22, Round(137 * $iPrz / 100), 12, $hPrg, 1)
    _ShowBitmap($hPrg)
EndFunc   ;==>_Progress


Func OnAutoItExit()
    _CloseLCD()
EndFunc   ;==>OnAutoItExit

Mfg /best regards Spider

thank you but where can i get the include <AvLCD.au3> ???

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0