Sign in to follow this  
Followers 0
ConsultingJoe

Cool Flash Grabber

10 posts in this topic

It may need error checking but It downloads the first occourence of ".swf" to FLASH.swf

try it on the site

http://www.albinoblacksheep.com/flash/hampster

and anywhere else you can think of

let me know what you think and tweak away

You must have beta and ie.au3

#include <ie.au3>
AutoItSetOption( "WinTextMatchMode", 2)
TrayTip("Flash Downloader", "select the browser to search in", 3)
while 1
    $title = WinGetTitle ( "" )
    if StringInStr( $title, " - Microsoft Internet Explorer") Then ExitLoop
    WEnd
$title = StringReplace($title, " - Microsoft Internet Explorer", "")
$oIE1 = _IEAttach ($title)
$source = _IEBodyReadHTML ($oIE1)
$end = StringInStr ( $source, ".swf" )
$begin = 1
$i = 0
while $begin > 0 and $begin < $end
$i = $i + 1
$begin = StringInStr ($source, "http://", 0, $i)
WEnd
$i = $i - 1
$begin = StringInStr ($source, "http://", 0, $i)
$address = StringMid ( $source, $begin, $end - $begin + 4 )
$size = InetGetSize ( $address )
InetGet ( $address,"FLASH.swf", 1, 1)
TrayTip( "Flash Address:", $address, 2)
sleep(2000)
While @InetGetActive
  TrayTip("Downloading", @InetGetBytesRead & "/" & $size, 10, 16)
  Sleep(250)
Wend
TrayTip("Download Complete", "100%", 10, 16)
sleep(1500)

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites



Sorry guys for the multi post (Dial-up)

Just use this one and let that one fall down


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

I just tried it on the Shockwave test site and I recieved the following error from SciTE

>Running:(3.1.1.113):C:\Program Files\AutoIt3\beta\autoit3.exe "D:\AutoIT-3\Testing Stuff\Testing.au3"

C:\Program Files\AutoIt3\beta\Include\ie.au3 (1135) : ==> Variable must be of type "Object".:

If IsObj($o_object.document) Then

If IsObj($o_object^ ERROR

+>AutoIT3.exe ended.rc:0

>Exit code: 0 Time: 2.557

I have the latest Beta and I just downloaded the latest IE.au3

The Site I tested with. http://www.macromedia.com/shockwave/welcome/

Mike


Share this post


Link to post
Share on other sites

I tried it at the site and it didn't give me that error, but it did give me the error if I don't have a IE already opened, then I open one. that's when I get the error. I need to add error checking and check to see if IE is opened or not.

And I notice the code grabs crazy things sometimes, so maybe I need to add something that checks if the url is correct.

but besides all that, what do you think... :)


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

I tried it at the site and it didn't give me that error, but it did give me the error if I don't have a IE already opened, then I open one. that's when I get the error. I need to add error checking and check to see if IE is opened or not.

And I notice the code grabs crazy things sometimes, so maybe I need to add something that checks if the url is correct.

but besides all that, what do you think... :)

I think it's a very cool idea.

I'm actually building an Install CD that is going to installing the flash player (among many other things). It would be cool to include the test swf file so I can launch a test after the player has been installed.

Mike


Share this post


Link to post
Share on other sites

but besides all that, what do you think... :mellow:

I'm not sure I understand what this does. Does it actually download the shockwave movie for me? That is, instead of just seeing the movie as a streaming movie, I can save the whole file to my hard drive? :)

...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

Share this post


Link to post
Share on other sites

I'm not sure I understand what this does. Does it actually download the shockwave movie for me? That is, instead of just seeing the movie as a streaming movie, I can save the whole file to my hard drive? :)

yeah pritty much. it's not perfect yet. I tested it at albinoblacksheep

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Ok try this:

now it will do wma, swf, and mpg just by adding some code.

I also found that it grabs variables like in www.yahoo.com it grabbed:

http://us.i1.yimg.com/us.yimg.com/i/mntl/w...r+'spl1.swf

next I'll have it check to see if there are: single quotes, pluses, and commas

but if it doesn't find anything it will tell you now

#include <ie.au3>
AutoItSetOption( "WinTextMatchMode", 2)
TrayTip("Flash Downloader", "select the browser to search in", 3)
while 1
    $title = WinGetTitle ( "" )
    if StringInStr( $title, " - Microsoft Internet Explorer") Then ExitLoop
    WEnd
$title = StringReplace($title, " - Microsoft Internet Explorer", "")
$oIE1 = _IEAttach ($title)
$source = _IEBodyReadHTML ($oIE1)
$end = StringInStr ( $source, ".swf" )
if $end = 0 then $end = StringInStr ( $source, ".wma" )
if $end = 0 then $end = StringInStr ( $source, ".mpg" )
if $end = 0 then 
msgbox(0,"", "could not find: swf, wma, or mpg")
exit
endif
$begin = 1
$i = 0
while $begin > 0 and $begin < $end
$i = $i + 1
$begin = StringInStr ($source, "http://", 0, $i)
WEnd
$i = $i - 1
$begin = StringInStr ($source, "http://", 0, $i)
$address = StringMid ( $source, $begin, $end - $begin + 4 )
ClipPut ( $address )
$size = InetGetSize ( $address )
InetGet ( $address,"FLASH.swf", 1, 1)
TrayTip( "Flash Address:", $address, 2)
sleep(2000)
While @InetGetActive
  TrayTip("Downloading", @InetGetBytesRead & "/" & $size, 10, 16)
  Sleep(250)
Wend
TrayTip("Download Complete", "100%", 10, 16)
sleep(1500)
Edited by zerocool60544

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

Nice script, comes handy for sure. heres one thing i modified tho :

$Num = ""
If FileExists("FLASH" & $Num & ".swf") Then
    Do
        $Num += 1
    Until Not FileExists("FLASH" & $Num & ".swf")
EndIf
InetGet($Address, "FLASH" & $Num & ".swf", 1, 1)

So i can save multiple flashs 8)

Share this post


Link to post
Share on other sites

Nice script, comes handy for sure. heres one thing i modified tho :

$Num = ""
If FileExists("FLASH" & $Num & ".swf") Then
    Do
        $Num += 1
    Until Not FileExists("FLASH" & $Num & ".swf")
EndIf
InetGet($Address, "FLASH" & $Num & ".swf", 1, 1)

So i can save multiple flashs 8)

cool, it should also do mpg, avi, or any extention

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

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