Jump to content

Downloader


Recommended Posts

Hi i am trying to download more than 1 file at the same time.

I got it to so i don't have to define a filename when it's downloaded, but i need to download a big list of rapidshare links from links.txt, and not only 1 by 1, it should start them all, please help, i tryed making a new process for eath download, but that is not a good solution for me, i know it can be done with background downloading, but it have to get it's default filename.

here's my script:

$file = FileOpen("links.txt", 0)
; Check if file opened for reading OK
If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
; Read in lines of text until the EOF is reached
While 1
$line = FileReadLine($file)
;If @error = -1 Then ExitLoop
$url = ($line) ;source
$folder = @UserProfileDir & "\Downloads\" ;destination folder
InetGet($url,$folder & StringTrimLeft($url,StringInStr($url,"/",Default,-1))) ;stringinstr finds the last "/". Stringtrimleft trims all but the filename    
wend

#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Dim $Array , $complete = False
DownloaderMultiFiles($Array,"http://www.win-rar.com/downloads/wrar393.exe",@ScriptDir & "\Dir1")
DownloaderMultiFiles($Array,"http://www.win-rar.com/downloads/wrar393bg.exe",@ScriptDir & "\Dir1")
DownloaderMultiFiles($Array,"http://www.win-rar.com/downloads/wrar393.exe",@ScriptDir & "\Dir2")
;only 2 file in one time download in WinRar Site
DownloaderMultiFiles($Array,"http://www.autoitscript.com/cgi-bin/getfile.pl?../autoit3/scite/" & _
"download/SciTE4AutoIt3.exe",@ScriptDir & "\Dir2")

While 1
if $complete = False Then
$complete = ProgressLoop($Array,$complete)
Else
MsgBox(0,"","download is complete")
Exit
EndIf
WEnd

Func ProgressLoop($Array,$complete = False)
if $complete = False Then
Dim $TempArray[1][7]
$complete = True
For $i = 0 To UBound($Array) - 1
Sleep(250)
$read = InetGetInfo($Array[$i][5],0)
$Size = InetGetInfo($Array[$i][5],1)
$Array[$i][6] += $read
$CompBool = InetGetInfo($Array[$i][5],2)
$error = @error
GUICtrlSetData($Array[$i][3],(100 / $Size) * $read)
GUICtrlSetData($Array[$i][4],"( " & StringLeft(int($read / 1024) / 1000 ,8) _
& " OF " & StringLeft(int($Size /1024) / 1000 ,8) & " ) MB")
if $CompBool = False And Not $error Then
$complete = False
$TempArray[UBound($TempArray) -1][0] = $Array[$i][0]
$TempArray[UBound($TempArray) -1][1] = $Array[$i][1]
$TempArray[UBound($TempArray) -1][2] = $Array[$i][2]
$TempArray[UBound($TempArray) -1][3] = $Array[$i][3]
$TempArray[UBound($TempArray) -1][4] = $Array[$i][4]
$TempArray[UBound($TempArray) -1][5] = $Array[$i][5]
$TempArray[UBound($TempArray) -1][6] = $Array[$i][6]
ReDim $TempArray[UBound($TempArray) +1][7]
Else
InetClose($Array[$i][5])
EndIf
Next
if $complete Then GUIDelete($Array[0][2])
if UBound($TempArray) > 1 Then
ReDim $TempArray[UBound($TempArray) - 1][7]
Else
$TempArray = 0
EndIf
$Array = $TempArray
Return $complete
EndIf
EndFunc

Func DownloaderMultiFiles(ByRef $Array,$link,$OutDir)
if Not IsArray($Array) Then
Dim $Array[1][7]
$Array[0][2] = GUICreate("Downloader Progress", 590, 140, 100, 200, _
BitOR($WS_MINIMIZEBOX,$WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW _
,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
Else
ReDim $Array[UBound($Array) + 1][7]
EndIf
if StringRight($OutDir,1) == "\" Then $OutDir = StringTrimRight($OutDir,1)
if Not FileExists($OutDir) Then DirCreate($OutDir)
$FileName = StringSplit($link,"/")
$FileName = $FileName[$FileName[0]]
$OutDir &= "\" & $FileName
$Array[UBound($Array) - 1][0] = $link
$Array[UBound($Array) - 1][1] = $OutDir
$Array[UBound($Array) - 1][3] = GUICtrlCreateProgress(190, 10 + ((UBound($Array) - 1) * 30), 200, 20)
GUICtrlCreateLabel($FileName, 10, 10 + ((UBound($Array) - 1) * 30), 170, 20, BitOR($SS_CENTER,$WS_BORDER))
GUICtrlSetFont(-1, 10, 600, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Array[UBound($Array) - 1][4] = GUICtrlCreateLabel("", 400, 10 + ((UBound($Array) - 1) * 30), 170, 20,BitOR($SS_CENTER,$WS_BORDER))
GUICtrlSetFont(-1, 10, 600, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Array[UBound($Array) - 1][5]  = InetGet($Array[UBound($Array) - 1][0],$Array[UBound($Array) - 1][1], 1, 1)
Sleep(1500)
EndFunc

صرح السماء كان هنا

 

Link to comment
Share on other sites

wolf thanks alot for you reply.

i tryed this:

it still only read 1 line from links.txt :/

#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$file = FileOpen("links.txt", 0)
If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
$line = FileReadLine($file)

Dim $Array , $complete = False
DownloadserMultiFiles($Array, $line, @ScriptDir & "\Downloads")
DownloadserMultiFiles($Array, $line, @ScriptDir & "\Downloads")

While 1
if $complete = False Then
$complete = ProgressLoop($Array,$complete)
Else
MsgBox(0,"","Downloads is complete")
Exit
EndIf
WEnd

Func ProgressLoop($Array,$complete = False)
if $complete = False Then
Dim $TempArray[1][7]
$complete = True
For $i = 0 To UBound($Array) - 1
Sleep(250)
$read = InetGetInfo($Array[$i][5],0)
$Size = InetGetInfo($Array[$i][5],1)
$Array[$i][6] += $read
$CompBool = InetGetInfo($Array[$i][5],2)
$error = @error
GUICtrlSetData($Array[$i][3],(100 / $Size) * $read)
GUICtrlSetData($Array[$i][4],"( " & StringLeft(int($read / 1024) / 1000 ,8) _
& " OF " & StringLeft(int($Size /1024) / 1000 ,8) & " ) MB")
if $CompBool = False And Not $error Then
$complete = False
$TempArray[UBound($TempArray) -1][0] = $Array[$i][0]
$TempArray[UBound($TempArray) -1][1] = $Array[$i][1]
$TempArray[UBound($TempArray) -1][2] = $Array[$i][2]
$TempArray[UBound($TempArray) -1][3] = $Array[$i][3]
$TempArray[UBound($TempArray) -1][4] = $Array[$i][4]
$TempArray[UBound($TempArray) -1][5] = $Array[$i][5]
$TempArray[UBound($TempArray) -1][6] = $Array[$i][6]
ReDim $TempArray[UBound($TempArray) +1][7]
Else
InetClose($Array[$i][5])
EndIf
Next
if $complete Then GUIDelete($Array[0][2])
if UBound($TempArray) > 1 Then
ReDim $TempArray[UBound($TempArray) - 1][7]
Else
$TempArray = 0
EndIf
$Array = $TempArray
Return $complete
EndIf
EndFunc

Func DownloadserMultiFiles(ByRef $Array,$link,$OutDir)
if Not IsArray($Array) Then
Dim $Array[1][7]
$Array[0][2] = GUICreate("QDownloader", 590, 140, 100, 200, _
BitOR($WS_MINIMIZEBOX,$WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW _
,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
Else
ReDim $Array[UBound($Array) + 1][7]
EndIf
if StringRight($OutDir,1) == "\" Then $OutDir = StringTrimRight($OutDir,1)
if Not FileExists($OutDir) Then DirCreate($OutDir)
$FileName = StringSplit($link,"/")
$FileName = $FileName[$FileName[0]]
$OutDir &= "\" & $FileName
$Array[UBound($Array) - 1][0] = $link
$Array[UBound($Array) - 1][1] = $OutDir
$Array[UBound($Array) - 1][3] = GUICtrlCreateProgress(190, 10 + ((UBound($Array) - 1) * 30), 200, 20)
GUICtrlCreateLabel($FileName, 10, 10 + ((UBound($Array) - 1) * 30), 170, 20, BitOR($SS_CENTER,$WS_BORDER))
GUICtrlSetFont(-1, 10, 600, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Array[UBound($Array) - 1][4] = GUICtrlCreateLabel("", 400, 10 + ((UBound($Array) - 1) * 30), 170, 20,BitOR($SS_CENTER,$WS_BORDER))
GUICtrlSetFont(-1, 10, 600, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Array[UBound($Array) - 1][5]  = InetGet($Array[UBound($Array) - 1][0],$Array[UBound($Array) - 1][1], 1, 1)
Sleep(1500)
EndFunc
Edited by spymare
Link to comment
Share on other sites

wolf thanks alot for you reply.

i tryed this:

it still only read 1 line from links.txt :/

#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$file = FileOpen("links.txt", 0)
If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
$line = FileReadLine($file)

Dim $Array , $complete = False
DownloadserMultiFiles($Array, $line, @ScriptDir & "\Downloads")
DownloadserMultiFiles($Array, $line, @ScriptDir & "\Downloads")

While 1
if $complete = False Then
$complete = ProgressLoop($Array,$complete)
Else
MsgBox(0,"","Downloads is complete")
Exit
EndIf
WEnd

Func ProgressLoop($Array,$complete = False)
if $complete = False Then
Dim $TempArray[1][7]
$complete = True
For $i = 0 To UBound($Array) - 1
Sleep(250)
$read = InetGetInfo($Array[$i][5],0)
$Size = InetGetInfo($Array[$i][5],1)
$Array[$i][6] += $read
$CompBool = InetGetInfo($Array[$i][5],2)
$error = @error
GUICtrlSetData($Array[$i][3],(100 / $Size) * $read)
GUICtrlSetData($Array[$i][4],"( " & StringLeft(int($read / 1024) / 1000 ,8) _
& " OF " & StringLeft(int($Size /1024) / 1000 ,8) & " ) MB")
if $CompBool = False And Not $error Then
$complete = False
$TempArray[UBound($TempArray) -1][0] = $Array[$i][0]
$TempArray[UBound($TempArray) -1][1] = $Array[$i][1]
$TempArray[UBound($TempArray) -1][2] = $Array[$i][2]
$TempArray[UBound($TempArray) -1][3] = $Array[$i][3]
$TempArray[UBound($TempArray) -1][4] = $Array[$i][4]
$TempArray[UBound($TempArray) -1][5] = $Array[$i][5]
$TempArray[UBound($TempArray) -1][6] = $Array[$i][6]
ReDim $TempArray[UBound($TempArray) +1][7]
Else
InetClose($Array[$i][5])
EndIf
Next
if $complete Then GUIDelete($Array[0][2])
if UBound($TempArray) > 1 Then
ReDim $TempArray[UBound($TempArray) - 1][7]
Else
$TempArray = 0
EndIf
$Array = $TempArray
Return $complete
EndIf
EndFunc

Func DownloadserMultiFiles(ByRef $Array,$link,$OutDir)
if Not IsArray($Array) Then
Dim $Array[1][7]
$Array[0][2] = GUICreate("QDownloader", 590, 140, 100, 200, _
BitOR($WS_MINIMIZEBOX,$WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW _
,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
Else
ReDim $Array[UBound($Array) + 1][7]
EndIf
if StringRight($OutDir,1) == "\" Then $OutDir = StringTrimRight($OutDir,1)
if Not FileExists($OutDir) Then DirCreate($OutDir)
$FileName = StringSplit($link,"/")
$FileName = $FileName[$FileName[0]]
$OutDir &= "\" & $FileName
$Array[UBound($Array) - 1][0] = $link
$Array[UBound($Array) - 1][1] = $OutDir
$Array[UBound($Array) - 1][3] = GUICtrlCreateProgress(190, 10 + ((UBound($Array) - 1) * 30), 200, 20)
GUICtrlCreateLabel($FileName, 10, 10 + ((UBound($Array) - 1) * 30), 170, 20, BitOR($SS_CENTER,$WS_BORDER))
GUICtrlSetFont(-1, 10, 600, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Array[UBound($Array) - 1][4] = GUICtrlCreateLabel("", 400, 10 + ((UBound($Array) - 1) * 30), 170, 20,BitOR($SS_CENTER,$WS_BORDER))
GUICtrlSetFont(-1, 10, 600, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Array[UBound($Array) - 1][5]  = InetGet($Array[UBound($Array) - 1][0],$Array[UBound($Array) - 1][1], 1, 1)
Sleep(1500)
EndFunc

$file = FileOpen("links.txt", 0)
$SpArray = StringSplit(FileRead($file),@LF)
For $i = 1 To $SpArray[0]
$Line = StringStripWS($SpArray[$i],3)
if $Line <> "" Then _
DownloaderMultiFiles($Array,$Line,@ScriptDir & "\Dir")
Next
FileClose($file)

#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GUIScrollBars.au3>
#include <ScrollBarConstants.au3>

Dim $Array , $complete = False

$file = FileOpen("links.txt", 0)
$SpArray = StringSplit(FileRead($file),@LF)
For $i = 1 To $SpArray[0]
$Line = StringStripWS($SpArray[$i],3)
if $Line <> "" Then _
DownloaderMultiFiles($Array,$Line,@ScriptDir & "\Dir")
Next
FileClose($file)



;DownloaderMultiFiles($Array,"http://www.win-rar.com/downloads/wrar393.exe",@ScriptDir & "\Dir1")
;DownloaderMultiFiles($Array,"http://www.win-rar.com/downloads/wrar393bg.exe",@ScriptDir & "\Dir1")
;DownloaderMultiFiles($Array,"http://www.win-rar.com/downloads/wrar393.exe",@ScriptDir & "\Dir2")
;only 2 file in one time download in WinRar Site
;DownloaderMultiFiles($Array,"http://www.autoitscript.com/cgi-bin/getfile.pl?../autoit3/scite/" & _
;"download/SciTE4AutoIt3.exe",@ScriptDir & "\Dir2")

While 1
if $complete = False Then
$complete = ProgressLoop($Array,$complete)
Else
MsgBox(0,"","download is complete")
Exit
EndIf
WEnd

Func ProgressLoop($Array,$complete = False)
if $complete = False Then
Dim $TempArray[1][7]
$complete = True
For $i = 0 To UBound($Array) - 1
Sleep(250)
$read = InetGetInfo($Array[$i][5],0)
$Size = InetGetInfo($Array[$i][5],1)
$Array[$i][6] += $read
$CompBool = InetGetInfo($Array[$i][5],2)
$error = @error
GUICtrlSetData($Array[$i][3],(100 / $Size) * $read)
GUICtrlSetData($Array[$i][4],"( " & StringLeft(int($read / 1024) / 1000 ,8) _
& " OF " & StringLeft(int($Size /1024) / 1000 ,8) & " ) MB")
if $CompBool = False And Not $error Then
$complete = False
$TempArray[UBound($TempArray) -1][0] = $Array[$i][0]
$TempArray[UBound($TempArray) -1][1] = $Array[$i][1]
$TempArray[UBound($TempArray) -1][2] = $Array[$i][2]
$TempArray[UBound($TempArray) -1][3] = $Array[$i][3]
$TempArray[UBound($TempArray) -1][4] = $Array[$i][4]
$TempArray[UBound($TempArray) -1][5] = $Array[$i][5]
$TempArray[UBound($TempArray) -1][6] = $Array[$i][6]
ReDim $TempArray[UBound($TempArray) +1][7]
Else
InetClose($Array[$i][5])
EndIf
Next
if $complete Then GUIDelete($Array[0][2])
if UBound($TempArray) > 1 Then
ReDim $TempArray[UBound($TempArray) - 1][7]
Else
$TempArray = 0
EndIf
$Array = $TempArray
Return $complete
EndIf
EndFunc

Func DownloaderMultiFiles(ByRef $Array,$link,$OutDir)
if Not IsArray($Array) Then
Dim $Array[1][7]
$Array[0][2] = GUICreate("Downloader Progress", 590, 130, 100, 200, _
BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_SIZEBOX))
GUIRegisterMsg($WM_SIZE, "WM_SIZE")
GUIRegisterMsg($WM_VSCROLL, "WM_VSCROLL")
_GUIScrollBars_Init($Array[0][2])
GUISetState(@SW_SHOW)
Else
ReDim $Array[UBound($Array) + 1][7]
EndIf
if StringRight($OutDir,1) == "\" Then $OutDir = StringTrimRight($OutDir,1)
if Not FileExists($OutDir) Then DirCreate($OutDir)
$FileName = StringSplit($link,"/")
$FileName = $FileName[$FileName[0]]
$OutDir &= "\" & $FileName
$Array[UBound($Array) - 1][0] = $link
$Array[UBound($Array) - 1][1] = $OutDir
$Array[UBound($Array) - 1][3] = GUICtrlCreateProgress(190, 10 + ((UBound($Array) - 1) * 30), 200, 20)
GUICtrlCreateLabel($FileName, 10, 10 + ((UBound($Array) - 1) * 30), 170, 20, BitOR($SS_CENTER,$WS_BORDER))
GUICtrlSetFont(-1, 10, 600, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Array[UBound($Array) - 1][4] = GUICtrlCreateLabel("", 400, 10 + ((UBound($Array) - 1) * 30), 170, 20,BitOR($SS_CENTER,$WS_BORDER))
GUICtrlSetFont(-1, 10, 600, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Array[UBound($Array) - 1][5]  = InetGet($Array[UBound($Array) - 1][0],$Array[UBound($Array) - 1][1], 1, 1)
Sleep(1500)
EndFunc



Func WM_SIZE($hWnd, $Msg, $wParam, $lParam)
    #forceref $Msg, $wParam
    Local $index = -1, $yChar, $xChar, $xClientMax, $xClient, $yClient, $ivMax
    For $x = 0 To UBound($aSB_WindowInfo) - 1
        If $aSB_WindowInfo[$x][0] = $hWnd Then
            $index = $x
            $xClientMax = $aSB_WindowInfo[$index][1]
            $xChar = $aSB_WindowInfo[$index][2]
            $yChar = $aSB_WindowInfo[$index][3]
            $ivMax = $aSB_WindowInfo[$index][7]
            ExitLoop
        EndIf
    Next
    If $index = -1 Then Return 0

    Local $tSCROLLINFO = DllStructCreate($tagSCROLLINFO)

    ; Retrieve the dimensions of the client area.
    $xClient = BitAND($lParam, 0x0000FFFF)
    $yClient = BitShift($lParam, 16)
    $aSB_WindowInfo[$index][4] = $xClient
    $aSB_WindowInfo[$index][5] = $yClient

    ; Set the vertical scrolling range and page size
    DllStructSetData($tSCROLLINFO, "fMask", BitOR($SIF_RANGE, $SIF_PAGE))
    DllStructSetData($tSCROLLINFO, "nMin", 0)
    DllStructSetData($tSCROLLINFO, "nMax", $ivMax)
    DllStructSetData($tSCROLLINFO, "nPage", $yClient / $yChar)
    _GUIScrollBars_SetScrollInfo($hWnd, $SB_VERT, $tSCROLLINFO)

    ; Set the horizontal scrolling range and page size
    DllStructSetData($tSCROLLINFO, "fMask", BitOR($SIF_RANGE, $SIF_PAGE))
    DllStructSetData($tSCROLLINFO, "nMin", 0)
    DllStructSetData($tSCROLLINFO, "nMax", 2 + $xClientMax / $xChar)
    DllStructSetData($tSCROLLINFO, "nPage", $xClient / $xChar)
    _GUIScrollBars_SetScrollInfo($hWnd, $SB_HORZ, $tSCROLLINFO)

    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_SIZE

Func WM_VSCROLL($hWnd, $Msg, $wParam, $lParam)
    #forceref $Msg, $wParam, $lParam
    Local $nScrollCode = BitAND($wParam, 0x0000FFFF)
    Local $index = -1, $yChar, $yPos
    Local $Min, $Max, $Page, $Pos, $TrackPos

    For $x = 0 To UBound($aSB_WindowInfo) - 1
        If $aSB_WindowInfo[$x][0] = $hWnd Then
            $index = $x
            $yChar = $aSB_WindowInfo[$index][3]
            ExitLoop
        EndIf
    Next
    If $index = -1 Then Return 0


    ; Get all the vertial scroll bar information
    Local $tSCROLLINFO = _GUIScrollBars_GetScrollInfoEx($hWnd, $SB_VERT)
    $Min = DllStructGetData($tSCROLLINFO, "nMin")
    $Max = DllStructGetData($tSCROLLINFO, "nMax")
    $Page = DllStructGetData($tSCROLLINFO, "nPage")
    ; Save the position for comparison later on
    $yPos = DllStructGetData($tSCROLLINFO, "nPos")
    $Pos = $yPos
    $TrackPos = DllStructGetData($tSCROLLINFO, "nTrackPos")

    Switch $nScrollCode
        Case $SB_TOP ; user clicked the HOME keyboard key
            DllStructSetData($tSCROLLINFO, "nPos", $Min)

        Case $SB_BOTTOM ; user clicked the END keyboard key
            DllStructSetData($tSCROLLINFO, "nPos", $Max)

        Case $SB_LINEUP ; user clicked the top arrow
            DllStructSetData($tSCROLLINFO, "nPos", $Pos - 1)

        Case $SB_LINEDOWN ; user clicked the bottom arrow
            DllStructSetData($tSCROLLINFO, "nPos", $Pos + 1)

        Case $SB_PAGEUP ; user clicked the scroll bar shaft above the scroll box
            DllStructSetData($tSCROLLINFO, "nPos", $Pos - $Page)

        Case $SB_PAGEDOWN ; user clicked the scroll bar shaft below the scroll box
            DllStructSetData($tSCROLLINFO, "nPos", $Pos + $Page)

        Case $SB_THUMBTRACK ; user dragged the scroll box
            DllStructSetData($tSCROLLINFO, "nPos", $TrackPos)
    EndSwitch

;~    // Set the position and then retrieve it.  Due to adjustments
;~    //   by Windows it may not be the same as the value set.

    DllStructSetData($tSCROLLINFO, "fMask", $SIF_POS)
    _GUIScrollBars_SetScrollInfo($hWnd, $SB_VERT, $tSCROLLINFO)
    _GUIScrollBars_GetScrollInfo($hWnd, $SB_VERT, $tSCROLLINFO)
    ;// If the position has changed, scroll the window and update it
    $Pos = DllStructGetData($tSCROLLINFO, "nPos")

    If ($Pos <> $yPos) Then
        _GUIScrollBars_ScrollWindow($hWnd, 0, $yChar * ($yPos - $Pos))
        $yPos = $Pos
    EndIf

    Return $GUI_RUNDEFMSG

EndFunc   ;==>WM_VSCROLL

صرح السماء كان هنا

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...