autoit

Create unique filename by adding incremental number

霸气de小男生 提交于 2019-12-12 18:54:32
问题 I'm trying to increment file names if a previously numbered one exists. For example, it should check if "Example.csv" exists. If so, the new file should be called "Example2.csv", then "Example3.csv", "Example4.csv" and so on. Here's my code so far: $fileNum = 2 ; The $month variable is defined earler in the script but I'll define another var for this example $month = "January" If FileExists("Emissions Log - " & $month & ".csv") Then If FileExists("Emissions Log - " & $month & $fileNum & ".csv

Echo Message to Command Prompt using AutoIT?

不羁的心 提交于 2019-12-12 15:13:46
问题 How do I echo the contents of a variable, to the command prompt, using AutoIT? All I want to do is display a message in the command prompt. Run("C:\WINDOWS\system32\cmd.exe") WinWaitActive("C:\WINDOWS\system32\cmd.exe") $message = 'Type: "edit file_name.ext" to create or edit a file' send("$message {ENTER}") 回答1: You need to put the variable before the quote, then it gets evaluated: send($message & "{ENTER}") 来源: https://stackoverflow.com/questions/14790266/echo-message-to-command-prompt

How to detect if any video is being played now? [closed]

拥有回忆 提交于 2019-12-12 09:09:51
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . How to detect if any video is being played now using autohotkey, autoit, vbscript, c#, or c? Video could be being played/streamed in any local player, web based player, or html5 player. We do not know the name of player also player may not be in the full screen. PS. Detecting CPU

Can't retrieve links inside Frame

↘锁芯ラ 提交于 2019-12-12 07:03:58
问题 I am trying to use AutoIt to retrieve some data from this website: http://www.acgme.org/adspublic/default.asp Unfortunately, the page uses frames and I'm having trouble navigating to the page where the data is. The link is "Accredited Programs" #include <IE.au3> $URL="http://www.acgme.org/adspublic/" $MyIExplorer=_IECreate($URL,1,1,1,1) Local $theFrame = _IEGetObjById($MyIExplorer,"control") MsgBox(0,"The Frame",$theFrame.src) Local $oLinks = _IELinkGetCollection($theFrame) MsgBox(0, "Link

Autoit ControlSend

半世苍凉 提交于 2019-12-12 04:59:57
问题 Just trying to simulate keystrokes with ControlSend(). For some reason it doesn't work. While 1 ControlSend("PokeMMO", "", "", "{DOWN}") Sleep(900) ControlSend("PokeMMO", "", "", "{DOWN}") Sleep(900) ControlSend("PokeMMO", "", "", "{DOWN}") Sleep(900) ControlSend("PokeMMO", "", "", "a") Sleep(Random(750, 2000, 1)) ControlSend("PokeMMO", "", "", "a") Sleep(Random(750, 2000, 1)) ControlSend("PokeMMO", "", "", "a") Sleep(Random(750, 2000, 1)) ControlSend("PokeMMO", "", "", "a") Sleep(3000) WEnd

read variables from browser, php or xml

雨燕双飞 提交于 2019-12-12 04:32:11
问题 I have a application in autoit , I need to somehow read a result of a php code using autoit, so the php code will check de DB serverside, and if it`s OK the autoit process will continue, if not it will stop. 回答1: Your question is vague, so I give you a simple example. Make a file called in the webserver called "autoit-api.php". Put code in it something like this: $result = mysql_query('SELECT * WHERE 1=1'); if (!$result) { die('Invalid query: ' . mysql_error()); } else { echo $result; } The

autoIT resizable terminal service

会有一股神秘感。 提交于 2019-12-12 02:57:11
问题 When I resize "Terminal server", I want that the "RDP session" follow the resizing without grey borders appear Anybody can help me? Thanks I have the following code: $host = "" ;<<<<<<< enter here the host name or ip address $hGUI = GUICreate("Terminal server", 900, 700, -1, -1, BitOR($GUI_SS_DEFAULT_GUI,$WS_SIZEBOX,$WS_THICKFRAME)) $oRDP = ObjCreate("MsTscAx.MsTscAx.2") $oRDP_Ctrl = GUICtrlCreateObj($oRDP, 0, 0, 900, 700) GUICtrlSetResizing(-1,GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI

Unable to click on the CheckBox in AutoIt

ⅰ亾dé卋堺 提交于 2019-12-12 02:46:59
问题 The below one is my program. Here my intention is to display the three CheckBoxes after the user presses the Button . They do appear after clicking the ok - Button , but I'm unable to click on the CheckBoxes . What could be the reason? #include <GUIConstants.au3> $gui = GuiCreate("Hello World", 700, 600) $Label_HelloWorld = GuiCtrlCreateLabel("Path", 40, 20, 300, 600) $Button_OK = GuiCtrlCreateButton("OK", 450, 20, 50, 20) GuiSetState(@SW_SHOW, $gui) While True $guimsg = GuiGetMsg() Select

AutoIT and quotes

一曲冷凌霜 提交于 2019-12-11 15:48:52
问题 I need to create AutoIT script which will call this: wmic path win32_tcpipprinterport where "hostaddress = 'server1'" set hostaddress="server2" tried to combine quotes like this: $CMD = 'wmic path win32_tcpipprinterport where ""hostaddress = ''server1''"" set hostaddress=""server2"" & pause' RunWait(@ComSpec & " /c " & $CMD) But still cannot make it working. Please can you help ? 回答1: But still cannot make it working. Example: $sCmd = 'wmic path win32_tcpipprinterport where "hostaddress = '

ConsoleWrite() to GUICtrl element

瘦欲@ 提交于 2019-12-11 14:14:43
问题 How can I put ConsoleWrite() into GUICtrlCreateEdit() ? #include <EditConstants.au3> #include <GUIConstantsEx.au3> $Form1 = GUICreate("Test", 257, 182, 192, 124) GUISetFont(12, 400, 0, "Times New Roman") $test = GUICtrlCreateEdit("", 8, 40, 241, 90, $ES_AUTOVSCROLL) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd ConsoleWrite('Text test') 回答1: As per Documentation - Function Reference - GUICtrlSetData(): Modifies the data for a control.