Jump to content
Sign in to follow this  
tubadc

Trying to Splash screen but error all the time

Recommended Posts

tubadc

Hi, this is my first post and im try to make a this function 1024 x 768 for Splash screen off... but i always have the "Error in function.2", i dont undertand where is the problem..... could u guys pls help this noob(me).... tks a lot.

Func _SSoff()
    local $X, $Y, $Z, $A

    opt("WinTitleMatchMode", 1)
    WinSetTitle( "Title v1.0", "", "title- " & $title1)
    If Not WinExists( "title- " & $title1) Then _ShowError( "must be on.")

    SplashOff()

    WinActivate("title- " & $title1, "")

    $dll = DllOpen("system.dll")

;~  If @DesktopHeight > 768 And @DesktopWidth > 1024 Then WinMove( "title- " & $title1, "", -4, -11, 1032, 755)

    if @DesktopDepth < 24 then
        _gethelp()
        _ShowError( "Your color depth should be 24bit or 32bit" )
    endif

    If @DesktopHeight > 768 And @DesktopWidth > 1024 Then

        WinMove( "title- " & $title1, "", 0, 0, 1024, 755)

        $Y = 0
        while PixelGetColor( 500, $Y ) <> 0
            $Y = $Y  + 1
        WEnd

;~  721

        $X = 0
        while PixelGetColor( $X, $Y ) <> 0
            $X = $X  + 1
        WEnd

        $Z = $Y + $X

        $Y = $Y - 19

        WinMove( "title- " & $title1, "", -$X, -$Y, 1024 + 2*$X, 721+$Z )

    Else
                                _ShowError( "Error in function.2")

        WinSetState( "title- " & $title1, "", @SW_MAXIMIZE )

        $a = WinGetClientSize( "title-" $title1)

        if $a[0] <> 1024 or $a[1] <> 721 then
            _gethelp()
            _ShowError( "Error in function.1")
        endif

    EndIf


EndFunc  ;==>_SSoff

Share this post


Link to post
Share on other sites
Azu

Variable used without being declared maybe?

Share this post


Link to post
Share on other sites
Starfish41

Line 55 $a = WinGetClientSize( "title-" & $title1)

Line 63 EndIf ;was missing

Have you declared $title1?

Edited by Starfish41

Share this post


Link to post
Share on other sites
tubadc

$title1 is declare like that

Global $title1 = "BOT 1.0B"

I think the problem is the "Else", becouse if i change for "and" it goes with no problem.... but i dont know if its right...

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  

×