TheNorwegianUser Posted March 27, 2012 Posted March 27, 2012 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: expandcollapse popup#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
Moderators Melba23 Posted March 27, 2012 Moderators Posted March 27, 2012 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. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
TheNorwegianUser Posted March 27, 2012 Author Posted March 27, 2012 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. M23Sure, didn't know that Don't remember seing it in the rules
Moderators Melba23 Posted March 27, 2012 Moderators Posted March 27, 2012 TheNorwegianUser,It is in the FAQ. No harm done. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
TheNorwegianUser Posted March 28, 2012 Author Posted March 28, 2012 Well, almost 24 hours Noone knows?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now