- Mar 22, 2013
- 9,144
- 10,489
I'm using Windows 10. I have a computer which automatically restarts once every 24 hours, and when it starts I have a BAT file in the Startup folder which automatically starts and opens about 60 programs, and in the end it opens an AutoIT script. But the AutoIT script doesn't run properly when I start it using the BAT file, and in particular these commands:
So the AutoIt script starts, it does the sleeps, it does the clicks, but it never runs these lines of code. I tried using the raw AutoIT file, I also tried compiling it as x86 and x64, and it doesn't work.
When I start the script manually, then it works fine.
I was told that I should set the Workingdir (parameter 2) to the proper path in the RunWait(), and that may fix it. But I'm not coder and after googling and trying some things, I don't know how to set the workingdir.
Can anyone tell me how to do it?
Code:
Local $Magick = 'magick convert "C:\Users\Me\Desktop\Folder\image.jpg" -crop +125+25 -crop -125-25 image1.png"'
RunWait(@ComSpec & " /c " & $Magick)
So the AutoIt script starts, it does the sleeps, it does the clicks, but it never runs these lines of code. I tried using the raw AutoIT file, I also tried compiling it as x86 and x64, and it doesn't work.
When I start the script manually, then it works fine.
I was told that I should set the Workingdir (parameter 2) to the proper path in the RunWait(), and that may fix it. But I'm not coder and after googling and trying some things, I don't know how to set the workingdir.
Can anyone tell me how to do it?