Jump to content

Alex1759

Members
  • Posts

    5
  • Joined

  • Last visited

Profile Information

  • Location
    New Zealand
  • Interests
    Automation, sailing and cycling

Alex1759's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I sorted out the space issue - there was a space in the window tile so it needed the space in the command. I evaded the timing issues by using XP task schedule so my AutoIt script remains at just four lines. I have run several remote capture sessions and am now working getting the power supplies sorted so I can go independent of the grid. Thanks again for the most useful help.
  2. Hi Plato The following puts the message box on the screen before the photo is taken supporting your argument my "ProcessWait" was just timing out and not causing a "wait" to occur. I had deduced I needed to slow the AutoIt process down to let the camera do its thing before it got shut down by the "WinClose" instruction. This supports my hunch, but I was getting a facsimile of the right answer for all the wrong reasons when I used - ProcessWait("RemoteCapture DC",10) without the .exe . Run("C:\Program Files\Canon\CameraWindow\RemoteCaptureDC\RemoteCaptureDC.exe") WinWaitActive("RemoteCapture DC", "") ControlClick("RemoteCapture DC", "", "[iD: 1011]") msgBox(0,"Close RC DC when download is complete", "") WinClose("RemoteCapture DC") Where as: Run("C:\Program Files\Canon\CameraWindow\RemoteCaptureDC\RemoteCaptureDC.exe") WinWaitActive("RemoteCapture DC", "") ControlClick("RemoteCapture DC", "", "[iD: 1011]") ProcessWait("RemoteCapture DC.exe",15) WinClose("RemoteCapture DC") takes the shot and shuts down at whatever time has been set in ProcessWait line timed from the moment the script is started. It seems there is no feedback between RC DC and AutoIt because I have not created any. I presume it works because the process time of RC DC is shorter than the run time of my AutoIt script with the wait instruction written correctly. $ReturnValue = ProcessWait("RemoteCapture DC.exe", 15) MsgBox(0, "$ReturnValue equals...", $ReturnValue) placed after the "ProcessWait" instruction produced a message box with a "0" OK, but seemed to mess-up the timing by introducing another 15 second wait I was not expecting. A good lesson in demonstrating and understanding what is actually going on, next lesson might be figuring out a feedback loop to test then data has down loaded OK, some time if it becomes a problem, Thanks, Alex.
  3. Hi Plato I commented out each line in turn until the process failed, the following lines seem to be needed. My approach to something not working, when trying to follow the rules, is to add lines that might help from what I can find in the in examples and then trim out what might be redundant until I have a functioning program. Pretty can come later as long as I have not made spaghetti. I had added the WinActive and ControlEnable as I did not know where the process was failing (because I have not yet worked out how to capture the "Return Value" yet). It seems the key was adding the ProcessWait. It works without WinActive and ControlEnable but not without ProcessWait. Your comment about ProcessWait is interesting and I may have to look into it more deeply. Thanks again Alex. "ProcessWait" version: Run("C:\Program Files\Canon\CameraWindow\RemoteCaptureDC\RemoteCaptureDC.exe") ; opens RC and actives camera lens WinWaitActive("RemoteCapture DC") ; waits till RC is active ControlClick("RemoteCapture DC", "", "[iD: 1011]") ; operates "Release Button" ProcessWait("RemoteCapture DC", 10) ; waits ten seconds while photo is down loaded to hard drive WinClose("RemoteCapture DC") ; closes RC, closes camera lens
  4. The suggestions are great, thanks Plato. I will follow up on them and see if I can work out some of the whys. I am sure there are many "odd" things to sort out, all part of the learning curve and coming to grips with a new set of syntax and function. So much power and no real sence of what it could do, yet.
  5. Hi. The following is my first script. It took a couple of hours digging in the help files to find the right functions to use. I had my fill of basic back in the 70's so it was fun to get back into some simple programming to do stuff we could only dream of. What have I done? - I have successfully written the core of a camera automation program. It activates a picture capture program, waits while the data is downloaded to the controlling PC then turns the camera off until the next activation. Simple, but very cool. There may be some redundancy in some of the lines but it works and I can trim fat out later. The help files and forum are a great asset. Thanks, Alex 1759 Run("C:\Program Files\Canon\CameraWindow\RemoteCaptureDC\RemoteCaptureDC.exe") WinWaitActive("RemoteCapture DC") WinActive("RemoteCapture DC") ControlEnable("RemoteCapture DC", "", "[iD: 1011]") ControlClick("RemoteCapture DC", "", "[iD: 1011]") ProcessWait("RemoteCapture DC", 10) WinClose("RemoteCapture DC")
×
×
  • Create New...