Jump to content

Search the Community

Showing results for tags 'command line'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start






Found 14 results

  1. GetOpt.au3 v1.3 If you've ever dabbled in C (or Python, Perl etc) then you might have heard of getopt() (Wiki entry). Well, I wrote this UDF to get that functionality into AutoIt. Some searching around here on the forum did turn up some other UDFs in this direction, but I decided to write my own port anyway and parallel the implementation in the C library. It's still missing a few things but on a whole it does the job really well. It's now pretty much complete. And I want to share it with you all. So here it is. If you want to handle the command line options passed to your script or program
  2. Hi all, I need to read a log file into an array, but the log file is encoded as $FO_UTF16_BE_NOBOM (2048) = Use Unicode UTF16 Big Endian (without BOM) per FileGetEncoding (it returns 2048). I have searched how to convert these log files to UTF-8 and finally found a Powershell command. Since then I have been racking my brain trying to get the function to work. The command itself works from a Powerscript prompt: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command Get-Content C:\Logs\Myplayer_10-10-17-02-31.log | Set-Content -Encoding utf8 C:\Logs\Myplayer1.log Th
  3. Greetings, I need write a command line to run an .exe with parameters, one this parameters is a password with special characters like: [ ] \ " etc. The password is write between double cotes too. When run this command line, catch error. I buid this function, sometimes run ok, others show error. Someone can any idea? Best ragards #include <Array.au3> Global $G_AIX_DEFAULT_PASSWORD = "******" Func Scape_Word_To_MSDOS($var = "") ;~ https://www.robvanderwoude.com/escapechars.php Local $aCharacters[][2] = [ _ ["%",
  4. Greetings, I would like to be able to write a script to send commands to the console for creation of Gstreamer pipelines. I was thinking of something similar to this: Local $iPID = Run("C:\Windows\System32\cmd", "", @SW_MAXIMIZE) ;THIS OPENS THE CONSOLE...!!! if $iPID == 0 Then ConsoleWrite(@CRLF & "I DID NOT OPEN CMD...error: " & @error & @CRLF) if $iPID <> 0 Then ConsoleWrite(@CRLF & "I OPENED CMD...!!!" & @CRLF) $hCmd = WinGetHandle("C:\WINDOWS\system32\cmd.exe") if $hCmd <> 0 Then
  5. I use a program called Screenpresso. It can run a command that captures the screen from certain coordinates. I would like to be able to capture the mouse coordinates and then fill them in my command. The normal command looks like this. screenpresso.exe -captureregion "D:\Test\test2.jpg" 0;0;1280;720 It is at 0;0 where I would like to insert the mouse coordinates. Can someone show me how to do this with AutoIt Thanks
  6. I am Very new to Autoit and I'm trying to figure out how to input text in an administrator Level Command prompt on windows 10. this is what I currently have Send ("#r") WinWaitActive("Run") Send("runas /user:Administrator cmd") Send("{Enter}") WinWait("C:\WINDOWS\system32\runas.exe") ControlClick("", "", "[CLASS:ConsoleWindowClass]") Send("test-Password") Send("{Enter}") The issue I am having is I can not send the "test-password" to the command prompt. I cried adding the C
  7. autoit3 under Win7 (x64) Here's a very simple script that reports the number of parameters it's called with: cmd_line_nparm.au3 $nparm = $CmdLine[0] ; number of parameters MsgBox(0,"","nparm: " & $nparm) If I start a dos session and cd to the folder where this file is stored and run cmd_line_nparm.au3 abc def the response is nparm: 0 ; but if I provide the full path to the autoit exe file I get the correct answer (2). Can anyone tell me what I need to do to avoid having to provide the full path? (Hopefully without needing to re-install autoit3
  8. I can run this and notepad++ opens the file Run("C:\Program Files (x86)\Notepad++\notepad++.exe E:\icare\icare\NI-WI-NBSE-ERR.xml") But what I want is to run the .au3 or exe from command line and send it the file as parameter -am I being to simplistic in hoping its this easy? #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <Array.au3> #include <File.au3> ;E:\icare\icare\NI-WI-NBSE-ERR.xml ;Run("C:\Program Files (x86)\Notepad++\notepad++.exe E:\icare\icare\NI-WI-NBSE-ERR.xml") Run("C:\Program Files (x86)\Notepad++\notepad++.e
  9. How do I make this variable work? $MY_SESSION_ID = for /f "tokens=3-4" %%a in ('query session %username%') do @if "%%b"=="Active" set MY_SESSION_ID=%%a MsgBox(1, "My Session ID", "Session ID is: " & $MY_SESSION_ID)
  10. ShellExecute("\\servername\cofs\Organization\ITS\_Software & Hardware\AS400\DVD\Windows\cwblaunch.exe", '"/v/qn ADDLOCAL=ALL"') I had to dig to find the right setup.exe according to the documentation but I got it to run. However, it pops up with this dialog box (attached) showing me the command line parameters, as if I'm incorrect. It continues to run the install however, but seemingly without any of the command line parameters. Here's the command I entered into the CMD prompt exactly: "\\servername\cofs\Organization\ITS\_So
  11. I feel like i have been going in circles and getting no where I am trying to do a git pull LOCAL $sTemp = '"C:\Program Files (x86)\Git\bin\git.exe" pull' LOCAL $sLine = '' local $sToWrite = '' local $PID = Run($sTemp,$GitDir,@SW_MAXIMIZE, $STDIN_CHILD + $STDOUT_CHILD) StdinWrite($PID,$sToWrite) IF( $PID <> 0) THEN While 1 $sLine &= StdoutRead($PID) MsgBox(0,'returned',$sLine) If @error Then ExitLoop Sleep(25) Wend Exit EndIf i have also tried LOCAL $sTemp = '"C:\Program Files (x86)\Git\bin\g
  12. Hi Everyone I want to have a GUI, but which will accept command line options on launch. So, the commanline would look something like myAPP.EXE -bigfont -bigicon where myAPP.EXE would be the name of the AutoIt EXE, and the -bigfont & -bigicon items represent optional command line parameters with which the EXE starts. I am not looking at creating a CUI. This is GUI, but with startup command line parameters. These command line parameters would only be read once, during start up of the EXE. I have searched the forum, no luck. What I did find was this commented by Water: https://www.autoitsc
  13. I am trying to create a script that allows me to run and use it with CMD as the interface. For example: This is the code I have so far... #AutoIt3Wrapper_Change2CUI=y ConsoleWrite("Enter PIN" & @CRLF & ":") Local $input While 1 $input &= ConsoleRead() if StringInStr($input,@CRLF) <> 0 then ExitLoop Wend if $input = "1111" & @CRLF Then ConsoleWrite("Success") Else ConsoleWrite("Failure") ConsoleWrite($input) EndIf The problem is that after it writes Enter PIN: it will not accept input and gets stuck. After I close the script, all the input I typed shows
  14. I forgot to update this, I had responded to a topic with an updated PCRE for parsing individual items/options, so here's the updated code: _StringParseParameters: Parse Parameters in a string: Returns an array as if a command-line parser split the elements, or if nothing found an @error. Note there is a look-behind and look-ahead assertion to prevent grabbing quotes, while also allowing for cases where there are empty quotes (""): Local $aParsedArray=StringRegExp($sStringToParse,'((?<=\s"|^")[^"]+(?=")|[^\s"]+)',3) The only thing I'd do beforehand is expand any environment strings
  • Create New...