The script I posted above will not do "precision" sync as written. Enabling the USB remote sync menu option makes no difference in this case. Variations between cameras of as much as 100 mSec are quite possible.
Thanks waterwingz [and thanks for the script also (if closely examined all of these 'things' add to the understanding of others) - and that is a 'gift'].
Edit [for my memory]background history for:
set_config_value( 121, 1 ) -- USB port disableset_config_value( 121, 0 ) -- USB port enable for ptpsee here
http://chdk.setepontos.com/index.php?topic=6429.0 [2nd June 2011]
"Is there anyway to turn on/off the CHDK remote parameter PROGRAMMATICALLY, without having to go through the CHDK menu?"->
"...Maybe CHDK-DE is a solution for you. There is a script function get/set_config_value(). With this function you can get/set most configuration values, also on/off remote control -> set_config_value(121, <1|0>)."->
"...Added as of release 1348 to the regular CHDK - supported in both LUA and uBASIC."
but note:
http://chdk.setepontos.com/index.php?topic=8291.0 [8th July 2012]
"Only one question: it could be possible to connect the four cameras by a hub to the computer, and open four PTPCamGui applications, one for each camera? Thank you very much."
->
"To use ptpcamgui or other PTP software, you have to use the PTP Extension, not USB remote. In that case, you can use a hub. I'm not sure about ptpcamgui, but you can run multiple PTP client applications. You have to be careful because some operations could cause other instances to disconnect."
->
"...ptpCamGui is not suitable. A function to connect multiple cameras has been tested temporarily, but this feature was too unstable and was removed."
http://chdk.wikia.com/wiki/CHDK_Scripting_Cross_Reference_Page- get_mode -> Returns whether record mode or playback mode is active, useful for closing scripts that are meant to be run in a certain mode (like the majority of all available scripts). Returns 0 in record mode, 1 in playback mode, 2 when mode dial is set to videomode AND camera is in record mode (2 since changeset #499) **This command has advanced functionality in Lua, see Lua Reference: get_mode]
- get_usb_power -> get status of USB connector ( voltage present or not present ) [http://chdk.wikia.com/wiki/USB_Remote: Calling function get_usb_power with parameters = 1 returns the current state of USB power ( 0=off, 1=on)]
- click -> press and release a key
- release -> releases the specified camera button
- press -> activates the specified camera button
in more detail
http://chdk.wikia.com/wiki/UBASIC/TutorialScratchpad:
Camera commands can be written in 3 flavors / command-methods:
click "button-name"Presses the button momentarily, used for one time, instantaneous commands. This will be the most often used method of issuing a camera command.
press "button-name"Presses and HOLDS the required camera button, it remains pressed until the same button-name is given the release command. Some camera commands can only be accessed when a button is held down during use.
Example: In Manual Focus in the S-series cameras the MF button needs to be held down while the focus commands are being issued. Or when shooting in high-speed burst mode, then the shutter button must be held down during its needed duration with the press "shoot_full" command.
release "button-name"Ends the press "button-name" command. If using a press "button-name" command be sure to end it with the release "SAME-button-name command at the appropriate sequence in your script to reset things back to normal.
All camera command buttons that you can press manually you may use in your scripts using this syntax. The only exception is the often-used
shoot command. shoot is used by itself without the leading click, press, and release command methods.
and Additional uBASIC and Lua Scripting Commands
http://chdk.wikia.com/wiki/Script_commands