Jump to content

Finding AVI files...


 Share

Recommended Posts

Here's a thing to embed an AVI animated thing ...

#include <GUIConstants.au3>
$Splash = GUICreate("", 300, 60, -1, -1, BitOR($WS_POPUP, $WS_BORDER),  $WS_EX_TOPMOST)
GUISetCursor(15, 1)
GUICtrlCreateAVI(@SystemDir & '\Shell32.dll', 167, 15, -1, 210, 15, $ACS_AUTOPLAY)
GUISetState(@SW_SHOW)
Sleep(3000)
Exit

Now if only I could adapt that to tell me if a file has AVI files in it....

I've been meaning to study how the dllCall stuff works. I see all the big shot autoit coders using these things :whistle:

I guess I'll get one of those API viewers now..

Link to comment
Share on other sites

Ok, I'll check that out. Meantime, can you tell me what to change here to get avi files instead of icon files?

Func FileGetIconCount($szFile)
    Dim $szFile, $nCount = 0

    Local $LPCTSTR = DllStructCreate("char[260]")
    DllStructSetData($LPCTSTR, 1, $szFile)
    $nCount = DllCall("shell32.dll", "int", "ExtractIconEx", "ptr", DllStructGetPtr($LPCTSTR), "int", -1, "int", 0, "int", 0, "int", 0)

    Return $nCount[0]
EndFunc

thx :whistle:

Link to comment
Share on other sites

Ok, I'll check that out. Meantime, can you tell me what to change here to get avi files instead of icon files?

Func FileGetIconCount($szFile)
    Dim $szFile, $nCount = 0

    Local $LPCTSTR = DllStructCreate("char[260]")
    DllStructSetData($LPCTSTR, 1, $szFile)
    $nCount = DllCall("shell32.dll", "int", "ExtractIconEx", "ptr", DllStructGetPtr($LPCTSTR), "int", -1, "int", 0, "int", 0, "int", 0)

    Return $nCount[0]
EndFunc

thx :whistle:

If you want some code that shows how to handle AVI files, take a look at the AVI module and corresponding demo in Auto3Lib.
Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

Ya I want to know more about handling AVI things, but for right now, I want to find more of these files that are on everyone's computer..

Or else I'll have to include stuff that will make my application bigger..

Link to comment
Share on other sites

Ya I want to know more about handling AVI things, but for right now, I want to find more of these files that are on everyone's computer..

Or else I'll have to include stuff that will make my application bigger..

Don't be so quick with the italics and bolding or you'll find yourself doing your own work next time. The reference that I gave you shows how to find AVI clips in a file and my pet monkey can write a script to parse a file for a signature. Edited by PaulIA
Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

I give up.. Your pet monkey pwns me!

I looked at that example and found this line..

AVI_OpenEx($hAVI, @SystemDir & "\Shell32.dll", $aAVI[$iI]) oÝ÷ Ø­Ê¡j÷­éî·«±ú+¶¾+ܨºIèÂØ^ɪÞ{az· h¢F­¶¨¶«²Û~ÚwpêÞÙ¢ç$¶z'íêÞƧjø¢Ø^vYR ýÊ+¶)à¶èºm+¡×ç$x[ayû§rبƧvö«¦åzÂ'¶Å©©à!«·¶«z+"ÉnuémrÀT®Þb
ËR»{az·¢²)Üç^Ð7,Ǧ¢¼»x-p7,Ǧ¢¼»{az·¢²)Üç^Ð7-h§ò»x-jwH¶§ØZ¶Æ¬}ªÚ°ÞyÛhî¶)Àܵ¢ÈjííêÞȧr[z[@Ü´rêâ·&®ÞbÉnuémrÒ¶»¶Æ®Þpj+H(!¶wvØh±ëh ÀÜ´­®ç-±«·jwb
ËIç.®+rjííêÞȧr[z[@ܲân¶«É«·ÓhµÚ'{'­"p7,¸­ªòjííêÞȧr[z[@Ü°¨ËZÛ»x-w_,«Þ¶¢Énuë-«¢g°Ø@ºÚ·x§r[z[{-j{ljíà¶)Üç^Ñ *'²Ö§¶Æ®ÞS«wöÆ¥¢Úr^¶-¹Ü¡z··öÊ'+~)Ýxì^rëZnWºÚ"µÍ[ÈÐTWÑ[^XÝ]XJ   ÌÍÜÑ[S[YK   ÌÍÜÑXÝÜOI][ÝÉ][ÝÊBØØ[   ÌÍÜ^ ÌÍÝ^ ÌÍÝ^HÝYÐÒTTVJ
MB  ÌÍÜ^HÝYÑÙ]    ÌÍÝ^
BØ[
    ][ÝÔÚ[Ì ][ÝË  ][ÝÚÛ    ][ÝË  ][ÝÑ[^XÝ]XI][ÝË    ][ÝÜÝ][ÝË  ÌÍÜÑ[S[YK   ][ÝÜÝ][ÝË  ÌÍÜÑXÝÜK  ][ÝÜ][ÝË    ÌÍÜ^
B]ÝYÑÙ]]J    ÌÍÝ^JB[[oÝ÷ Ù*8ÓÞ¢²Ø^²('jÛ«yú+jw±yË­i¹^²'yçm¡ø º·¨ºÛazÈ «n­çè¬H~)^±©Ý¶¬ëa¡Ü"(®C¤#e· yh¢H§ú+¶­¶§ Ýj¢«­¢+ÙÕ¹¥±Ñ%½¹
½Õ¹Ð ÀÌØíÍ饱¤(%¥´ÀÌØíÍ饱°ÀÌØí¹
½Õ¹ÐôÀ((%1½°ÀÌØí1A
QMQHô±±MÑÉÕÑ
ÉÑ ÅÕ½Ðí¡ÉlÈØÁtÅÕ½Ðì¤(%±±MÑÉÕÑMÑÑ ÀÌØí1A
QMQH°Ä°ÀÌØíÍ饱¤($ÀÌØí¹
½Õ¹Ðô±±
±° ÅÕ½ÐíÍ¡±°Ìȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½ÐíáÑÉÑ%½¹àÅÕ½Ðì°ÅÕ½ÐíÁÑÈÅÕ½Ðì°±±MÑÉÕÑÑAÑÈ ÀÌØí1A
QMQH¤°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°´Ä°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°À°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°À°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°À¤((%IÑÕɸÀÌØí¹
½Õ¹ÑlÁt)¹Õ¹oÝ÷ Ø Ý¶¬¢wÊ.±ë*ºléeßge«¨µ«­¢+ÙÕ¹}A%}áÑÉÑ%½¹à ÀÌØíÍ¥±°ÀÌØí¥%¹à°ÀÌØíÁ1É°ÀÌØíÁMµ±°°ÀÌØí¥%½¹Ì¤(1½°ÀÌØíIÍÕ±Ð((ÀÌØíIÍÕ±Ðô±±
±° ÅÕ½ÐíM¡±°Ìȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½ÐíáÑÉÑ%½¹àÅÕ½Ðì°ÅÕ½ÐíÍÑÈÅÕ½Ðì°ÀÌØíÍ¥±°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÀÌØí¥%¹à°ÅÕ½ÐíÁÑÈÅÕ½Ðì°|(ÀÌØíÁ1É°ÅÕ½ÐíÁÑÈÅÕ½Ðì°ÀÌØíÁMµ±°°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÀÌØí¥%½¹Ì¤(IÑÕɸÀÌØíIÍÕ±ÑlÁt)¹Õ¹(

Time's up for this endevor. I guess it's just not meant to be..

Link to comment
Share on other sites

That's not writing a script, that's just a few lines of code. I never thought it would be that simple. So if a .dll or .exe contains the letters "AVI" (in caps, right) then it might have .avi files? Well that might narrow it down then. I just have millions of .dlls n stuff in my system folder. Wait I'll try this.. brb

**back**

Well it might narrow it down some, but it's not a sure thing..

;~ $file = @SystemDir & "\" & "clusapi.dll"

;~ $file = @SystemDir & "\" & "shell32.dll"
$file = @SystemDir & "\" & "atioglx1.dll"

;~ $file = @SystemDir & "\" & "wmp.dll"
;~ $file = @SystemDir & "\" & "MRT.exe"
$data = FileRead( $file )
MsgBox( 0, '', stringinstr( $data, "AVI" ) )

wmp.dll is now the only one out of those 5 that shows to have "AVI" in it and it had no avi files..

Edited by rush4hire
Link to comment
Share on other sites

That's not writing a script, that's just a few lines of code. I never thought it would be that simple. So if a .dll or .exe contains the letters "AVI" (in caps, right) then it might have .avi files? Well that might narrow it down then. I just have millions of .dlls n stuff in my system folder. Wait I'll try this.. brb

**back**

Well it might narrow it down some, but it's not a sure thing..

;~ $file = @SystemDir & "\" & "clusapi.dll"

;~ $file = @SystemDir & "\" & "shell32.dll"
$file = @SystemDir & "\" & "atioglx1.dll"

;~ $file = @SystemDir & "\" & "wmp.dll"
;~ $file = @SystemDir & "\" & "MRT.exe"
$data = FileRead( $file )
MsgBox( 0, '', stringinstr( $data, "AVI" ) )

wmp.dll is now the only one out of those 5 that shows to have "AVI" in it and it had no avi files..

You didn't read the MSDN link, did you. The FOURCC signature for AVI files is "AVI ". For the learning impaired, that's the letters A, V, I and a space. Hence the name "Four Character Code".

You really need to stop and read the documentation on MSDN so that you understand what you're trying to do. Finding the FOURCC is only part of what you need to do to rip an AVI file out of a resource. If you can't figure that part out, you have 0% chance of doing the other (far more complex) operations it takes.

Auto3Lib: A library of over 1200 functions for AutoIt
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...