autoit

AutoIT GUICtrlSetState/GUICtrlGetState set state is different from get state

喜欢而已 提交于 2019-12-11 04:04:03
问题 i ńeed help with my code. GUICtrlSetState($input_ID_betonarna,$gui_ENABLE) ConsoleWrite(GUICtrlGetState($input_ID_betonarna)&" "& $gui_ENABLE) Output is: 80 64 Expected output is: 64 64 I know that output is sum of states but i do not have any table with GUIConstantsEx values. 回答1: Look into your AutoIt installation. In the "include" subfolder you should find the file GUIConstantsEx.au3 where those constants are defined: Global Const $GUI_SHOW = 16 Global Const $GUI_HIDE = 32 Global Const

AutoIt PixelGetColor from background/inactive/unfocused window

和自甴很熟 提交于 2019-12-11 03:58:33
问题 PixelGetColor has an optional parameter hwnd (handle of window the pixel is read from). Therefore I assume it is possible to read from unfocused windows (i.e not minimized, but behind another window); but I can't get it to work like that. Is my assumption wrong? If not, how would this be done? If so; why the hwnd parameter? is there another method involving pixel recognition? 回答1: Abstract You want to create a simple empty bitmap and transfer the DeviceContext content of the hidden window

Implement ImageSearchDLL.dll in C#

孤者浪人 提交于 2019-12-11 02:23:42
问题 I am trying to use ImageSearchDLL.dll in Visual Studio C#. I used to use it in AutoIt. Following is the code I came up with to use the Imagesearch Function. However, as soon as it tried to call ImageSearch, the program crashes without any exception. I have the dll file included in my project folder. Could it be because of that although I was able to use the dll in AutoIt, it doesn't mean it would work in C# as well? Note: I tried both 32 and 64 bits of .dll [DllImport("ImageSearchDLL.dll")]

AUTO IT EXE to be executed through Jenkins CI Tool

半世苍凉 提交于 2019-12-10 22:56:44
问题 I am using CI Jenkins Tool and trying to execute an AUTO IT Exe file. I tried through Jenkins, with the following options, but nothing is working out . Execute command line arguments batch file ant file Windows runner plugin 回答1: Running AutoIt via Jenkins on a slave will depend on how the slave is launched. Since you're using AutoIt, you're using Windows. The Windows slave can NOT be started via SSH or via Windows Service. You MUST use JNLP Web State and you MUST start it in a particular way

Possible Autoit-like JavaScript macros?

℡╲_俬逩灬. 提交于 2019-12-10 19:57:36
问题 The title says it all. Is there a way to write macros in JavaScript to achieve a similar functionality to that of Autoit? I just would want to manipulate files on my own computer (offline) and could easily do it with autoit, but since I am currently learning JavaScript -- plan to develop in Node.js -- I figure it wouldn't hurt to get the extra practice. Thanks guys! 回答1: Use an application which supports JavaScript as a shell scripting language, such as the following: JsRoboKey PowershellJS

Get a list of all open windows using AutoIt

本秂侑毒 提交于 2019-12-10 13:38:06
问题 I'm trying to get rid of my minimize, maximize and close buttons on all windows. Googling around I found this: $h = WinGetHandle("[CLASS:Notepad]") $iOldStyle = _WinAPI_GetWindowLong($h, $GWL_STYLE) $iNewStyle = BitXOr($iOldStyle, $WS_SYSMENU) _WinAPI_SetWindowLong($h, $GWL_STYLE, $iNewStyle) _WinAPI_ShowWindow($h, @SW_SHOW) This works fine, so now I only need to iterate over all windows with this code, and I'm done. How do I get a list of all HWNDs in the system? 回答1: You can get a list of

How can I clean up this code to be shorter? [duplicate]

吃可爱长大的小学妹 提交于 2019-12-10 12:35:42
问题 This question already has answers here : Incremental variable definition (2 answers) Closed last year . I'm using AutoIt: $1 = GetItemBySlot(1, 1) $2 = GetItemBySlot(1, 2) $3 = GetItemBySlot(1, 3) $4 = GetItemBySlot(1, 4) $5 = GetItemBySlot(1, 5) The code repeats for 40 lines. How can I shorten it? 回答1: You could shorten this by using Assign() and Eval(). For $i = 1 To 5 Assign($i, GetItemBySlot(1, $i)) Next That would be 3 lines instead of n lines. During runtime this will be expanded to:

XML Read to Array in Autoit

一世执手 提交于 2019-12-10 12:24:14
问题 Is there any easy way to open/edit/save XML file? Any function which can open xml file into array? I tried _FileReadToArray($filepath, $aArray) but this has wrong codding (I need utf-16, not ansi) 回答1: There is also an "official" function named "_SML_ElementsToArry()" ;=============================================================================== ; ; Function Name: _XML_ElementsToArry() ; Description: Return an array of the elements of an XML file ; Parameter(s): $sXMLFilePath - String with

Autorun removable drive

点点圈 提交于 2019-12-09 02:05:22
问题 Autorun was disabled in Windows. I am looking for an alternative. I got this AutoIt script : $DBT_DEVICEARRIVAL = "0x00008000" $WM_DEVICECHANGE = 0x0219 GUICreate("") GUIRegisterMsg($WM_DEVICECHANGE , "MyFunc") Func MyFunc($hWndGUI, $MsgID, $WParam, $LParam) If $WParam == $DBT_DEVICEARRIVAL Then MsgBox(4096, "Info", "My Drive has been Inserted, Backup My Files!") EndIf EndFunc While 1 $GuiMsg = GUIGetMsg() WEnd Soon as plugged in, the message box appeared. Now, to run a file I replaced MsgBox

Handling Windows authentication pop up

痞子三分冷 提交于 2019-12-09 01:50:41
问题 Below is my AutoIt script (UI3_Authentication.au3) for handling a Windows authentication pop up. AutoItSetOption("WinTitleMatchMode","2") WinWait("Authentication Required") $title = WinGetTitle("Authentication Required") ; retrives whole window title $UN=WinGetText($title,"User Name:") ControlSend($title,"",$UN,"test");Sets Username $PWD=WinGetText($title,"Password:") Send("{TAB 1}") ControlSend($title,"",$PWD,"test1234");Sets PWD Send("{ENTER}") Below is my Selenium code call to the above