Hi!
Also, meine Funktion gibt den Downloadlink der aktuellsten Firefox
Version zurück, klappt auch sehr gut nur dauert es 'relativ' lange und
der Code ist auch ziemlich lang. Habe Sie hier gleich mit einer
Testausgabe versehen.
Also meine Frage an euch: Jemand eine Idee wie es besser klappt oder/und den Code kürzen?
Spoiler anzeigen
$URL = firefoxlink()
MsgBox(64,"Info", $URL)
Func firefoxlink()
$Hilf = "0"
$standard = "http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/win32/de/Firefox Setup "
$zweite = "0"
$dritte = "0"
$null = "23"
$version = $null & "." & $zweite & "." & $dritte & ".exe"
$complete = $standard & $version
while InetGetSize($complete) = "0" and $Hilf = "0" ;1
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]if $zweite = 9 Then ;4
$dritte = 0
$zweite = 0
$null = $null + 1
if InetGetSize($standard & $null & ".0.exe") > 0 then $Hilf = "1"
Else ;4
EndIf ;4
if $dritte = 9 Then ;3
$dritte = 0
$zweite = $zweite + 1
if InetGetSize($standard & $null & "." & $zweite & ".exe") > 0 then $Hilf = "2"
Else ;3
EndIf ;3
$dritte = $dritte + 1
$version = $null & "." & $zweite & "." & $dritte & ".exe"
$complete = $standard & $version
WEnd
;1
if $Hilf = "1" then
$version = $null & "." & "0.exe"
$complete = $standard & $version
EndIf
if $Hilf = "2" then
$version = $null & "." & $zweite & ".exe"
$complete = $standard & $version
EndIf
if InetGetSize($complete) = "0" then ;2
MsgBox(4096, "NICHT VORHANDEN!", "ist nicht da" & " " & $complete)
Else ;2
return $complete
EndIf ;2
EndFunc
[/autoit]Vielen Dank für Die Hilfe im vorraus!
Mit freundlichen Grüßen,
blame