noID Posted December 18, 2011 Share Posted December 18, 2011 Hi :-) I'm a real noob and I even don't have any idea how to make a script using Autoit at all, reading the help files makes my mind turning around, I don't understand anything. :-( 25 years ago I did some programming with Commodore64-Basic, but nowadays I'm totally lost... I'd really be very thankful if someone could give me hints how to start creating an exe-file for an automated login. What the Autoit-exe should do: 1. -> Run the Program "C:\LOGIN.EXE" When LOGIN.EXE starts a login-window appears in the middle of the screen 2. -> Automatically fill in the password (user name always is the same and filled in already) Now it will last about 2 seconds until the online-login is done, after that a new window appears in the middle of the screen with the message "Enter number (D3) (C9) (A2) from the Securecard" and the input line below. 3. -> These three numbers (of course always changing) should be filled into the right field and the button "submit" should be clicked. My simple idea is reading/capturing the three shown codes in the brackets, getting the analogical values from a .txt-file (e.g. A1:T or A1=T etc.) and placing them into the input line. But I don't even know how to start the script at all. Please excuse my bad English. ;-) Thanks! Link to comment Share on other sites More sharing options...
guinness Posted December 18, 2011 Share Posted December 18, 2011 (edited) Your best bet is to read the forum rules first before you continue your time on AutoIt. Edited December 18, 2011 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Dana Posted December 19, 2011 Share Posted December 19, 2011 Read the helpfile for Run, WinWaitActive, FileRead, and Send. You'll also need a While...WEnd or Do...Until loop or something like that. Now try it on you own and come back if you have specific questions. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 19, 2011 Moderators Share Posted December 19, 2011 noID,a new window appears in the middle of the screen with the message "Enter number (D3) (C9) (A2) from the Securecard" and the input line below.3. -> These three numbers (of course always changing) should be filled into the right fieldWe do not help break login security measures. This sounds very much as though you are trying to do just that. You have 24hrs to explain why I should not lock this thread.M23 onlineth 1 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 Link to comment Share on other sites More sharing options...
EmptySpace Posted December 19, 2011 Share Posted December 19, 2011 I think first you must know why you need autoit, what exacly you want to do. Im newb too. Im trying to make bots so i read all info about it. Firstly use very basic things then rewrite it making it more advanced... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 19, 2011 Moderators Share Posted December 19, 2011 sirfearless,Replying to thread that a Mod has said he is thinking of locking is not a good idea - particularly if you go on to say:Im trying to make botsUse your brain a bit next time please. 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 Link to comment Share on other sites More sharing options...
noID Posted December 19, 2011 Author Share Posted December 19, 2011 Your best bet is to read the forum rules first before you continue your time on AutoIt.Ups - You ment this point?Scripts or programs that violate the license agreement for software. If a program explicitly says no automation, do not discuss automation of that software here.Sorry, I didn't read the rules, shame on me!Read the helpfile for Run, WinWaitActive, FileRead, and Send. You'll also need a While...WEnd or Do...Until loop or something like that. Now try it on you own and come back if you have specific questions.I'll do that, thank you!noID,We do not help break login security measures. This sounds very much as though you are trying to do just that. You have 24hrs to explain why I should not lock this thread.M23All right, I will try:As a field service technician I get my new orders when I'm "on tour". So I'll have to power on the notebook, log into the first application, start the mobile phone bluetooth connection, after that the extranet-Dialup has to be started and the password and the gridcard-values have to be typed in. After that the main program has to be started, again with password.This is very dangerous if you have to do that all by driving because I simply don't have the time for parking the car to do that all, maybe ten times a day. Sad but true, but my boss would say goodbye to me.If I had a script at least to automate the extranet-login (long password) and the gridcard-thing I would be a more nonhazardous road user. ;-)The first information about the new orders (customer's address, machine type) are sent by mobile phone SMS/E-Mail, but the details are sent by SAP so I must log in.Each time I visit a customer I have to power down the notebook (or standby) which is making the BT and SAP connection loose.So I would say: I only try to make that whole procedure a lot more easier and I could concentrate on traffic much better...By the way it would be a great easement for me, too.And I wouldn't see any fault in it: it's my laptop, my account, my gridcard and my password.Without the initial password for the first step nobody could use the script to log into the extranet, furthermore the main application also is password protected. Aktonius 1 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 19, 2011 Moderators Share Posted December 19, 2011 noID,Given that explanation I am happy for this to thread to continue - if only to reduce the chances of you killing someone else on the road! First thing to do is make sure you can read the "Enter number (D3) (C9) (A2) from the Securecard" message. Then whether you can enter the 3 responses using AutoIt. Many login screens are difficult to automate - for obvious reasons. Use the Window Info tool ("C:Program FilesAutoIt3Au3Info.exe" if you did a standard install) to see if the text is visible and how to identify the input area. Once you are sure you can do that you can start working on the rest of the code. 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 Link to comment Share on other sites More sharing options...
Aktonius Posted December 19, 2011 Share Posted December 19, 2011 sirfearless,Replying to thread that a Mod has said he is thinking of locking is not a good idea - particularly if you go on to say:Use your brain a bit next time please. M23A bot doesnt have to be malicious Melba or be for the games only Link to comment Share on other sites More sharing options...
RichardL Posted December 20, 2011 Share Posted December 20, 2011 noID, I have an auto-login script for SAP, can let you have it tomorrow. Some of it should be useful. What is "gridcard", "always changing"? For some remote access to customer systems customer has given us lcd RAVI key, number changes every minute. To automate that would have to be webcam + ocr - hard. Richard. Link to comment Share on other sites More sharing options...
RichardL Posted December 20, 2011 Share Posted December 20, 2011 (edited) noID, This is the code I use for logging into SAP and opening the timesheet. You requirements are different but you should be able to lift some useful pieces out of this. Richard. expandcollapse popup#cs SAP_Auto_Login.au3 This starts sap and logs on, opens the timesheet for edit. It assumes that the SAP login window will remember the username from previously. On the first run it asks for the password, and uses the same password on subsequent runs. If necessary start it with the "shift" key pressed to force it to ask for the password. #ce #include #include Const $WinWaitTmo = 30 Global $sMyName Func MsgFail($sArg1, $sArg2) Beep(256, 100) MsgBox(0, $sMyName, $sArg1 & @CRLF & $sArg2, 10) EndFunc If _Singleton(@ScriptName, 1) = 0 Then MsgFail(@ScriptName, "Already running") Exit EndIf Dim $sEnKey, $sPwd, $sEnPwd Dim $progname, $progtitle Dim $workdir Dim $sRKeyNam Dim $sMsg $sMyName = StringRegExpReplace(@ScriptName, "....", "") $sRKeyNam = "HKCUSoftwareRXY" & $sMyName & "Settings" $sEnKey = "Secret Phrase" $sEnPwd = RegRead($sRKeyNam, "Name1") $sMsg = StringFormat("~%s~n ~%s~n ~%s~n", $sRKeyNam, "Name1", $sEnPwd) ;ConsoleWrite(StringFormat("Pwd1 ~%s~n~%s~n", $sPwd, $sEnPwd)) MsgBox(0, 0, $sMsg) If @Compiled = 0 Then Sleep(2000) ; to allow shift to be pressed EndIf If $sEnPwd = "" or _IsPressed(10) Then ; 10 = Shift ; Have to ask for the pwd $sPwd = InputBox("SAP_Timesheet", "SAP Password ?", "", "*" , 100, 70) If $sPwd = "" Then Exit EndIf $sEnPwd = _StringEncrypt(1, $sPwd, $sEnKey , 1) ;ConsoleWrite(StringFormat("Pwd2 ~%s~n~%s~n", $sPwd, $sEnPwd)) RegWrite($sRKeyNam, "Name1", "REG_SZ", $sEnPwd) Else $sPwd = _StringEncrypt(0, $sEnPwd, $sEnKey , 1) ;ConsoleWrite(StringFormat("Pwd3 ~%s~n~%s~n", $sPwd, $sEnPwd)) EndIf $progname = "C:Program FilesSAPSapSetupsetupSALSapLogon.s8l" $workdir = "C:Program FilesSAPSAPsetupsetupSAL" If 0 Then $progname = "C:Program Files (x86)SAPSapSetupsetupSALSapLogon.s8l" $workdir = "C:Program FilesSAPSAPsetupsetupSAL" EndIf $progtitle = "SAP Logon 710" ; Start SAP Login ShellExecute($progname, "", $workdir) If WinWaitActive($progtitle, "", $WinWaitTmo) Then Else MsgFail("Failed to find:", $progtitle) Exit EndIf Sleep(300) ; We have two tabs; Systems, Shortcuts. Can read the index of which tab we are on ; and tab (right or) left as required $stmp = ControlCommand($progtitle, "", "[CLASS:SysTabControl32; INSTANCE:1]", "CurrentTab", "") If $stmp = 2 Then ControlCommand($progtitle, "", "[CLASS:SysTabControl32; INSTANCE:1]", "TabLeft", "") Else EndIf Send("!l") Sleep(300) Send($sPwd) Sleep(100) Send("{Enter}") $progtitle = "SAP Easy Access" If WinWaitActive($progtitle, "", $WinWaitTmo) Then Else MsgFail("Failed to find:", $progtitle) Exit EndIf Sleep(300) Send("ABC") Sleep(100) Send("{Enter}") $progtitle = "Time Sheet: Initial Screen" If WinWaitActive($progtitle, "", $WinWaitTmo) Then Else MsgFail("Failed to find:", $progtitle) Exit EndIf Sleep(500) Send("XYZ") Sleep(50) Send("{Enter}") Send("!e") ; Edit Sleep(100) Send("e") ; Enter Times Sleep(800) $progtitle = "Time Sheet: Data Entry View" If WinWaitActive($progtitle, "", $WinWaitTmo) Then Else MsgFail("Failed to find:", $progtitle) Exit EndIf Sleep(200) Send("! x") ; Maximise Exit (I don't know where the indenting has gone, it was nicely indented before I pasted it in.... Edited) Edited December 20, 2011 by RichardL Link to comment Share on other sites More sharing options...
noID Posted January 3, 2012 Author Share Posted January 3, 2012 Thanks a lot, especially to RichardL! Sorry for my late reply, but until now I didn't have time for testing ... Too much work ... Link to comment Share on other sites More sharing options...
noID Posted February 16, 2014 Author Share Posted February 16, 2014 Two years have passed and since now I didn't have had the time to learn about "Autoit". :-( I'd be really happy if anybody would have the time to "transcript" this code for Autoit. Thanks a million! START PROGRAM ABC C:Program filesabc.exe WAIT FOR 5 SECONDS; INSERT PASSWORD "abc" ENTER NEW WINDOW APPEARS: "Enter [A2] [C4] [J3] from your Grid Card ..." READ THE 3 VALUES INSIDE THE BRACKETS; GET + INSERT THOSE 3 VALUES FROM EXTERNAL TXT-FILE "C:GRID.TXT" e.g. "W9C" (without spaces, not case sensitive) ENTER WAIT FOR 5 SECONDS; ENTER START PROGRAM 123 C:Program Files123.exe WAIT FOR 5 SECONDS; INSERT PASSWORD "123" ENTER Link to comment Share on other sites More sharing options...
JohnOne Posted February 16, 2014 Share Posted February 16, 2014 What code? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
noID Posted February 16, 2014 Author Share Posted February 16, 2014 What code? Sorry, it's not a code, just a sequence ... Link to comment Share on other sites More sharing options...
JohnOne Posted February 16, 2014 Share Posted February 16, 2014 Run() Sleep() Send() wait! NEW WINDOW APPEARS: "Enter [A2] [C4] [J3] from your Grid Card ..." Seriously? You're still trying to circumvent the same website security measures. best of luck. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
noID Posted February 19, 2014 Author Share Posted February 19, 2014 Sorry, but I don't understand your worry - I have a unique (personalized) Gridcard in combination with a unique (personalized) password. Each imaginary thiev of the laptop would find neither the script nor the gridcard nor the password - these things would be securely saved on a sd-card, not permanently being plugged in the lappy - just like a dongle. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 19, 2014 Moderators Share Posted February 19, 2014 Two years have passed and since now I didn't have had the time to learn about "Autoit". :-( I'd be really happy if anybody would have the time to "transcript" this code for Autoit. noID, understand that this forum is dedicated to helping people improve their scripts and scripting ability. It is not a forum where you put in a request and we barf up code for you. Looking back through the thread, you were given a lot of suggestions, which you yourself admit to having done nothing with in the last two years. If you are not interested in learning the language, I would suggest trying a website like http://www.freelancer.com/ "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
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