Jump to content

Run splash screen concurrently?


Recommended Posts

I have a program I am working on. I would like to have a splash screen fade in, hold for a bit, then fade out. However, the script needs to continue running during this time, as I cant wait these few seconds to begin. What do you think would be the easiest way to get this splash screen to run concurrently with the rest of the script? Also, using the following code:

Opt("WinTitleMatchMode", 2); Match substring

$SplashImage = "Splash.jpg"
$SplashX = 974
$SplashY = 210

SplashImageOn("Splash Screen", $SplashImage,$SplashX,$SplashY,@DesktopWidth-$SplashX,@DesktopHeight-$SplashY-30,1)
For $i = 0 to 255 step 5
WinSetTrans("Splash Screen", "", $i)
Sleep(1)
Next
Sleep(3000)
For $i = 255 to 0 step -5
WinSetTrans("Splash Screen", "", $i)
Sleep(1)
Next
SplashOff()

It 'blinks' in the beginning and end. I understand why though, but is there any other, easy way to do this? I'm stuck!

Link to comment
Share on other sites

I have a program I am working on. I would like to have a splash screen fade in, hold for a bit, then fade out. However, the script needs to continue running during this time, as I cant wait these few seconds to begin. What do you think would be the easiest way to get this splash screen to run concurrently with the rest of the script? Also, using the following code:

Opt("WinTitleMatchMode", 2); Match substring

$SplashImage = "Splash.jpg"
$SplashX = 974
$SplashY = 210

SplashImageOn("Splash Screen", $SplashImage,$SplashX,$SplashY,@DesktopWidth-$SplashX,@DesktopHeight-$SplashY-30,1)
For $i = 0 to 255 step 5
WinSetTrans("Splash Screen", "", $i)
Sleep(1)
Next
Sleep(3000)
For $i = 255 to 0 step -5
WinSetTrans("Splash Screen", "", $i)
Sleep(1)
Next
SplashOff()

It 'blinks' in the beginning and end. I understand why though, but is there any other, easy way to do this? I'm stuck!

Make a seperate script for your main func. The old 1 is just for displaying splash screen.

Use file install()

When you run the new 1, it runs the old 1 and the new 1 will be in process too.

FileInstall to temp or somewhere

Link to comment
Share on other sites

I was thinking of having a seperate script run it. Is there any way to use a simple run command to run a .au3 while im testing it? Also, what is the easiest way to have the .exe it extracts and runs delete itself when its done?

Link to comment
Share on other sites

I was thinking of having a seperate script run it. Is there any way to use a simple run command to run a .au3 while im testing it? Also, what is the easiest way to have the .exe it extracts and runs delete itself when its done?

FileInstall("Your source of Splash.exe",@Temp) ;To Temp folder
If $ProcessExists=ProcessExists("Splash.exe")=0 Then
FileDelete();Delete from the Temp folder

I am just giving you some ideas but the code is not like that.

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...