15 posts in this topic
I want to run a python script from autoit.
I know we can do this with shellexecute or run , but this python script takes 3 cmd line arguments.
How to pass them from autoit script?
I tried many ways.
Following solution also not working
RunWait( 'fullpath\Python.exe Scriptpath\ReadLog.py -f "file.log" -k "key" -e "errMsg" ') Found solution:
RunWait( 'fullpath\Python.exe ReadLog.py -f "file.log" -k "key" -e "errMsg" ', 'Working_directory_path')
I have excel file like this
and i want to cut cell/text from excel to other software.
I have to cut the cell of B column one by one and past into other software
If Winexists("No Data Found")
then restore cuted cell and goto next/down side cell
How to do it ?
Im trying to read the output from CMD using Dllcall, here is my code:
#include <WinAPI.au3> #include <array.au3> Global Const $STD_OUTPUT_HANDLE = -11 Global Const $_CONSOLE_SCREEN_BUFFER_INFO = _ "struct;int dwSizeX;" & _ "short dwSizeY;" & _ "short dwCursorPositionX;" & _ "short dwCursorPositionY;" & _ "short wAttributes;" & _ "short Left;" & _ "short Top;" & _ "short Right;" & _ "short Bottom;" & _ "short dwMaximumWindowSizeX;" & _ "short dwMaximumWindowSizeY;endstruct" $pCmd = Run( "cmd.exe" ) Sleep(1000) $hCmd = WinGetHandle("") ConsoleWrite('handle:' & $hCmd & @CRLF) $aRet = DllCall("kernel32.dll", "int", "AttachConsole", "dword", $pCmd) ;_ArrayDisplay($aRet) If $aRet <> 0 Then $vHandle_data='' $vHandle='' $vHandle_data = DllStructCreate($_CONSOLE_SCREEN_BUFFER_INFO) ; Screen Buffer structure $aRet1 = DllCall("kernel32.dll", "hwnd", "GetStdHandle", "dword", $STD_OUTPUT_HANDLE) if not @error Then $vHandle = $aRet1 $aRet = DllCall("kernel32.dll", "int", "GetConsoleScreenBufferInfo", "hwnd", $vHandle, _ "ptr", $vHandle_data) MsgBox(0, '1',DllStructGetData($vHandle_data, 'dwSizeX') & _WinAPI_GetLastErrorMessage()) EndIf It did not work, i got the message 'The handle is invalid'. Please help?
Thank you in advance!
cause im too new in the Auto it world i will try it with the your help. hopefully.
I woud like to know how i can handle my Problem.
I have a Excel Data with 362 random numbers.
this numbers are a part of the filepath ...example
as u can see its the first number of the Excel data. After the first 4 numbers it shoud make a "_" than another 5 "_"
This is my first question. How can i handle this to make it Shell execute.
If i am in the path.
the code shoud search for specific PDF Files.
They are named like: 0050569E364B1ED79B900F73E62660EC.pdf
the first 15 letters are always the same
when he found this data he has to copy it on a Folder on the Desktop.
(There can also be 2 or 3 pdfs in one Folder with this letters)
Please give me some help :-)
as you know im on a very low autoit-level.
My question is: How can i read all PDFs from a Folder wich is open and copy them to a Folder on a Desktop.
The Folder wich contains the PDFs is variable Z:\Projektls\"*"*"*EVERYTIME ANOTHER ENDING"*"*"*"*"
There can be 1 PDF or even 15 PDFs.
i tried it with _FileListToArray and _FileCopy but i Need some help to understand this language