friends Posted October 24, 2004 Share Posted October 24, 2004 Hi all. I wonder how to load a picture into AutoIT3 and keep it loading the picture until a mouse button (left) is clicked ? I have tried out the SplashImageOn(), but it does splash. I wanna the picture to be still. Please help... and gimme a simple example. I couldn't find any other command in Help file (or may be I missed out... Thanks Link to comment Share on other sites More sharing options...
Somerset Posted October 24, 2004 Share Posted October 24, 2004 (edited) $destination = @TempDir & "\mySplash.bmp" FileInstall("C:\scenicriv2hires.jpg", $destination) SplashImageOn("Fall", $destination,800,525,-1,-1,1) HotKeySet("{ESC}", "kill") While 1 Sleep(100) WEnd Func kill() SplashOff() Exit 0 EndFunc the above will keep a splashimage on the screen until the escape key is pressed. that is the simplest way i know how. Edited October 24, 2004 by beerman Link to comment Share on other sites More sharing options...
friends Posted October 24, 2004 Author Share Posted October 24, 2004 Thanks for providing a sample.I do not understand the first 2 statements, mind to explain it to me ?Why we need to use FileInstall() ?$destination = @TempDir & "\mySplash.bmp" FileInstall("C:\scenicriv2hires.jpg", $destination) SplashImageOn("Fall", $destination,800,525,-1,-1,1) HotKeySet("{ESC}", "kill") While 1 Sleep(100) WEnd Func kill() SplashOff() Exit 0 EndFuncthe above will keep a splashimage on the screen until the escape key is pressed. that is the simplest way i know how.<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
Somerset Posted October 24, 2004 Share Posted October 24, 2004 (edited) Thanks for providing a sample.I do not understand the first 2 statements, mind to explain it to me ?Why we need to use FileInstall() ?<{POST_SNAPBACK}>that was from a working example. it has to deal with the splashimage, if i wanted to compile the image with the script and use it as a stand alone i have to include it. those two lines ensure that i include the picture at compile time. it also gives a parameter destination call to splashimage also. Edited October 24, 2004 by beerman Link to comment Share on other sites More sharing options...
friends Posted October 24, 2004 Author Share Posted October 24, 2004 that was from a working example. it has to deal with the splashimage, if i wanted to compile the image with the script and use it as a stand alone i have to include it. those two lines ensure that i include the picture at compile time. it also gives a parameter destination call to splashimage also.<{POST_SNAPBACK}>include the picture file at compile time ? AutoIT3 will do that ? Or how toinclude it when compile ?What if the file I wanted to load is already in the system ? Do I need to include that 2 statement as well ? Mind to show coding that WITHOUT that2 statements ? Sorry.... I'm really really new to these. Link to comment Share on other sites More sharing options...
Somerset Posted October 24, 2004 Share Posted October 24, 2004 $destination = @TempDir & "\mySplash.bmp" SplashImageOn("Fall", $destination,800,525,-1,-1,1) HotKeySet("{ESC}", "kill") While 1 Sleep(100) WEnd Func kill() SplashOff() Exit 0 EndFunc $destination = @TempDir & "\mySplash.bmp" is needed to tell splashimageon where the picture is located at. if you don't have that you would have to type in the full path to the location of the image. there are other work arounds. experiment it will teach you heaps. Link to comment Share on other sites More sharing options...
friends Posted October 24, 2004 Author Share Posted October 24, 2004 $destination = @TempDir & "\mySplash.bmp" SplashImageOn("Fall", $destination,800,525,-1,-1,1) HotKeySet("{ESC}", "kill") While 1 Sleep(100) WEnd Func kill() SplashOff() Exit 0 EndFunc$destination = @TempDir & "\mySplash.bmp"is needed to tell splashimageon where the picture is located at. if you don't have that you would have to type in the full path to the location of the image. there are other work arounds. experiment it will teach you heaps.<{POST_SNAPBACK}>Thanks for the helps ! Now I understand the usage of FileInstall() and alsoSplashImageOn(). Really appreciated it..... Link to comment Share on other sites More sharing options...
JLC123 Posted November 18, 2004 Share Posted November 18, 2004 I used the code to pull up a splash at the begining of my script with info the user needs. It works fine, but doesn't move on when [esc] is pressed. It kills not only the splash but the entire program. So, I removed the "EXIT 0" line but then [esc] kills the splash and the script hangs, have to kill it in the tray. What am I doing wrong? FileInstall("C:\temp\splash.bmp", $destination) SplashImageOn("Fall", $destination,355,328,-1,-1,1) HotKeySet("{ESC}", "kill") While 1 Sleep(100) WEnd Func kill() SplashOff() Exit 0 EndFunc Two wrongs don't make a right, but three lefts do Link to comment Share on other sites More sharing options...
scriptkitty Posted November 19, 2004 Share Posted November 19, 2004 (edited) Ya need to move on to next part, maybe like this: $destination="c:\temp.bmp"; added so I could test it. FileInstall("C:\temp\splash.bmp", $destination) SplashImageOn("Fall", $destination,355,328,-1,-1,1) HotKeySet("{ESC}", "kill") $x=1 While $x=1; ends when $x is not 1 Sleep(100) ; delay for endless loop WEnd ; keeps loop going until $x is not 1 Func kill() SplashOff() $x=2; this will stop while endless loop ; Exit 0 EndFunc You had an endless loop, the program did exactly what you told it to do each time. You could alternately do something like this. $destination="c:\temp.bmp"; added so I could test it. FileInstall("C:\temp\splash.bmp", $destination) SplashImageOn("Fall", $destination,355,328,-1,-1,1) HotKeySet("{ESC}", "kill") $x=1 While 1 Sleep(100) ; delay for endless loop if $x=2 then exitloop WEnd Func kill() SplashOff() $x=2; this will tell the if to stop the endless loop and move on. EndFunc Edited November 19, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now