Hello!
I have made a program, that opens a folder, and then store the path ("C:\programFiles\etc") in a variable.
Then i need to open the command panel as administrator, and write in the stored path, and some other text.
Can i somehow instantly copypaste the text i needed, instead of writing in the command panel with the Send commands?
#RequireAdmin
#include <MsgBoxConstants.au3>
Global Const $sMessage = "Select a folder"
; Display an open dialog to select a file.
Global $sFileSelectFolder = FileSelectFolder($sMessage, "")
If @error Then
MsgBox($MB_SYSTEMMODAL, "", "Nem választottál ki mappát!")
Exit
EndIf
Global $Tiff_path = $sFileSelectFolder & "\TiffChecker_2_32"
FileCopy( "C:\TiffChecker_2_32.exe" , $sFileSelectFolder)
$CMD = $Tiff_path & " " & $sFileSelectFolder & " /s/d"
Run("C:\WINDOWS\system32\cmd.exe")
WinWaitActive("C:\WINDOWS\system32\cmd.exe")
Send($CMD)
Sleep(1000)
Send("{ENTER}")
sleep(1000)
MsgBox(0,"Press OK", "Press OK to continue")
FileCopy("C:\Tiffchecker.txt", $sFileSelectFolder)
Also, how do i close the command panel, when the program is finished? (usually its under 1 second, so after the send i just put a Sleep function there)