Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/28/2016 in all areas

  1. PPI, Please calm down - as a pilot I prefer my ATC controllers to appear calm and in control! The file UEZ post4ed inpost #4 above is a script file - the text that can be compiled into a stand-alone executable. To do that you need to install AutoIt on a computer, copy the file from the forum (use the "pop-up" button at top-right to get a nice dialog) save the file somewhere (preferably with a .au3 extension, but that is not absolutely necessary) and then using the SciTE editor that is installed with AutoIt, load that file. Using the <Tools> menu of SciTE, select <Compile> to open the compilation dialog - the only thing you need to complete is the "target file name" and then press "Compile script". The executable will be created and you can then use it. Clearer? M23
    2 points
  2. I'm thinking you need some spaces in the command line in the RunWait function. This is what the runwait funtion is seeing as the command to run. Global $pass = "123456", $user = "Me", $host = "somecomputer", $dest = "someothercomputer" ;~ RunWait("pscp " & "-r" & "-pw" & $pass & @ScriptDir & $user & "@" & $host & ":" & $dest ) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : "pscp " & "-r" & "-pw" & $pass & @ScriptDir & $user & "@" & $host & ":" & $dest = ' & "pscp " & "-r" & "-pw" & $pass & @ScriptDir & $user & "@" & $host & ":" & $dest & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
    1 point
  3. The simplest way, in AutoIt, to do what you are doing is this #include <FileConstants.au3> $content1 = FileRead("file.txt") $hFile = FileOpen("file.txt", $FO_OVERWRITE) $content2 = StringReplace($content1, "old", "new") FileWrite($hFile, $content2) FileClose($hFile)
    1 point
  4. This topic is becoming totally surrealist
    1 point
  5. water

    Excel_RangeRead

    Or Local $aResult = _Excel_RangeRead($oWorkbook, Default, $oWorkbook.Worksheets("Parabolas").Usedrange.Columns("A:Q"), 2) If parameter 3 accesses another worksheet then specified in parameter 2 then parameter 2 will be ignored.
    1 point
  6. JLogan3o13

    combo box answer

    @rossati you limit the help we can offer when you don't bother posting any code. I am guessing you mean something like this? If I am incorrect, please post code showing what you're trying to do. ;=================Select the Day from the Combo Box with the Enter key=========================== #include<MsgBoxConstants.au3> #include <GUIConstantsEx.au3> $LoginForm = GUICreate("Test My Combo Box", 300, 100) $cmbBox = GUICtrlCreateCombo("", 60, 44, 125, 21) GUICtrlSetData($cmbBox,'Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday') $myDummy = GUICtrlCreateDummy() Local $aAccelKeys[1][2] = [["{ENTER}", $myDummy]] GUISetAccelerators($aAccelKeys) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $myDummy MsgBox($MB_OK, "Test My Combo Box", "You Selected " & GUICtrlRead($cmbBox)) EndSwitch WEnd
    1 point
  7. magiccc

    _IEFormImageClick()

    Well I found a way by giving the image index, not sure if theres another method
    1 point
  8. and a working VBA example in Excel (Windows 7) replace directorynames / location of pictures Same should work in VBScript with some small modifications 'Make a reference to Microsoft Windows Image Aquisition library Sub test() Dim oIMG 'As ImageFile Dim oIP 'As ImageProcess 'Create the needed WIA objects Set oIMG = CreateObject("WIA.ImageFile") Set oIP = CreateObject("WIA.ImageProcess") 'Load your image oIMG.LoadFile "Y:\test_screenshot\wia.jpg" 'Rotate the image oIP.Filters.Add oIP.FilterInfos("RotateFlip").FilterID oIP.Filters(1).Properties("RotationAngle") = 90 'Crop the image oIP.Filters.Add oIP.FilterInfos("Crop").FilterID oIP.Filters(2).Properties("Left") = oIMG.Width \ 4 oIP.Filters(2).Properties("Top") = oIMG.Height \ 4 oIP.Filters(2).Properties("Right") = oIMG.Width \ 4 oIP.Filters(2).Properties("Bottom") = oIMG.Height \ 4 'Apply the image processing Set oIMG = oIP.Apply(oIMG) 'Save it to a new file Kill "Y:\test_screenshot\wia_new.jpg" oIMG.SaveFile "Y:\test_screenshot\wia_new.jpg" End Sub
    1 point
  9. Maybe you could be interested also on this post by mLipok, where all functions of a script ar enumerated within an array and one column of the array contains parameters required by each function
    1 point
  10. Note that using the newest version of the Excel UDF needs to check/adapt your scripts because there have been a lot of script breaking changes. In your old code I would at least add some error checking. After each _Excel* function you need to check that here was no error and only keep on processing when no error occurred. NB: You can drop the Sleep statements because the functions work synchronous.
    1 point
  11. That is an older version of the Excel UDF. I would recommend upgrading your version of AutoIt and using the new Excel functions.
    1 point
  12. I think it's a problem with the read/write permissions, so contact your sysAdmin to correct them.
    1 point
  13. $sInput = InputBox("Startup Script", "Enter your numaric code") MouseClick("left", 419, 809, 1, 25) MouseClick("left", 230, 720, 1, 30) MouseClick("left", 566, 536, 2, 30) Send($sInput) MouseClick("left", 806, 534, 1, 25) MouseClick("left", 673, 641, 1, 8) You can send your numbers in a single send, no need to break them apart. This is the most simple way I can think to take what you have and prep it for user input. A GUI would definitely be the "more professional" way IMO but before I would bother going that road I would probably get rid of all the MouseClicks() as well because that would be your first point of failure (changing resolution, position, etc)
    1 point
  14. Hi, @Hanesis welcome to the forum. I would suggest you look at the Excel functions in the Help file. Based on your needs, you would be looking at some of the following functions: _Excel_Open _Excel_BookOpen _Excel_RangeRead
    1 point
  15. @cres, You are getting that inline error only when you perform Run/Compile or Check on your source. YOu will see in the SciTE output pane the very same information during the execution of au3check, which is interpreted by SciTE and shown in-line. So it is indeed au3check that does the lexing and checking. Jos
    1 point
  16. Please check GuiCtrlRead in the help file.
    1 point
×
×
  • Create New...