Sign in to follow this  
Followers 0
mircea

Splashimageon()

6 posts in this topic

#1 ·  Posted (edited)

Hello guys i have some problem's with this this command. I made a program which has a counter and if the counter reachs to 2 a image will splash and it will ask for a password. My problem is how can i make to be always on top the inputbox (cause if i put the splashimageon() on -1 instead of -2 it will cover the inputbox and the user cannot enter the password) ?

$destination = "eroare.jpg"
        do 
        
        splashImageOn("CFT LOCKER", $destination,@DesktopWidth,@DesktopHeight,-1,-1,-2)
        
        $passwd = InputBox("Enter password", "Cheama tehnicianul de test sa introduca parola.", "", "*",-1,-1,500,500)
        
        until $passwd = iniread("data.ini","data","parola","")
Edited by mircea

Share this post


Link to post
Share on other sites



Hello guys i have some problem's with this this command. I made a program which has a counter and if the counter reachs to 2 a image will splash and it will ask for a password. My problem is how can i make to be always on top the inputbox (cause if i put the splashimageon() on -1 instead of -2 it will cover the inputbox and the user cannot enter the password) ?

$destination = "eroare.jpg"
        do 
        
        splashImageOn("CFT LOCKER", $destination,@DesktopWidth,@DesktopHeight,-1,-1,-2)
        
        $passwd = InputBox("Enter password", "Cheama tehnicianul de test sa introduca parola.", "", "*",-1,-1,500,500)
        
        until $passwd = iniread("data.ini","data","parola","")

I think that GaryFrost answered once at this question:


Learn, learn and ... learn

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Yes but still isn't in top unforttely i have to press ALT TAB. And it dosen't exit the while loop.

I fix the part with the while loop (forgot the command exitloop) but unforttely with the top i didn't fix it

fix that too ... i should put the

splashImageOn("CFT LOCKER", $destination,@DesktopWidth,@DesktopHeight,-1,-1,-1) first and after that $popup

Thank you @realshyfox for the help

Func _Input()
    $popup = GUICreate("Enter Password", 191, 85, -1, -1, $WS_DLGFRAME, $WS_EX_TOPMOST)
    
    $Input_1 = GUICtrlCreateInput("", 0, 0, 180, 20,$ES_PASSWORD)
    $Button_2 = GUICtrlCreateButton("OK", 60, 40, 60, 20)
    $a = iniread("data.ini","data","counter","")
    GUISetState()
    ;HotKeySet("{Enter}"),Enter())
    splashImageOn("CFT LOCKER", $destination,@DesktopWidth,@DesktopHeight,-1,-1,-1)
    While $a >= 2

        $msg2 = GUIGetMsg()
        Select
            Case $msg2 = $Button_2
                if GUICtrlRead($input_1) = $parola Then
                    SplashOff()
                    iniwrite("data.ini","data","counter","0")
                    GUIDelete($popup)
                endif
           ;;;
        EndSelect
    WEnd
  
EndFunc ;==>_Input
Edited by mircea

Share this post


Link to post
Share on other sites

splashImageOn("CFT LOCKER", $destination,@DesktopWidth,@DesktopHeight,-1,-1,-2)

Back to the help file.

The -2 as the optional parameter means nothing here. It should either be 2 or perhaps even 18 if you want the window to be moveable.

Another option would be to change the position of the input box.

And yet another option is to do it all using a custom GUI with the image you want set as the background image for the window then just show/hide the input control.

When you have this type of a problem; don't develop tunnel vision where you focus only on one method. Look at other alternatives.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Sorry i forgot to change that, the settings for the splash image on is -1,-1,-1 (exacly how in the help file it's shown always on top and cannot be movable)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Had I been paying attention I would have noticed you were creating the SplashImage and the Input box approximatly every 275ms by having it inside a loop. Create them before the loop.

Also, having the splash image always on top is exactly what you don't want. It is going to be above the input at all times.

This works fine

SplashImageOn("CFT LOCKER", $destination, @DesktopWidth, @DesktopHeight, -1, -1, 2);; Change the 2 to a 3 if you don't want the splash to be clickable
$passwd = InputBox("Enter password", "Cheama tehnicianul de test sa introduca parola.", "", "*", -1, -1, 500, 500)
While 1
    If $passwd = IniRead("data.ini", "data", "parola", "") Then ExitLoop
WEnd
SplashOff()

EDIT: Sorry, I forgot to set the splash back to desktop size but I'm sure you can handle that.

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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