autoit

How to use _IEFormElementRadioSelect without finding a Form

非 Y 不嫁゛ 提交于 2019-12-13 06:45:23
问题 I need this script to work, but without using _IEFormGetObjByName or _IEFormGetCollection , and while knowing only the Name of the radio buttons. $oIE = _IE_Example ("form") $oDoc = _IEDocGetObj($oIE) $oArray = $oDoc.getElementsByTagName ("input") For $element In $oArray If $element.Name = "radioExample" Then _IEFormElementRadioSelect ($oDoc,2, "radioExample", 1, "byIndex") msgbox(0,"","Found it") Endif Next _IEFormElementGetValue & _IEAction work great, just reference them to the $oElement ,

Slow down AutoIt without explicit Sleep() statements

给你一囗甜甜゛ 提交于 2019-12-13 05:40:47
问题 I am trying to explore AutoIt for automation. Is there a way to increase execution time (wait) rather than use Sleep(3000) after each syntax/command? 回答1: The interval between key presses and mouse clicks can be set with AutoItSetOption, with parameters "MouseClickDownDelay" and "SendKeyDelay", respectively. This will cause a general slowdown of the script without requiring Sleep statements. Sample: AutoItSetOption("MouseClickDownDelay", 200) ; Unit: ms. "Alters the length a click is held ;

Execute Python script from AutoIt

你说的曾经没有我的故事 提交于 2019-12-13 04:47:42
问题 I have a Python (.py) file and need to execute it from AutoIt. How can I do this? 回答1: Python scripts can be executed from command line. For a script called myscript.py , you can run it (assuming Python is installed) by typing: python myscript.py If you want to run myscript.py without having to prefix it by python , then set the path to the Python binary (e.g. C:\Python27\Python.exe ) as Windows environment variable. This enables AutoIt to execute the Python script as if it were an external

AutoIt Split String

跟風遠走 提交于 2019-12-13 04:40:06
问题 I have a String like this: Info1|Info2 I want this String to be splitted by | and a it should return the second Info and the first one. So I want one msgbox displaying Info1 and another one displaying Info2. How can I do this? I already tried StringSplit But without any success... 回答1: Try this : #Region ;************ Includes ************ #Include <Array.au3> #EndRegion ;************ Includes ************ $str = 'Info1|Info2' $array = StringSplit($str, '|', 2) For $i = 0 To UBound($array) -

Running AutoIt3 Scripts in VB 2010

岁酱吖の 提交于 2019-12-13 03:10:37
问题 I am fairly new to this, so pardon me if I am asking a silly question. I created an application in 2006 that calculates bottom-hole pressure. Basically, it takes the user-inputs, calls a secondary application called REFPROP, and delivers the REFPROP results back to my application to continue the calculations. Using AutoIt, I created a temp file with user inputs & another with REFPROP outputs. Since REFPROP was a cmd prompt application, the process was fairly simple. Now, the REFPROP I

Mapping Keyboard and Mouse movement to background web page

余生颓废 提交于 2019-12-13 02:09:39
问题 I am doing my Google Summer of Code project. In this project I am capturing the screen using Google Chrome's Screen Capture extension and then displaying it on my webpage. Now I want to interact with the Screens Captured by this extension. Is there something I can do to map keyboard and mouse movement to the original web page that I'm capturing? Perhaps the JavaScript way or use of other scripting languages like AutoIT? This is exactly what I want to do: Demo Video 回答1: I think that you mean

Automating Authentication popup in Selenium

和自甴很熟 提交于 2019-12-13 01:05:09
问题 I am struggling a bit while automating an authentication pop up in the chrome browser. I am using this test site named "http://the-internet.herokuapp.com/basic_auth" Here is my code. public class Authen { public static void main(String[] args) throws IOException { // TODO Auto-generated method stub System.setProperty("webdriver.chrome.driver", "C:\\Users\\Sumedha\\OneDrive\\Documents\\Selenium\\Drivers\\chromedriver_win32\\chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.get(

How to store a changing webpage in a variable?

喜夏-厌秋 提交于 2019-12-13 00:52:45
问题 My script automates the room booking process at my school for group projects. I have created an automatic log-in script which works fine. Now I would like to access different elements from the loaded page (check boxes, radio buttons...). How can I save various elements from the page that I have logged-in into and perform certain actions on them? Func SignIn() Global $window = _IECreate("https://roombooking.au.dk/classes/Login.aspx? ReturnUrl=%2fclasses%2fbook.aspx") _IELoadWait($window) If

Check if WinList() contains a certain title

瘦欲@ 提交于 2019-12-12 20:27:08
问题 I am listing all open windows using WinList() to get window title and -handle in AutoIt. I want to check if resulting array contains a specific title. What is the best way to do this? There is no WinList().Contains("TitleName") or something like that. Local $aList = WinList() ;Gets a list of Window Titles and IDs 回答1: OK, I got it now: For $i = 1 To $aList[0][0] If $aList[$i][0] = "Title/String you search for" Then MsgBox($MB_SYSTEMMODAL, "", "MessageBox shows this text if title is in list.")

Unable to CREATE TABLE; why does this code fail?

那年仲夏 提交于 2019-12-12 20:19:29
问题 I have a problem with SQLite v3.22.0 and AutoIt v3.3.14.3. Trying to create a database works but the table does not get created. I use the AutoIt example code: #include <MsgBoxConstants.au3> #include <SQLite.au3> #include <SQLite.dll.au3> Local $hQuery, $aRow, $sMsg _SQLite_Startup() ConsoleWrite("_SQLite_LibVersion=" & _SQLite_LibVersion() & @CRLF) _SQLite_Open() ; open :memory: Database _SQLite_Exec(-1, "CREATE TABLE aTest (a,b,c);") ; CREATE a Table _SQLite_Exec(-1, "INSERT INTO aTest(a,b