Sign in to follow this  
Followers 0
TheNorwegianUser

ControlClick

7 posts in this topic

Since i just get a black screen on every webcam script, i'll just use Acer Crystal Eye webcam. But how do i make it click the button, so i ttakes the picture while the window isnt active? When i used the Autoit Info window on the button, nothing showed up on the control area, so any way i can just make it click x and y within that window?

I want it to do it eevery time someone writes the wrong password in this script:

#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <ScrollBarConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <GuiEdit.au3>
#include <Misc.au3>
$1=MouseGetPos(0)
$Password="BlaBla"
While 1
If _IsPressed("1B") Then
  Exit
EndIf
$2=MouseGetPos(0)
If $1<>$2 Then
  ExitLoop
EndIf
Sleep(50)
WEnd


$btn = 6
If $btn = 6 Then
    $Locked = GUICreate("Desktop Locker", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOPMOST)
    GUISetBkColor(0x000000, $Locked)
    $Progress1 = GUICtrlCreateProgress((@DesktopWidth - 400) / 2, @DesktopHeight / 2 + 20, 400, 10)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlCreatePic("lock.gif", 430, 130, 164, 144)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    $WrongPw = GUICtrlCreateEdit("", 10, 14, 300, @DesktopHeight - 14, BitOR($ES_AUTOVSCROLL, $ES_READONLY), 0)
    $InputPw = GUICtrlCreateInput("", @DesktopWidth / 2 - 100, @DesktopHeight / 2 - 10, 200, 20, BitOR($ES_CENTER, $ES_PASSWORD), 0)
    GUICtrlCreateLabel("Desktop Locker", @DesktopWidth / 2 - 125, @DesktopHeight / 2 - 95, 260, 50, $ES_CENTER, 0)
    GUICtrlSetFont(-1, 30, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, 0x000000)
    GUICtrlCreateLabel("Please enter a password to unlock the screen.", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, 0x000000)
    GUICtrlSetFont($WrongPw, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor($WrongPw, 0xFFFFFF)
    GUICtrlSetBkColor($WrongPw, 0x000000)
    GUICtrlSetFont($InputPw, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor($InputPw, 0xFFFFFF)
    GUICtrlSetBkColor($InputPw, 0x000000)
    WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_HIDE)
    GUISetState(@SW_SHOW, $Locked)
    _MouseTrap(@DesktopWidth, @DesktopHeight)
    While 1
        If _IsPressed("0D") Then
            If GUICtrlRead($InputPw) == '' Then
                ToolTip("Forgot your password. Please enter the correct", 509, 375, "", 1, 3)
                ToolTip("")


;Here's where i want it to take a picture.


            ElseIf GUICtrlRead($InputPw) == $Password Then
                For $i = 0 To 100 Step 10
                    GUICtrlSetData($Progress1, $i)
                    Sleep(50)
                Next
                GUISetState(@SW_HIDE, $Locked)
                WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_SHOW)
                _MouseTrap()
                ExitLoop
            Else
                GUICtrlSetData($WrongPw, _RandomMsg() & @CRLF & GUICtrlRead($WrongPw))
                ToolTip("The password is incorrect ..try again.", 509, 375, "", 3, 3)
                GUICtrlSetData($InputPw, "")
    Sleep(1000)
                ToolTip("")
            EndIf
        EndIf
        If Not WinActive("Desktop Locker") Then
            WinActivate("Desktop Locker")
            _MouseTrap(@DesktopWidth, @DesktopHeight)
            GUICtrlCreateLabel("MESS WITH THE BEST DIE LIKE THE REST!", Random(@DesktopWidth - 540), Random(@DesktopHeight - 30), 540, 30)
            GUICtrlSetFont(-1, 20, 800, 0, "MS Sans Serif")
            GUICtrlSetColor(-1, 0xFF0000)
            GUICtrlSetBkColor(-1, 0x000000)
        EndIf
    WEnd
Else
    Exit
EndIf
Func _RandomMsg()
    Local $RandomMsg[13]
    $RandomMsg[0] = "Wrong Password!"
    $RandomMsg[1] = "Keep Out."
    $RandomMsg[2] = "Top Secret."
    $RandomMsg[3] = "Give Up!"
    $RandomMsg[4] = "Don't Touch!"
    $RandomMsg[5] = "Please Enter Correct Password."
    $RandomMsg[6] = "Try Again!"
    $RandomMsg[7] = "Stop pushing my buttons."
    $RandomMsg[8] = "Hahahhahahahha"
    $RandomMsg[9] = "hahhahahahahaahahhahaahhah"
$RandomMsg[10] = "MESS WITH THE BEST DIE LIKE THE REST"
$RandomMsg[11] = "You won't guess it!"
$RandomMsg[12] = "LMAO"
    Return $RandomMsg[Random(13)]
EndFunc   ;==>_RandomMsg

Share this post


Link to post
Share on other sites



suggestions? :oops:

Share this post


Link to post
Share on other sites

TheNorwegianUser,

Please do not bump your own threads within 24 hours. Remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare. You just have to wait until someone who knows something about your particular problem, and is willing to help, comes online. Be patient and someone will answer eventually. :oops:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

TheNorwegianUser,

Please do not bump your own threads within 24 hours. Remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare. You just have to wait until someone who knows something about your particular problem, and is willing to help, comes online. Be patient and someone will answer eventually. :oops:

M23

Sure, didn't know that :bye:

Don't remember seing it in the rules :doh:

Share this post


Link to post
Share on other sites

TheNorwegianUser,

It is in the FAQ. :bye:

No harm done. :oops:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Well, almost 24 hours :oops:

Noone knows? :bye:

Share this post


Link to post
Share on other sites

Bump :oops:

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