Naveen1234 Posted January 17, 2015 Posted January 17, 2015 I need to automate the following scenario : STEP 1. Launch airtel application by clicking airtel icon available in Desktop STEP 2. Then Input "Username" and "Password" in opened screen STEP 3. Then click on "connect" button I am able to do the first step using the following script: *** Settings *** Library AutoItLibrary *** Variables *** ${airtel} C:\\Program Files\\airtel\\airtel.exe *** Test Cases *** Example Run ${airtel} Mouse Click strButton=LEFT, nX=369, nY=489, nClicks=2, nSpeed=-1 I am using "Au3Info" tool, to get mouse position. Can anyone please tell me how to do the STEP 2 and STEP 3? Thanks in advance.
water Posted January 17, 2015 Posted January 17, 2015 Welcome to Autoit and the forum! Please have a look at ControlSend and ControlClick in the help file. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Naveen1234 Posted January 17, 2015 Author Posted January 17, 2015 (edited) Thanks for your reply. I have modified as shown below: *** Settings *** Library AutoItLibrary *** Variables *** ${airtel} C:Program Filesairtelairtel.exe *** Test Cases *** Example Run ${airtel} Control Send strTitle=airtel, strText=FolderView, strControl=1, strSendText=test,nMode=0 Control Click strTitle=airtel, strText=FolderView, strControl=1, strButton=LEFT, nNumClicks=1, nX=1228, nY=601 But I am getting error as shown below: com_error: (-2147352561, 'Parameter not optional.', None, None) Please suggest me how to fix this. Edited January 17, 2015 by Naveen1234
water Posted January 17, 2015 Posted January 17, 2015 I'm not familiar with the framework you use and how it interacts with AutoIt. I would try to remove the parameter names and the space in "Control Send". Example: ControlSend "airtel", "FolderView", 1, "test", 0 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
JohnOne Posted January 17, 2015 Posted January 17, 2015 (edited) If You're using AutoItx in this framework, then I think there are no optional parameters in any call. Since your Control* functions appear to have the correct amount, I'd have to assume that Run function is the culprit here. Something like ... Run strFilename=C:Program Filesairtelairtel.exe, strWorkingdir= C:Program Filesairtel, intFlag=1 Edited January 17, 2015 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Naveen1234 Posted January 18, 2015 Author Posted January 18, 2015 Still I am getting same error: com_error: (-2147352561, 'Parameter not optional.', None, None) Could you please tell me, How to do this without using Robot framework (I mean pure Autoit Script). Thanks for your help.
JohnOne Posted January 18, 2015 Posted January 18, 2015 Certainly, just as soon as you post the window info summary tab info of both the username and password controls on the window and the button you want to click. Provide all info from the summary tab for all three controls, and the native code is simple, without it, it's impossible. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Naveen1234 Posted January 19, 2015 Author Posted January 19, 2015 (edited) Please find below the Summary Tab info for "Email", "Password" and "PLAY" button. I want to do the following through Autoit Script:STEP 1 - Enter Email ID : test@gmail.comSTEP 2 - Enter Password : test@123STEP 3 - Press "PLAY" button. expandcollapse popupEmail Field Summary: ==================== >>>> Window <<<< Title: QUAKE LIVE Launcher Class: WindowsForms10.Window.8.app.0.33c0d9d Position: 308, 105 Size: 750, 517 Style: 0x16010000 ExStyle: 0x00050000 Handle: 0x00030362 >>>> Control <<<< Class: WindowsForms10.EDIT.app.0.33c0d9d Instance: 1 ClassnameNN: WindowsForms10.EDIT.app.0.33c0d9d1 Name: f_email Advanced (Class): [NAME:f_email] ID: 328436 Text: Position: 78, 462 Size: 150, 20 ControlClick Coords: 44, 11 Style: 0x560100C0 ExStyle: 0x00000200 Handle: 0x000502F4 >>>> Mouse <<<< Position: 430, 578 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< 12/23 Support Holiday Break 12/18 Holiday Content Online 12/10 Update 22 Follow-up 12/08 Quake Live Non-recurring Subscription... QUAKE LIVE is Online. Latest News Server Status Remember Me Email: Password: >>>> Hidden Text <<<< *********************************************************************************** Password Field Summary: ======================= >>>> Window <<<< Title: QUAKE LIVE Launcher Class: WindowsForms10.Window.8.app.0.33c0d9d Position: 308, 105 Size: 750, 517 Style: 0x16010000 ExStyle: 0x00050000 Handle: 0x00030362 >>>> Control <<<< Class: WindowsForms10.EDIT.app.0.33c0d9d Instance: 2 ClassnameNN: WindowsForms10.EDIT.app.0.33c0d9d2 Name: f_password Advanced (Class): [NAME:f_password] ID: 197398 Text: Position: 343, 462 Size: 150, 20 ControlClick Coords: 73, 10 Style: 0x560100E0 ExStyle: 0x00000200 Handle: 0x00030316 >>>> Mouse <<<< Position: 724, 577 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< 12/23 Support Holiday Break 12/18 Holiday Content Online 12/10 Update 22 Follow-up 12/08 Quake Live Non-recurring Subscription... QUAKE LIVE is Online. Latest News Server Status Remember Me Email: Password: >>>> Hidden Text <<<< *********************************************************************************** PLAY Button summary: ==================== >>>> Window <<<< Title: QUAKE LIVE Launcher Class: WindowsForms10.Window.8.app.0.33c0d9d Position: 308, 105 Size: 750, 517 Style: 0x16010000 ExStyle: 0x00050000 Handle: 0x00030362 >>>> Control <<<< Class: WindowsForms10.Window.8.app.0.33c0d9d Instance: 1 ClassnameNN: WindowsForms10.Window.8.app.0.33c0d9d1 Name: f_login Advanced (Class): [NAME:f_login] ID: 197476 Text: Position: 660, 427 Size: 87, 88 ControlClick Coords: 48, 34 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x00030364 >>>> Mouse <<<< Position: 1016, 566 Cursor ID: 0 Color: 0x7E0605 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< 12/23 Support Holiday Break 12/18 Holiday Content Online 12/10 Update 22 Follow-up 12/08 Quake Live Non-recurring Subscription... QUAKE LIVE is Online. Latest News Server Status Remember Me Email: Password: >>>> Hidden Text <<<<Please help me write a autoit script for these things.Thanks for your help. Edited January 21, 2015 by Melba23 Added tags
Naveen1234 Posted January 19, 2015 Author Posted January 19, 2015 (edited) Can anyone please tell me how to write autoit script for the provided summary in my previous post (above one)? Thanks in advance. Edited January 19, 2015 by Naveen1234
Naveen1234 Posted January 21, 2015 Author Posted January 21, 2015 @john Hi John, Can you please help me on this. I am in critical project. Can you please tell me how to write autoit script for the above scnerio? Thanks in advance.
Moderators Melba23 Posted January 21, 2015 Moderators Posted January 21, 2015 Naveen1234, QUAKE LIVE LauncherYou appear not to have read the Forum rules since your arrival. Please do read them - particularly the bit about not discussing game launching - before you post again. Thread locked. 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
Recommended Posts