Jump to content

PowerSlide2Unlock


AppTux
 Share

Recommended Posts

I like it, but because you used the old version, I don't see a Access Denied or Access Granted image...

If you can implement your method of password in the new version, then will it be nice, but I still prefer my way.

You can use both ways, but then just make a .ini file and set in the .ini which method you prefer to use.

That's possible, but then I run into the problem that the program can become too heavy and too much options.

I like more easy, simple and simple to use programs.

Or make a special edition for who prefer your way :)

If you can make your version in the newest version, I'm sure I'll add it to the main post and - of course - add your credits :)

PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.
Link to comment
Share on other sites

  • Replies 44
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

On my pc the password gui isn't flashing anytime...

I don't know how it comes it is by you.

EDIT:maybe can it be your specs of your computer, don't know...

Btw, the Opt('GUICloseOnESC', 0) isn't necessary, I already tested it out...

Without this code is it impossible:

While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd

Sorry for the hard to read code, because I just typed it in my browser :)

If I don't use the Case $GUI_EVENT_CLOSE line, it won't stop if you press ESC

Edited by AppTux
PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.
Link to comment
Share on other sites

Odd that the GUI would flash for you.. I don't have that problem.

I might add it, like I said, I was just messing around and tried it out :)

MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Link to comment
Share on other sites

Lol, I had a look-a-like idea for that method of typing the password, but I haven't chosen it because a inputbox is way easier than clicking.

I wanted to make 4 images, and if you click on it, the digit goes up with 1. But that's a lot work if you have the password 9999 :)

PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.
Link to comment
Share on other sites

@AppTux: topic-code now has a pwd-field, but it flickers very feqent so that its hard to type in something...

and again only the mainscreen is locked. another thing i would change is the width of the slider.

i have a 1920 resolution, slider is too long.

Link to comment
Share on other sites

I still don't know what the issue is of the password field flickering, but the width of the slider fits perfectly on my PC and I don't have problems with it. If too many people say the slider is too big, then I'm gonna make 2 versions for different resolutions. :)

Btw, if you remove this code, is the flickering gone???

If $PwdOpen = 0 Then
    If Not WinActive($MGUI, "") Then WinActivate($MGUI, "")
Else
    If Not WinActive($PwdGui, "") Then
        WinActivate($PwdGui, "")
        ConsoleWrite("$PwdGui activated" & @CR)
    EndIf
EndIf

If you remove this code, the window won't stay always on top anymore.

But it could be possible that the flickering is gone then..

PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.
Link to comment
Share on other sites

Hey Tux, I added in a password function into your new one (I kept the same method of yours, where you type it in on the keyboard)

I removed a few things that were causing the GUI to flicker non-stop on my screen, as you suggested in your post above it was the WinActive section.

Here is the code.

#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <WindowsConstants.au3>
#include <GuiConstantsEx.au3>
#include <GUIEdit.au3>
#include <StaticConstants.au3>
#include <String.au3>
#include <WinAPI.au3>
#include <Timers.au3>

Global $SW = @DesktopWidth, $SH = @DesktopHeight, $Digit1, $Digit2, $Digit3, $Digit4

$Password = Inputbox("Password", "Please input a four digit password..", "", "*")

$PasswordDigit1 = StringMid($Password, 1,1)
$PasswordDigit2 = StringMid($Password, 2,1)
$PasswordDigit3 = StringMid($Password, 3,1)
$PasswordDigit4 = StringMid($Password, 4,1)


$MGUI = GUICreate("WindowSlideToUnlock", $SW, $SH, 0, 0, $WS_POPUP, $WS_EX_TOPMOST)
GUISetBkColor(0x000000, $MGUI)
$TOPBACK = GUICtrlCreatePic("Data\s2u-b-b.bmp", 0, 0, $SW, 50)
$BOTTOMBACK = GUICtrlCreatePic("Data\s2u-u-b.bmp", 0, $SH - 250, $SW, 250)
$BARLEFT = GUICtrlCreatePic("Data\s2u-b-l.bmp", 197.5, $SH - 151, 21, 52)
$BARMIDDLE = GUICtrlCreatePic("Data\s2u-b-m.bmp", 218.5, $SH - 151, $SW - 437, 52)
$BARRIGHT = GUICtrlCreatePic("Data\s2u-b-r.bmp", $SW - 223.5, $SH - 151, 21, 52)
$BARLABEL = GUICtrlCreateLabel("Fill in Password", 200, $SH - 151, $SW - 400, 52, $SS_NOTIFY & $SS_CENTER)
$TIME = GUICtrlCreateLabel("", ($SW - 100) /2, 2, 100, 45, $SS_NOTIFY & $SS_CENTER)
$ARROW = GUICtrlCreatePic("Data\s2u-b-sign.bmp", ($SW - 35) /2,$SH -250,35,35)

_SETSTATEANDFONT()

_SETTHETIME()

WinSetTrans($MGUI, "", 0)

;---Create overlay window so you can't touch the window behind
$OVERLAY = GUICreate("Overlay",$SW,$SH - 300,0, 50, $WS_POPUP, $WS_EX_TOPMOST, $MGUI)
WinSetTrans($OVERLAY, "",1)

GUISetState(@SW_SHOW, $OVERLAY)

$TOPRGN = _WinAPI_CreateRectRgn(0,0,$SW,50)
$BOTTOMRGN = _WinAPI_CreateRectRgn(0,$SH - 250,$SW, $SH)
_WinAPI_CombineRgn($TOPRGN, $TOPRGN, $BOTTOMRGN,$RGN_OR)
_WinAPI_SetWindowRgn($MGUI,$TOPRGN)

GUISetState(@SW_SHOW, $MGUI)

$PwdGui = GUICreate("Password input",250,100,-1,$SH - 348, $WS_POPUP, $WS_EX_TOPMOST, $MGUI)
GUISetBkColor(0x000000,$PwdGui)
$PwdBack = GUICtrlCreatePic("Data\s2u-p-b.bmp",0,0,250,100, $GUI_DISABLE)
$PwdInput = GUICtrlCreateInput("", 25,10,200,60, BitOR ($ES_PASSWORD,$SS_CENTER,$SS_CENTERIMAGE))
GUICtrlSetLimit (-1,4)
GUICtrlSetBkColor (-1,0xFFFFFF)
GUICtrlSetFont (-1, 35-1,"","Lucida Sans")
GUICtrlSetColor (-1, 0x000000)
WinSetTrans("Password input","",250)
GUISetState(@SW_Show, $PwdGui)

$wSlide = GUICreate("HH", 60, 45, 200, $SH - 147.5, $WS_POPUP, $WS_EX_TOPMOST, $MGUI)
$slider = GUICtrlCreatePic("Data\s2u-b-u.bmp", 0, 0, 60, 45)
WinSetTrans($wSlide,"",0)
GUISetState(@SW_HIDE, $wSlide)

For $TRANS = 0 To 250 Step 15
    WinSetTrans($wSlide, "", $TRANS)
    WinSetTrans($MGUI, "", $TRANS)
    If $TRANS >= 250 Then
        ExitLoop
    EndIf
Next

WinSetTrans($MGUI, "", 250)

While 1
    If StringLen(GUICtrlRead($PwdInput)) = 4 Then
        $PasswordInputDigits = GuiCtrlRead($PwdInput)
        $PasswordDigitAttempt1 = StringMid($PasswordInputDigits, 1,1)
        $PasswordDigitAttempt2 = StringMid($PasswordInputDigits, 2,1)
        $PasswordDigitAttempt3 = StringMid($PasswordInputDigits, 3,1)
        $PasswordDigitAttempt4 = StringMid($PasswordInputDigits, 4,1)
        If $PasswordDigit1 = $PasswordDigitAttempt1 Then
            $Digit1 = 1
        Else
            GuiCtrlSetData($PwdInput, "")
            $PasswordInputDigits = ""
            $PasswordDigitAttempt1 = ""
            $PasswordDigitAttempt2 = ""
            $PasswordDigitAttempt3 = ""
            $PasswordDigitAttempt4 = ""
                EndIf
            If $PasswordDigit2 = $PasswordDigitAttempt2 Then
                $Digit1 = 2
                        Else
            GuiCtrlSetData($PwdInput, "")
            $PasswordInputDigits = ""
            $PasswordDigitAttempt1 = ""
            $PasswordDigitAttempt2 = ""
            $PasswordDigitAttempt3 = ""
            $PasswordDigitAttempt4 = ""
                EndIf
                If $PasswordDigit3 = $PasswordDigitAttempt3 Then
                    $Digit1 = 3
                            Else
            GuiCtrlSetData($PwdInput, "")
            $PasswordInputDigits = ""
            $PasswordDigitAttempt1 = ""
            $PasswordDigitAttempt2 = ""
            $PasswordDigitAttempt3 = ""
            $PasswordDigitAttempt4 = ""
                    EndIf
                    If $PasswordDigit4 = $PasswordDigitAttempt4 Then
                        $Digit1 = 4
                                Else
            GuiCtrlSetData($PwdInput, "")
            $PasswordInputDigits = ""
            $PasswordDigitAttempt1 = ""
            $PasswordDigitAttempt2 = ""
            $PasswordDigitAttempt3 = ""
            $PasswordDigitAttempt4 = ""
                    EndIf
                    If $Digit1 = 4 Then
        If GUICtrlRead($BARLABEL) <> "Slide To Unlock" Then
            GUICtrlSetData($BARLABEL,"Slide To Unlock")
            GUISetState(@SW_SHOW, $wSlide)
            GUISetState(@SW_HIDE, $PwdGui)
        EndIf
    Else
        If GUICtrlRead($BARLABEL) <> "Fill in Password" Then
            GUICtrlSetData($BARLABEL,"Fill in Password")
            GUISetState(@SW_HIDE, $wSlide)
        EndIf
    EndIf
    EndIf
    _SETTHETIME()
    $MINFO = GUIGetCursorInfo($wSlide)
    $hMsg = GUIGetMsg()
If $hMsg = $GUI_EVENT_CLOSE Then
        Exit
    EndIf
    If $MINFO[4] = $slider Then
        $POS = 1
        $MINFO = GUIGetCursorInfo($wSlide)
        While $MINFO[4] = $slider
            $MINFO = GUIGetCursorInfo($wSlide)
            If $MINFO[2] = 1 Then
                $MINFO = GUIGetCursorInfo($wSlide)
                $MPOS = MouseGetPos()
                ConsoleWrite($MPOS[0] & @CRLF)
                $CONTROLPOS = $MPOS[0] - 200
                While $MINFO[2] = 1
                    $MINFO = GUIGetCursorInfo($wSlide)
                    $POS = MouseGetPos()
                    $POS = $POS[0] - $CONTROLPOS
                    If $POS <= 200 Then
                        WinMove("HH", "", 200, $SH - 147.5)
                    ElseIf $POS >= $SW - 265 Then
                        WinMove($wSlide, "", $SW - 265, $SH - 147.5)
                        _Timer_SetTimer($MGUI,1000, _SLIDEFULL(),-1)
                    Else
                        WinMove("HH", "", $POS, $SH - 147.5)
                    EndIf
                    Sleep(5)
                WEnd
                Do
                    WinMove("HH", "", $POS, $SH - 147.5)
                    $POS = $POS - 40
                    Sleep(5)
                Until $POS <= 200
                WinMove("HH", "", 200, $SH - 147.5)
            EndIf
            Sleep(10)
        WEnd
    EndIf
    Sleep(1)
WEnd

Func _SETSTATEANDFONT()
    GUICtrlSetColor($BARLABEL, 0x373737)
    GUICtrlSetBkColor($BARLABEL, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont($BARLABEL, 21, 400, "", "Lucida Sans")
    GUICtrlSetBkColor($TIME, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont($TIME, 20, 400, "", "Lucida Sans")
    GUICtrlSetColor($TIME, 0xFFFFFF)

    For $X = $TOPBACK To $BARRIGHT
        GUICtrlSetState($X, $GUI_DISABLE)
    Next
EndFunc   ;==>_SETSTATEANDFONT

Func _SETTHETIME()
    $MIN = @MIN
    $HOUR = @HOUR
    $T = GUICtrlRead($TIME)
    If $T <> $HOUR &":"& $MIN Then
        GUICtrlSetData($TIME, $HOUR&":"&$MIN)
    EndIf
EndFunc   ;==>_SETTHETIME

Func _SLIDEFULL()
    If GUICtrlRead($PwdInput) = $Password Then
        GUISetState(@SW_HIDE, $PwdGui)
        $TRANS = 250
        For $TRANS = 250 To 0 Step -25
            WinSetTrans($wSlide, "", $TRANS)
            WinSetTrans($MGUI, "", $TRANS)
            ConsoleWrite($TRANS&@CR)
            If $TRANS <= 0 Then
                ExitLoop
            EndIf
        Next
        Exit
    Else
        GUICtrlSetBkColor($PwdInput,0xbb0000)
    EndIf
EndFunc   ;==>_SLIDEFULL

Just like it my previous one it opens an inputbox at the start of the script.

MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Link to comment
Share on other sites

Good work :) , but I'll recommend to let the password GUI also fade in, just add this code to the script:

After the password Gui is made, add this code:

WinSetTrans($PwdGui, "", 0)

And in the fade in loop:

WinSetTrans($PwdGui, "", $TRANS)

One remark: Why do you split the password, and in the loop, if the length is 4 digits, then check every single digit, and turn the slider on???? That's so... useless I think. :)

Maybe you just save the password in a variable, and use GUICtrlRead() to read the password input, and compare the password variable and the string what's just read??? That makes difference in code length and speed I think... I'll post the modified code soon, I'm not always busy with PS2U, I've done a time nothing with it because I'm busy with other programs.. :P

PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.
Link to comment
Share on other sites

I guess you could do that.. I never really thought of it, its just a way I thought of doing it, lol.

No bigger either way :)

MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Link to comment
Share on other sites

  • 2 weeks later...

My_Space_Window_Lock.au3

Try this!!! I took your code and added it with 2 other codes from this forum.

Not sure who done the Space theme but I liked it enough to add it to your script.

Looks nice

Sorry I could not upload the sounds. Wish I could had.

It was voices saying to enter password and a voice for Activated

Download full version here with sound

http://hotfile.com/dl/111436247/ac96fb3/Space_Window_Lock.rar.html

Extract and run the .exe

Edited by FastJMAN1
Link to comment
Share on other sites

Like the space but one problem: When I hover the slider, the space pauses. It only resumes when you leave the slider.

But I still prefer the transparent windows. I still want to make some options for password, and a option if you want to use the desktop view or a (animated) wallpaper. You have me interested in a animated wallpaper, and maybe am I going to use animated wallpapers. But nothing is for sure.

PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.
Link to comment
Share on other sites

Yes, the animated wallpaper is what I was trying to make, I also have thought of putting buttons on bottom half of it that can be linked to Icons on the desktop or where ever (C:\Programs\) and just use it instead of the desktop. We are kind on the beginning of making our own desktop with animation. WOW, Autoit is very powerful at times.

Edited by FastJMAN1
Link to comment
Share on other sites

Very good program :)

[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:

%programfiles%/AutoIt3/autoit3.chm
Link to comment
Share on other sites

FastJMAN1,

One remark: This is meant as a screen lock and not as a desktop replacement.

If you want to make a desktop replacement I don't think it's that handy: How about the menu start, huh???? :)

shanet,

Thanks! :P

PS: This is and will always be a screen lock. :)

PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.
Link to comment
Share on other sites

FastJMAN1,

One remark: This is meant as a screen lock and not as a desktop replacement.

If you want to make a desktop replacement I don't think it's that handy: How about the menu start, huh???? :)

shanet,

Thanks! :P

PS: This is and will always be a screen lock. :)

AppTux,

When you run my version try the mouse wheel on the space background.

Yah, I understand everything you are saying about the space freezes when mouse grabes the lock but it was the only way I knew how to combind both scripts together and still have them work at all. I also had to make a GUI hole in your background just so that the space one could be seen. It worked without the hole on Windows 7 but when I got to work and tried it on XP, it did not work so I cut a hole. Now it works on both systems.

Hay, I'm all for your script being a windows lock, you did a great job on it. I was just trying to bring a little something else to the table.

Best Regards,

FastJMAN1

Link to comment
Share on other sites

FastJMAN1,

Why you had to cut a hole in the GUI? You can just replace the Overlay Window with your space window... I think you used the older version with just a screen shot, the new version has a Overlay Window with transparency of 1... I think if you used the newer version, you hadn't that much work. But that's just after you made it.

PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.
Link to comment
Share on other sites

FastJMAN1,

Why you had to cut a hole in the GUI? You can just replace the Overlay Window with your space window... I think you used the older version with just a screen shot, the new version has a Overlay Window with transparency of 1... I think if you used the newer version, you hadn't that much work. But that's just after you made it.

You are correct I got the old one, my bad. I like the new one better. But, The reason I had to cut the hole was because on windows XP was not showing the space but on Windows 7 was showing it. The idea to combine a lot scripts together was just an idea I had to show that a lot of things are possible in Autoit.

Hay maybe you can help me with another issue I'm having.

One of my biggest issues has been trying to make a animated .gif remain animated while moving across the desktop.

For some reason just like the space stops moving when you give control to the slidder in your script a animated .gif also stops animating when WinMove() is called to move the window. The movement happens but the .gif stops animation.

To All,

Thanks a lot for your work and help...

Here are the resources of my other issue...

http://hotfile.com/dl/111880176/5e55fc7/Animated_gif_moves.rar.html

Extract the rar file and keep pictures in the same directory as script.

I have about 478 includes if anyone needs some...LOL

Edited by FastJMAN1
Link to comment
Share on other sites

FastJMAN1,

I would recommend the Graphical User Interface (GUI) Help and Support forum.

Edit: Removed some includes of your code, now can I look at it. It's logical: The WinMove() Function is called. You ever seen a multifunctional script??? I haven't. It's running the WinMove() function. I'm not sure, but there must be a function which animates the image, but that can't run because the WinMove() function is already running. You understand???

PS: Please, please post working code without I have to download several includes. That's way easier for people who haven't. :)

Edited by AppTux
PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.
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...