Sign in to follow this  
Followers 0
muhmuuh

Problem with SplashImage

5 posts in this topic

Hi!

I want to splash this image on

http://finance.yahoo.com/q/bc?s=%5eIXIC&t=1d&c=

and I wrote this

InetGet("http://ichart.finance.yahoo.com/b?s=%5EIXIC", @WindowsDir & "\aaaa.jpg", 1)
$destination = @WindowsDir & "\aaaa.jpg"
SplashImageOn("Splash Screen", $destination)
Sleep(3000)
SplashOff()
FileDelete(@WindowsDir & "\aaaa.jpg")

It downloads it but doesn't splash it :)

When I download it manually and save it as jpg there is no problem

Any ideas?

Thanks


I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Your problem is that "http://ichart.finance.yahoo.com/b?s=%5EIXIC" is not a jpg image. It is a png image. That is why it isn't working.

I wrote this:

Dim $s_ImagePathPNG = @ScriptDir & "\aaaa.png"
Dim $s_ImagePathBMP = @ScriptDir & "\aaaa.bmp"
InetGet("http://ichart.finance.yahoo.com/b?s=%5EIXIC",$s_ImagePathPNG, 1)
RunWait('PNG2BMP.EXE "' & $s_ImagePathPNG & '"',@ScriptDir,@SW_HIDE)
SplashImageOn("Splash Screen", $s_ImagePathBMP,512,288)
Sleep(3000)
SplashOff()
FileDelete($s_ImagePathPNG)
FileDelete($s_ImagePathBMP)

Works for me. I used PNG2BMP to convert the image from a Portable Network Graphic to a Bitmap image that could be interpreted by Autoit. I bet there is a way you can do this natively using AutoItLib by PaulIA as well.

PNGtoBMP can be found on this page: http://cetus.sakura.ne.jp/softlab/b2p-home/

Direct link to download is here: http://cetus.sakura.ne.jp/softlab/b2p-home...ves/b2p162w.zip

Extract PNG2BMP.EXE from the zip file above and place it in the same folder as the script and it should work.

- The Kandie Man ;-)

Edited by The Kandie Man

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

Thank you The Kandie Man, but I am trying to splash it without using other programs.


I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.

Share this post


Link to post
Share on other sites

Then use FileInstall()

Share this post


Link to post
Share on other sites

Using PaulIA's Auto3Lib:

#include <A3LGDIPlus.au3>
Dim $s_ImagePathPNG = @ScriptDir & "\aaaa.png"
Dim $s_ImagePathBMP = @ScriptDir & "\aaaa.bmp"
Dim $h_PNGFileObject
InetGet("http://ichart.finance.yahoo.com/b?s=%5EIXIC",$s_ImagePathPNG, 1)

;~ Beginning the use of PaulIA's Auto3Lib to convert PNG to BMP
_GDIP_StartUp()
$h_PNGFileObject = _GDIP_ImageLoadFromFile($s_ImagePathPNG)
_GDIP_ImageSaveToFile($h_PNGFileObject, $s_ImagePathBMP)
_GDIP_ImageDispose($h_PNGFileObject)
_GDIP_ShutDown()
;~ End of using PaulIA's library

SplashImageOn("Splash Screen", $s_ImagePathBMP,512,288)
Sleep(3000)
SplashOff()

FileDelete($s_ImagePathBMP)
FileDelete($s_ImagePathPNG)

Download Auto3Lib here:

http://www.autoitscript.com/forum/index.ph...st&p=243973

Then use Zedna/Big Daddy's fix to install it:

http://www.autoitscript.com/forum/index.ph...st&p=394380

Yeah, that should do it. No complaining.

- The Kandie Man ;-)


"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

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