Search the Community

Showing results for tags 'login'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Chat
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • Forum
  • AutoIt


  • Community Calendar

Found 16 results

  1. Here is a complete example of combining Autoit with PHP and MySQL was written by me. Include: Sign in, sign out.Create, read, update and delete data between client (AutoIt) and server (PHP/MySQL).Only allow user to log into a client at the same time. Video demo: Screenshot (Main GUI) Usage If you want to test on your computer, you will need to create a localhost. I recommend to use WAMP or XAMPP. First, create a new database by importing from SETUP.sql file (see video for more info). Then, edit your path to SERVER in AutoIt-PHP-MySQL.au3: Global Const $SERVER = 'http://localhost/AutoIt/index.php?act='Make sure you have copied all files in the folder "PHP + MySQL" into a folder named AutoIt in your Localhost (www or htdocs directory). Yeah, now you can open the file "AutoIt-PHP-MySQL.au3" and try it yourself! Default username and password is: admin Download: Tutorial-AutoIt-PHP-MySQL-v1.0.rar[Tutorial] AutoIt - PHP - MySQL (Thank @JohnOne for having suggested using zip format)Changelog ----- Hope you enjoyed it!
  2. Hi, after I recognized that some of my scripts fail if they are at windows startup I researched for a solution. Problem could be fixed if I wait about 120 seconds after login. So how to measure this? #include-once #include <AD.au3> #include <Date.au3> ; #FUNCTION# ==================================================================================================================== ; Name ..........: _SecondsAfterLogin ; Description ...: Returns how many seconds are gone since last login ; Syntax ........: _SecondsAfterLogin() ; Parameters ....: None ; Return values .: Success - Integer of seconds ; Failure - 0, sets @error to 1 ; Author ........: Conrad Zelck ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: Yes ; =============================================================================================================================== Func _SecondsAfterLogin() Local $sDate Local $iSec $sDate = __GetLogonTime() ; UTC If @error Then $sDate = __GetLogonTime_AD() ; local time If @error Then Return SetError(1, 0, 0) Else $sDate = __LocalTime($sDate) ; UTC to local time EndIf $iSec = __TimeDifference($sDate) Return $iSec EndFunc #region - INTERNAL_USE_ONLY Func __GetLogonTime($sUserName = @UserName, $sComputerName = @ComputerName) ; Idea by trancexx: Local $aRet = DllCall("netapi32.dll", "long", "NetUserGetInfo", "wstr", $sComputerName, "wstr", $sUserName, "dword", 11, "ptr*", 0) If @error Or $aRet[0] Then Return SetError(1, 0, 0) Local $sSeconds = DllStructGetData(DllStructCreate("ptr;ptr;ptr;ptr;dword;dword;dword;ptr;ptr;dword;dword;dword;dword;ptr;dword;ptr;dword;dword;byte;dword", $aRet[4]), 10) DllCall("netapi32.dll", "long", "NetApiBufferFree", "ptr", $aRet[4]) Local $sLastLogon = _DateAdd('s', Number($sSeconds), "1970/01/01 00:00:00") Return $sLastLogon EndFunc Func __GetLogonTime_AD() Local $iSuccess = _AD_Open() If $iSuccess = 1 Then Local $sDate = _AD_GetLastLoginDate() $sDate = __NumberDate_StringDate($sDate) _AD_Close() Return $sDate Else Return SetError(1, 0, 0) EndIf EndFunc Func __NumberDate_StringDate($sDate) Local $y, $m, $d, $h, $min, $s $y = StringMid($sDate,1, 4) $m = StringMid($sDate,5, 2) $d = StringMid($sDate,7, 2) $h = StringMid($sDate,9, 2) $min = StringMid($sDate,11, 2) $s = StringMid($sDate,13, 2) $sDate = $y & "/" & $m & "/" & $d & " " & $h & ":" & $min & ":" & $s Return $sDate EndFunc Func __LocalTime($sDate) Local $aTimeZone = _Date_Time_GetTimeZoneInformation() If $aTimeZone[0] <> 2 Then $iTimeZoneOffset = ($aTimeZone[1]) * -1 Else $iTimeZoneOffset = ($aTimeZone[1] + $aTimeZone[7]) * -1 EndIf $iTimeZoneOffset /= 60 ; in hours Local $sHour = StringMid($sDate, 12, 2) $sHour += $iTimeZoneOffset $sDate = StringLeft($sDate, 11) & $sHour & StringRight($sDate, 6) Return $sDate EndFunc Func __TimeDifference($sDate) Local $sNow = _NowCalc() Local $sDiff = _DateDiff("s", $sDate, $sNow) Local $iDiff = Number($sDiff) Return $iDiff EndFunc #endregion - INTERNAL_USE_ONLY I had to look what kind of login it is. Some of my computers are logging in with active directory and other not. Here is an example: #include <SecondsAfterLogin.au3> Local $iSec = _SecondsAfterLogin() MsgBox(0, '', "Time since last login: " & _HHMMSS($iSec, "s")) Exit Func _HHMMSS($iTime, $sType = "ms") If $sType = "s" Then Local $sHHMMSS = StringFormat("%.2d:%.2d:%.2d", (Floor($iTime / 3600)), (Floor(Mod($iTime,3600) / 60)), (Mod(Mod($iTime,3600),60))) Else Local $sHHMMSS = StringFormat("%.2d:%.2d:%.2d", (Floor($iTime / 3600000)), (Floor(Mod($iTime,3600000) / 60000)), (Mod(Mod($iTime,3600000),60000) / 1000)) EndIf Return $sHHMMSS EndFunc I hope someone find it useful. Regards, Conrad P.S. Review is welcome.
  3. Hi, I wanted to use _GetLogonTime() by guinness ( #include <Date.au3> #include <Array.au3> ConsoleWrite(_GetLogonTime() & @LF) Func _GetLogonTime($sUserName = @UserName, $sComputerName = @ComputerName) ; Idea by trancexx: Local $aRet = DllCall("netapi32.dll", "long", "NetUserGetInfo", "wstr", $sComputerName, "wstr", $sUserName, "dword", 11, "ptr*", 0) _ArrayDisplay($aRet) If @error Or $aRet[0] Then Return SetError(1, 0, False) Local $sHours = DllStructGetData(DllStructCreate("ptr;ptr;ptr;ptr;dword;dword;dword;ptr;ptr;dword;dword;dword;dword;ptr;dword;ptr;dword;dword;byte;dword", $aRet[4]), 18) DllCall("netapi32.dll", "long", "NetApiBufferFree", "ptr", $aRet[4]) Return _DateAdd("h", "-" & $sHours, _NowCalc()) EndFunc ;==>_GetLogonTime It always returns false. I displayed $aRet: [0]|2221 [1]|mycomputer [2]|myuser [3]|11 [4]|0x0000000000000000 $aRet[4] shouldn't be 0x0000000000000000 right? Any help? Regards, Conrad
  4. Hi, I am trying to log into using AutoIt. There are several examples, but none of them work with the current webpage. This is my code (because the username and password are not valid ;-) , I comment the "button click" out.): #include <IE.au3> Local $oIE = _IECreate("") _IELoadWait ($oIE) _IELinkClickByText($oIE, "Sign in") $o_form = _IEFormGetObjByName ($oIE, "f1") $o_login = _IEFormElementGetObjByName ($o_form, "loginfmt") $o_password = _IEFormElementGetObjByName ($o_form, "passwd") $o_signin = _IEFormElementGetObjByName ($o_form, "idSIButton9") $username = "" $password = "testpassword" _IEAction ($o_login, "focus") _IEFormElementSetValue ($o_login, $username) _IEFormElementSetValue ($o_password, $password) ;_IEAction ($o_signin, "click") When I run the code I get the following: The value being set is garbeled with "PlaceholderText". Because of this, the username and password are invalid. Here screenhot of the placeholders text: When you start typing in one of the fields, the placeholder text is automatically deleted. When you set a value it stays. I found a workaround, to set focus on the element and send the username as an keyboard input to the field, but I would like a clean solution based on variables. So, does anyone now how to do this?
  5. Hi, I would like to make a login script with SQLite. The database looks like this: _SQLite_Exec(-1, "CREATE TABLE Users (id INT(8) NOT NULL, username VARCHAR(30) NOT NULL, password VARCHAR(255) NOT NULL, permission INT(8) NOT NULL, PRIMARY KEY (id)); CREATE UNIQUE INDEX 'user_name_unique' ON 'Users' ('username' );") _SQLite_Exec(-1, "INSERT INTO Users(id, username, password, permission) VALUES ('0', 'default', 'password', '0');") theoretically I should make a query in this way, right? _SQLite_Query (-1, "SELECT id FROM Users WHERE username = '" & $ Recv [1] & "' AND password = '" & $ Recv [2] & "';", $ hQuery) but then I do not know how to know if you have found the 'id'
  6. i have a list of usernames and passwords in an excel file (row 1 : username1, password1, row 2 : username2, password2 ... likewise) the work (login, do some work, log out, login with second user, do same work, log out.. likewise) is same for each user. how do i create a script with that?
  7. Hi guys, i was use that, to know "Username" is create or not,etc. but i have problem #include <IE.au3> #include <INet.au3> #include <String.au3> signIn() Func signIn () Global $oIE = _IECreate ("") Local $username = _IEGetObjByName ($oIE,"username") Local $password = _IEGetObjByName ($oIE,"passwd") Local $btn = _IEGetObjByName ($oIE,"signin") _IEFormElementSetValue ($username,"AsdfavsdASWddsaA") _IEFormElementSetValue ($password,"123456") _IEAction ($btn,"click") $url = "" $first = '<html>' $end = '</html>' $read = _StringBetween(_INetGetSource($url), $first, $end) If $read[0] == "This ID is not yet taken." Then MsgBox (16,"","This ID is not create yet!") Else MsgBox (16,"","This ID was created!") EndIf EndFuncPlease help i'll be die with errors
  8. Hi, im trying to make a small facebook messenger, but normally that i have problem since im here How to get all friend and chat with them ? over TCP or UDP ? And now window is not hidden but in future will be and process too. Im not so good in explaining things but here is code #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIListBox.au3> #include <IE.au3> Global $window = _IECreate('', 0, 0, 1), $Form1, $login, $email, $password, $stayLogged Local $oWbn = _IEGetObjById($window, "pagelet_welcome_box") If IsObj($oWbn) = 0 Then ;~ MsgBox(0, '', 'not logged') $Form1 = GUICreate("Facebook messenger", 359, 210, 338, 218) GUICtrlCreateGroup("", 10, 8, 337, 137) GUICtrlSetFont(-1, 10, 800, 0, "Calibri") GUICtrlCreateLabel("Email :", 64, 36, 40, 19) $email = GUICtrlCreateInput("", 107, 32, 217, 23) GUICtrlCreateLabel("Password :", 41, 73, 63, 19) $password = GUICtrlCreateInput("", 107, 70, 217, 23, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD)) $stayLogged = GUICtrlCreateCheckbox("Stay logged", 107, 104, 97, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $login = GUICtrlCreateButton("Login", 10, 156, 337, 41) GUICtrlSetFont(-1, 12, 800, 0, "Calibri") GUISetState(@SW_SHOW) Else GUIDelete($Form1) ; if already logged in show other form ;~ MsgBox(0, '', 'logged in') $Form2 = GUICreate("Facebook Chat", 448, 466, 299, 146) $friendlist = GUICtrlCreateList("", 16, 16, 417, 266) $chatwindow = GUICtrlCreateList("", 16, 296, 417, 97) $text = GUICtrlCreateInput("", 16, 392, 417, 21) $sendBtn = GUICtrlCreateButton("Send", 360, 424, 75, 25) $logout = GUICtrlCreateButton("Logout", 16, 424, 75, 25) GUISetState(@SW_SHOW) EndIf While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $login _checkLogin() Case $sendBtn _sendMsg() EndSwitch WEnd ; check login Func _checkLogin() If IsObj($oWbn) = 0 Then ; if not logged in ; check if empty fields If GUICtrlRead($email) == '' Or GUICtrlRead($password) == '' Then MsgBox(64, 'Info', 'Please enter email and password') Else #cs - opens hidden internet explorer window - opens facebook page - get ID's form, email, password, remember me, and submit button - set values from GUI - submit form #ce $formID = _IEGetObjById($window, 'login_form') $emailID = _IEGetObjById($window, 'email') $passID = _IEGetObjById($window, 'pass') $rememberID = _IEGetObjById($window, 'persist_box') $loginBtnID = _IEGetObjById($window, 'u_0_v') _IEFormElementSetValue($emailID, GUICtrlRead($email)) ; set email _IEFormElementSetValue($passID, GuictrlRead($password)) ; set password ; check for stay logged checkbox If GUICtrlRead($stayLogged) = $GUI_CHECKED Then _IEFormElementCheckBoxSelect($formID, 'persistent', '', 1, 'byIndex') Sleep(1000) EndIf _IEFormSubmit($formID) ; submit form EndIf ;=> login form EndIf ;=> if not logged in EndFunc ;=> check login ; send message Func _sendMsg() GUICtrlSetData($chatwindow, GUICtrlRead($text)) EndFunc
  9. Hi, How could i make a Login and Registering System with an Excel file which would be hosted at Dropbox. So i have a GUI There you could choose if u want to Login or Create an account. If u choosen Register new account you would have to make a Email a Username a Password and Password check. Before Registering it has to check if the Username and Email already exists if not you would be able to create and after this Login~ My main Problem would be getting acces to the file at Dropbox and writing to Excel. Thank you very much who tried to help me.
  10. Hi Everyone! So I use Autoit to automate my logins. Gmail has recently made some changes to their login page that breaks my script. The username goes in okay, but not the password. I can type in the password manually and it's no problem. What I can't understand is how does the browser know the password is not being typed in manually? I tried every trick I could think of (i'm an Autoit noob) to simulate human typing. Using send() raw and slowing down the type rate of the keys. Nothing works, can anyone shed some light on this? #include <WinAPIShPath.au3> #include <Array.au3> Opt("SendKeyDelay", 25) Opt("SendKeyDownDelay", 25) Send("", 1) sleep(1500) Send("{enter down}", 0) Send("{enter up}", 0) sleep(1500) Send("password", 1) sleep(1500) Send("{enter down}", 0) Send("{enter up}", 0)
  11. I found this post that includes a demo of how the $MB_SERVICE_NOTIFICATION works. ; ; Community Additions: MB_SERVICE_NOTIFICATION is ignored on Vista $MB_SERVICE_NOTIFICATION = 2097152; 0x00200000 DllCall('user32.dll', 'int', 'LockWorkStation') Sleep(3000) MsgBox($MB_SERVICE_NOTIFICATION, "$MB_SERVICE_NOTIFICATION Test", "Some message... will not work on Vista+")The above demo code works in Windows 7 in that it displays a message over the login screen, but the workstation is locked instead of logged out. I want to know if the message box will display when no user is logged in. So I changed the demo code to this: #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> ;lock workstation ;DllCall('user32.dll', 'int', 'LockWorkStation') ;logout Shutdown ($SD_LOGOFF) Sleep(4000) MsgBox($MB_SERVICE_NOTIFICATION, "$MB_SERVICE_NOTIFICATION Test", "Some message... will not work on Vista+")Now I can test $MB_SERVICE_NOTIFICATION when the workstation is locked versus when the user is logged out. And what I'm seeing is that when the user is logged out $MB_SERVICE_NOTIFICATION does not enable messages to be displayed. Is there any method for displaying a message on the login screen when no user is logged in? My goal, BTW, is to run a script at night while the user is away from the computer and leave a message on the login screen for the user to see upon returning to work the next day.
  12. Hello, I can sing in to the every website this script: #include <IE.au3> Call ("signIn") Func signIn () Global $oIE = _IECreate ("http://website name") Local $username = _IEGetObjByName ($oIE,"username") ; view data from actual website Local $password = _IEGetObjByName ($oIE,"password") ; view data from actual website Local $button = _IEGetObjByName ($oIE,"login") ; view data from actual website _IEFormElementSetValue ($username, "my user name") _IEFormElementSetValue ($password, "my password") _IEAction ($button, "click") ; view data from actual website EndFunc My problem: In this code I write my username and password manually, but I'd like to the code can read the datas from the TXT file. (For example: 1. line = username, 2. line = password) Thanks for helping!
  13. This problem has been figured out. Was very easy and no need for this thread anymore.
  14. Hi Guys!! I want to share this Login GUI that I'm working on for my last project... I hope you like it! Some Features: Metro Style Inspiration.It adjust itself to any screen resolution.With the use of all the screen the software get all the attention of the clientInput PlaceHoldersCute Design But.... I also want you to help me please to solve some problems: How to avoid the flicker in the intro animation (maybe GDI text... but i don't know how yet)Why the GUICtrlSetStyle( $inputPass,0x0020+0x0001, 0) is not working, it is supposed to change the style to password but it doesn't, the only way i have found is to set the style al the time of the input creation but that is not the idea... as you can see, because the placeholder effect would be lost...Any other feedback.Download Here: Thanks for your help!! and thanks to MrCreatoR for his awesome GUICtrlOnHover UDF Update: Now using GUICtrlSendMsg(-1, $EM_SETCUEBANNER, True, "Password"), thanks to AlmarM, Melba23 and D4RKON3Everything is in English nowSome fixes here and thereSome code clean-up Now! Who is up for making the animation flickerless!!!
  15. Wow.. It's been a long time since I last used AutoIT ^^ I am currently making games with Construct2 and learning to set up multiplayer games. Since I kinda find AutoIT similar to C2 (Easy use and single threaded(I think C2 is single threaded...)) I wondered if a login or database check for "is online" is possible for autoit? And if it is reasonable to make it with a single threaded application. And if this is one of the things that are taboo to talk about!