Utilities #1 (a collection of mini-scripts)

  • 20 Replies
  • 9106 Views
*

Offline SkyWalker9

  • ****
  • 301
  • SX20 IS (fw 1.02b)
  • Publish
    Utilities #1 (a collection of mini-scripts)
    « on: 20 / February / 2011, 21:41:56 »
    Advertisements
    While designing and testing various sections of script I find that it would be nice if I had access to these same routines other than just in the script they were designed. Unfortunately, having too many "nice", short scripts on the camera would create more script files to jump over when loading scripts. This script is the method I used to create a single script that allows me to have multiple mini-scripts inside.

    At first I thought about entering each mini-scripts input data real-time, but I wanted to avoid that when possible. I decided that I would try to work out a method by allowing each script parameter to have a different meaning with each mini-script.

    After the "Utility" script has been loaded, the parameters will look like this on the OSD:

    1Days:2DOF:3DMP:4Shots (     1)      1Days:2DOF:3DMP:4Shots (     2)
      SD : mm :    :  SH   (    20)        SD : mm :    :  SH   (     0)
      SM :  m :    :  SM   (     2)        SM :  m :    :  SM   (    39)
      SY :    :    :  EH   (    11)        SY :    :    :  EH   (    11)
      ED :    :    :  EM   (    27)        ED :    :    :  EM   (    27)
      EM :    :    :  IM   (     2)        EM :    :    :  IM   (     2)
      EY :    :    :  IS   (    11)        EY :    :    :  IS   (    11)

    Each mini-script is identified by the first parameter line and the mini-script is chosen by the number in the name of the min-script. If there are parameters for that mini-script, they are shown in the column just below the mini-script name.

    Utility mini-scripts

    1Days. This mini-script allows the user to determine the number of days between two dates (inclusive). The top three parameters for "1Days" are for the Start date where SD=day of month, SM=month, and SY=year. The bottom three parameters for "1Days" are for the End date where ED=day of month, EM=month, and EY=year. In the above example on the left, I have selected the 1st mini-script and set the Start date as 20/02/11 and the End date as 27/02/11.

    2DOF. This mini-script allows a user to convert millimeters or meters to the english equivalents of feet/yds/inches. If you want to convert a value from "mm", then you would enter the number on the "mm" parameter line and make sure the "m" parameter line is 0. If you want to convert a value from "m", then you would enter the number on the "m" parameter line and make sure the "mm" parameter line is 0. In the above example on the right, I have selected the 2nd mini-script "2DOF" and will convert 39 meters into yards/feet/inches. Note: in this case the mini-script only uses the first three parameter lines for input, so the user needs to set the "mm" parameter line to 0 per the instructions in this paragrah. Since the "2DOF" ignores the bottom 4 parameter lines it won't matter what their values are.

    3DMP. This is a mini-script that I created to dump the standard PropCas memory locations and save to a LOG file. This has helped me "discover" the PropCas locations and values for the SX20. The mini-script should work on any CHDK camera. It saves locations 1-600. The LOG file name is created using the current hour and minute of the camera (24 hr time clock). For example, the file name would look like "LOG_2023.TXT" and would be located in the CHDK/LOG folder. Naming the LOG files in this way will allow taking multiple snapshot dumps. I then compare the contents of two LOG files at the same time using one of the tools of the editor I use for CHDK scripts (TextPad).

    4Shots. This mini-script calculates the maximum number of shots in a time period specified by the Start Hour (SH) and Start Minute (SM) and End Hour (EH) and End Minute (EM) using an interval specified by Interval Minutes (IM) and Interval Seconds (IS).

    Special note: Since the CHDK UBasic is an interpreted script reader, any mini-script that is time sensitive should be located near the top of the "Utility" script in order to insure the fastest run times. You'll notice that while the "3DMP" mini-script is the 3rd in the parameter list, it is located near the top of the "Utiliy" script to insure it runs quicker.

    Just save this script to your CHDK/SCRIPT folder as BAS.

    Code: [Select]
    rem Author SkyWalker9
    @title Utilities
    @param a 1Days:2DOF:3DMP:4Shots
    @default a 1
    @param b SD   : mm :    :  SH
    @default b 1
    @param c SM   :  m :    :  SM
    @default c 1
    @param d SY   :    :    :  EH
    @default d 11
    @param e ED   :    :    :  EM
    @default e 1
    @param f EM   :    :    :  IM
    @default f 1
    @param g EY   :    :    :  IS
    @default g 11

      if a=1 then goto "option1"
      if a=2 then goto "option2"
      if a=3 then goto "option3"
      if a=4 then goto "option4"
      goto "done"

    :option3
    rem dump PropCas standard memory locations 1-600 to LOG file for comparison
      y=get_time 1
      x=get_time 2
      h=x*100+y
      if h<1 then h=1
      if h>9999 then h=9999
      print_screen h
      z=0
      for i=1 to 300
        x=i+300
        get_prop i u
        get_prop x v
        print "IDs="i"/"u" "x"/"v
        z=z+1
        if z=10 then print " "
        if z=10 then let z=0
      next i
      print_screen 0
      print "LOG_"h".TXT done"
      goto "done"
      
    :option1
    rem calculate the number of days between two dates (inclusive)
    rem calculate what day of the year is the start day
      y=0
      Y=d
      for i=1 to c
        gosub "month_days"
        y=y+D
      next i
      B=y-(D - b)
    rem calculate what day of the year is the end day
      y=0
      Y=g
      for i=1 to f
        gosub "month_days"
        y=y+D
      next i
      E=y-( D - e)
    rem correct for overlapping years
      if g>d then let y=(365-B+1)+E else y=E-B+1
      print "Number of Days="y
      goto "done"
    :month_days
      if (Y%4)=0 then x=29 else x=28
      select i
       case 1,3,5,7,8,10,12; let D=31
       case 4,6,9,11; let D=30
       case_else let D=x
      end_select
      return

    :option2
    rem DOF conversion from m/mm to feet/yards/inches
     if b=0 then v=c*1000 else v=b
     w=v*3937/100000
     n=v*3937/1000
     m=n/10
     n=n-(m*10)
     m=m-(w*10)
     if n>5 then let m=m+1
     if b=0 then goto "feet"
       print "DOF: "b" mm ("w"."m" inches)"
       goto "done"
    :feet
       x=0
       m=w%12
       w=w/12
       x=w/3
       if x>=1 then w=w-(x*3)
       print "DOF: "c"m ("x"yd "w"ft "m"in)"
       goto "done"

    :option4
    rem Check input variables for proper values
      if f<0 then f=0
      if g<0 then g=0
      if b<0 then b=0
      if b>23 then b=23
      if c<0 then c=0
      if c>59 then c=59
      if d<0 then d=0
      if d>23 then d=23
      if e<0 then e=0
      if e>59 then e=59
      D=(f*600+g*10)*100
      if D<1 then D=1
      if d>=b then goto "ok1"
        print "START Time after END"
        end
    :ok1
      N=((d*60+e)-(b*60+c))*60000
      n=N/D
      print "Number of shots="n

    :done
    end
    « Last Edit: 27 / February / 2011, 12:16:00 by SkyWalker9 »

    *

    Offline SkyWalker9

    • ****
    • 301
    • SX20 IS (fw 1.02b)
  • Publish
    Re: Utilities #2 (a collection of mini-scripts)
    « Reply #1 on: 25 / February / 2011, 18:16:40 »
    Utilities #2

    This is the second in the series of mini-scripts.

    1ReDo:2Batt:            (     1)
    Reset:     :            (     0)
    Zoom :     :            (     0)

    Focus:     :            (     0)
    .    :     :            (     0)
    .    :     :            (     0)

    .    :     :            (     0)

    Like the last time, each mini-script is identified by the first parameter line and the mini-script is chosen by the number in the name of the mini-script. If there are parameters for that mini-script, they are shown in the column just below the mini-script name.

    Utility mini-scripts

    1ReDo. I decided to create this mini-script after a photo session where I needed to change the batteries in my camera. Normally that wouldn't be a problem, however it happened in the middle of shooting a large panoramic series. Because I had to change the batteries I had no way to reset the zoom exactly to what it was previously. Needless to say, I had to re-shoot the first part of the series again. Since then, I have been asked to take photos of the front of a business over the next year to document the changes. These photos must be taken from the same location and must have the same zoom factor/step. This script will allow me to do that.

    This script saves a snapshot of various important camera settings in a LOG file in the CHDK/LOGS folder. In order to read the LOG file while "in the field" after changing batteries, just use the CHDK text reader. To read the TXT file select "Miscellaneous stuff", "Text file reader", "Open new file...", navigate to the CHDK/LOGS folder, select the LOG_hhmm.TXT file to read (the "hhmm" will be the hour and minute that the TXT file was saved). To reset the zoom, just read what the zoom step was when the file was created and use 1ReDo. Set the "Reset" parameter to 1 and set the Zoom parameter to the value you need (and/or focus point if desired). If the "Focus" parameter is set to zero, then it will not be changed. Here is a sample LOG:

    Date: 25/2/2011
    Time: 16:51:30
     
    Zoom Step: 0 of 129
    Focus: 241
    Far_limit: 328
    Near_limit: 190
    DOF: 138
    Hyperfocal_dist: 888
     
    Video Quality: 1280x720
    Resolution: Large
    Av: F5.6
    Tv: 1/60
    ISO: 50(80)
     
    Sensor Orient: 0
    IS Mode: OFF
    Exp Comp: 0
    Flash Exp Comp: 0
     
    WB: Auto
    Mode Dial: Av
    Safety MF: OFF
    Meter: Evaluative
    Date Stamp: OFF
     
    Flash mode: OFF
    USB_power: Off
    Disk Size(MB): 3871
    Free Space(MB): 3850

    2Batt. This mini-script was written to help a CHDK user test the maximum number of shots that could be taken by a set of batteries. It was designed to zoom all the way in, take a shot, zoom all the way out, take a shot and then continuously repeat until the batteries could no longer take photos. The mini-script first checks the maximum number of zoom steps that are available for the camera, and then uses that limit for the zooming out step. While some safegaurds have been built in, the user is cautioned to use at your own risk.

    Special notes:

    1. Since the CHDK UBasic is an interpreted script reader, any mini-script that is time sensitive should be located near the top of the "Utility" script in order to insure the fastest run times.

    2. If PropCas statements are used in a mini-script, they are specifically identified in the script positioned between "rem" statements so that they can be easily found and updated to the user's model of camera. Since the list of PropCas for the SX20 is not complete, I have been keeping track and updating the list of PropCas values that I find in the SX20 forum in this post: http://chdk.setepontos.com/index.php?topic=4348.msg60704#msg60704

    Just save this script to your CHDK/SCRIPT folder as BAS.

    <Part 1>
    « Last Edit: 17 / March / 2011, 10:07:47 by SkyWalker9 »

    *

    Offline SkyWalker9

    • ****
    • 301
    • SX20 IS (fw 1.02b)
  • Publish
    Re: Utilities #2 (a collection of mini-scripts)
    « Reply #2 on: 25 / February / 2011, 18:21:02 »
    Code: [Select]
    rem Author SkyWalker9
    @title Utilities #2
    @param a 1ReDo:2Batt:
    @default a 1
    @param b Reset:     :
    @default b 0
    @param c Zoom :     :
    @default c 0
    @param d Focus:     :
    @default d 0
    @param e .    :     :
    @default e 0
    @param f .    :     :
    @default f 0
    @param g .    :     :
    @default g 0

      if a=1 then goto "option1"
      if a=2 then goto "option2"
      goto "done"

    :option1
      if b=1 then goto "reset_loop"
      z=get_time 0
      y=get_time 1
      x=get_time 2
      m=get_time 3
      n=get_time 4
      p=get_time 5
      h=x*100+y
      if h<1 then h=1
      if h>9999 then h=9999
      print_screen h
      print "Date: "m"/"n"/"p
      print "Time: "x":"y":"z
      print " "
      y=get_zoom_steps
      x=get_zoom
      print "Zoom Step: "x" of "y
      x=get_focus
      print "Focus: "x
      x=get_far_limit
      print "Far_limit: "x
      x=get_near_limit
      print "Near_limit: "x
      x=get_dof
      print "DOF: "x
      x=get_hyp_dist
      print "Hyperfocal_dist: "x
      print " "
    rem ******************************************************
      get_prop 169 x
      if x=1 then print "Video Quality: 320x240"
      if x=2 then print "Video Quality: 640x480"
      if x=4 then print "Video Quality: 1280x720"
    rem ******************************************************
      x=get_resolution
      if x=0 then print "Resolution: Large"
      if x=1 then print "Resolution: Medium 1"
      if x=2 then print "Resolution: Medium 2"
      if x=3 then print "Resolution: Medium 3"
      if x=4 then print "Resolution: Small"
      if x=8 then print "Resolution: Wide"
      x=get_user_av_id
      if x=9 then print "Av: F2.8"
      if x=10 then print "Av: F3.2"
      if x=11 then print "Av: F3.5"
      if x=12 then print "Av: F4.0"
      if x=13 then print "Av: F4.5"
      if x=14 then print "Av: F5.0"
      if x=15 then print "Av: F5.6"
      if x=16 then print "Av: F6.3"
      if x=17 then print "Av: F7.1"
      if x=18 then print "Av: F8.0"
      x=get_user_tv_id
      if x=-12 then print "Tv: 15s"
      if x=-11 then print "Tv: 13s"
      if x=-10 then print "Tv: 10s"
      if x=-9 then print "Tv: 8s"
      if x=-8 then print "Tv: 6s"
      if x=-7 then print "Tv: 5s"
      if x=-6 then print "Tv: 4s"
      if x=-5 then print "Tv: 3.2s"
      if x=-4 then print "Tv: 2.5s"
      if x=-3 then print "Tv: 2s"
      if x=-2 then print "Tv: 1.6s"
      if x=-1 then print "Tv: 1.3s"
      if x=0 then print "Tv: 1s"
      if x=1 then print "Tv: 0.8s "
      if x=2 then print "Tv: 0.6s"
      if x=3 then print "Tv: 0.5s"
      if x=4 then print "Tv: 0.4s"
      if x=5 then print "Tv: 0.3s"
      if x=6 then print "Tv: 1/4"
      if x=7 then print "Tv: 1/5"
      if x=8 then print "Tv: 1/6"
      if x=9 then print "Tv: 1/8"
      if x=10 then print "Tv: 1/10"
      if x=11 then print "Tv: 1/13"
      if x=12 then print "Tv: 1/15"
      if x=13 then print "Tv: 1/20"
      if x=14 then print "Tv: 1/25"
      if x=15 then print "Tv: 1/30"
      if x=16 then print "Tv: 1/40"
      if x=17 then print "Tv: 1/50"
      if x=18 then print "Tv: 1/60"
      if x=19 then print "Tv: 1/80"
      if x=20 then print "Tv: 1/100"
      if x=21 then print "Tv: 1/125"
      if x=22 then print "Tv: 1/160"
      if x=23 then print "Tv: 1/200"
      if x=24 then print "Tv: 1/250"
      if x=25 then print "Tv: 1/320"
      if x=26 then print "Tv: 1/400"
      if x=27 then print "Tv: 1/500"
      if x=28 then print "Tv: 1/640"
      if x=29 then print "Tv: 1/800"
      if x=30 then print "Tv: 1/1000"
      if x=31 then print "Tv: 1/1250"
      if x=32 then print "Tv: 1/1600"
      if x=33 then print "Tv: 1/2000"
      if x=34 then print "Tv: 1/2500"
      if x=35 then print "Tv: 1/3200"
      x=get_iso
      if x=0 then print "ISO: AutoISO"
      if x=1 then print "ISO: 50(80)"
      if x=2 then print "ISO: 100"
      if x=3 then print "ISO: 200"
      if x=4 then print "ISO: 400"
      if x=5 then print "ISO: 800"
      if x=6 then print "ISO: 1600"
      if x=7 then print "ISO: 3200"
      if x=-1 then print "ISO: HiISO"
      print " "
      x=get_orientation_sensor
      print "Sensor Orient: "x
      x=get_IS_mode
      if x=0 then print "IS Mode: Continuous"
      if x=1 then print "IS Mode: Shoot Only"
      if x=2 then print "IS Mode: Panning"
      if x=3 then print "IS Mode: OFF"
    rem ******************************************************
      get_prop 209 x
      print "Exp Comp: "x
      get_prop 127 x
      print "Flash Exp Comp: "x
      print " "
      get_prop 270 x
      if x=0 then print "WB: Auto"
      if x=1 then print "WB: Daylight"
      if x=2 then print "WB: Cloudy"
      if x=3 then print "WB: Tungsten"
      if x=4 then print "WB: Fluorescent"
      if x=5 then print "WB: Fluorescent H"
      if x=6 then print "WB: Flash"
      if x=7 then print "WB: Custom"
      get_prop 50 x
      if x=8228 then print "Mode Dial: Custom"
      if x=-32767 then print "Mode Dial: Manual"
      if x=-32766 then print "Mode Dial: Av"
      if x=-32765 then print "Mode Dial: Tv"
      if x=-32764 then print "Mode Dial: Program"
      if x=-32768 then print "Mode Dial: Auto"
      if x=-32755 then print "Mode Dial: Portrait"
      if x=-32756 then print "Mode Dial: Landscape"
      if x=-32757 then print "Mode Dial: Night Snapshot"
      if x=-32249 then print "Mode Dial: Sports"    
      if x=16402 then print "Mode Dial: Sunset"  
      if x=-32246 then print "Mode Dial: Stitch Assist"    
      if x=2600 then print "Mode Dial: Movie"
      get_prop 281 x
      if x=0 then print "Safety MF: OFF"
      if x=1 then print "Safety MF: ON"
      get_prop 155 x
      if x=0 then print "Meter: Evaluative"
      if x=1 then print "Meter: Spot"
      if x=2 then print "Meter: Center Wgt"
      get_prop 66 x
      if x=0 then print "Date Stamp: OFF"
      if x=1 then print "Date Stamp: Date"
      if x=2 then print "Date Stamp: Date & Time"
      print " "
    rem ******************************************************
      x=get_flash_mode
      if x=0 then print "Flash mode: auto"
      if x=1 then print "Flash mode: ON"
      if x=2 then print "Flash mode: OFF"
      x=get_usb_power
      if x=0 then print "USB_power: Off" else print "USB_power: On"
      x=get_disk_size
      x=x/1000
      print "Disk Size(MB): "x
      x=get_free_disk_space
      x=x/1000
      print "Free Space(MB): "x
      print_screen 0
      goto "done"
    :reset_loop
      if c<0 then c=0
      x=get_zoom_steps
      if c<=x then set_zoom x
      if d<>0 then set_focus d
      goto "done"

    :option2
      x=get_zoom_steps
      x=x-2
      s=1
    :repeat
      set_zoom 1
      sleep 1500
      cls
      print "Shot: "s
      print " "
      shoot
      sleep 600
      s=s+1
      set_zoom x
      sleep 1500
      cls
      print "Shot: "s
      print " "
      shoot
      sleep 600
      s=s+1
      goto "repeat"
    :done
    end

    <Part 2>
    « Last Edit: 17 / March / 2011, 10:04:10 by SkyWalker9 »

    *

    Offline SkyWalker9

    • ****
    • 301
    • SX20 IS (fw 1.02b)
  • Publish
    Re: Utilities #2 (a collection of mini-scripts)
    « Reply #3 on: 26 / February / 2011, 18:26:22 »
    Update to Utilities #2 - added 'CntDwn" mini-script

    This is the second in the series of mini-scripts.

    1ReDo:2Batt:3CntDwn:    (     1)
    Reset:     :Seconds:    (     0)
    Zoom :     :#Shots :    (     0)
    Focus:     :IntMin :    (     0)
    .    :     :IntSec :    (     0)
    .    :     :            (     0)
    .    :     :            (     0)

    Like the last time , each mini-script is identified by the first parameter line and the mini-script is chosen by the number in the name of the min-script. If there are parameters for that mini-script, they are shown in the column just below the mini-script name.

    Utility mini-scripts

    1ReDo. I decided to create this mini-script after a photo session where I needed to change the batteries in my camera. Normally that wouldn't be a problem, however it happened in the middle of shooting a large panoramic series. Because I had to change the batteries I had no way to reset the zoom exactly to what it was previously. Needless to say, I had to re-shoot the first part of the series again. Since then, I have been asked to take photos of the front of a business over the next year to document the changes. These photos must be taken from the same location and must have the same zoom factor/step. This script will allow me to do that.

    In order to read the LOG file while "in the field" after changing batteries, just use the CHDK text reader. To read the TXT file select "Miscellaneous stuff", "Text file reader", "Open new file...", navigate to the CHDK/LOGS folder, select the LOG_hmm.TXT file to read (the "hhmm" will be the Hour and minute that the TXT file was run). To reset the zoom, just read what the zoom step was when the file was created and use 1ReDo. Set the "Reset" parameter to 1 and set the Zoom parameter to the value you need (and/or focus point if desired). If the "Focus" parameter is set to zero, then it will not be changed.

    2Batt. This little mini-script I wrote that was written to help a CHDK user to test the maximum number of shots that could be taken by a set of batteries. It was designed to zoom all the way in, take a shot, zoom all the way out, take a shot and then continuously repeat until the batteries could no longer take photos. The mini-script first checks the maximum number of zoom steps are available on the camera, and then uses that limit for the zooming out step. While some safegaurds have been built in, the user is cautioned to use at your own risk.

    3CntDwn. This mini-script has a large pseudo-font countdown display timer for taking a series of pictures. There are four parameters: Seconds, #Shots, IntMin and IntSec. "Seconds" is the number of countdown seconds to display (1-10). The "#Shots" is the number of photos to shoot in the series. The interval (time between countdown sequences/shots) is set by the parameters "IntMin" and "IntSec" and allows the photographer time to setup each shot. I originally wrote this script so that I could see the countdown sequence while using an SX20 with its articulating display facing forward. Unfortunately CHDK doesn't display text properly on the LCD when it is facing forward. The display does flash the screen for each second of the countdown which can provide an indication of when a shot will be taken, but that was not what I intended. However, in normal use the display is still handy when taking group photos so I decided to include it here in case others might like to try it on their cameras. While the script is waiting for the next countdown sequence to begin, a "HOLD" message in this pseudo-font is displayed on the LCD. Here is a sample of the pseudo-font:
           *   **
          **  *  *
           *  *  *
           *  *  *
          ***  **


      *  *  **  *   ***
      *  * *  * *   *  *
      **** *  * *   *  *
      *  * *  * *   *  *
      *  *  **  *** ***

    Special notes:

    1. Since the CHDK UBasic is an interpreted script reader, any mini-script that is time sensitive should be located near the top of the "Utility" script in order to insure the fastest run times.

    2. If PropCas statements are used in a mini-script, they are specifically identified in the script positioned between "rem" statements so that they can be easily found and updated to the user's model of camera. Since the list of PropCas for the SX20 is not complete, I have been keeping track and updating the list of PropCas values that I find in the SX20 forum in this post: http://chdk.setepontos.com/index.php?topic=4348.msg60704#msg60704

    Just save this script to your CHDK/SCRIPT folder as BAS.

     
    <Part 1 of 3>
    « Last Edit: 08 / March / 2011, 19:23:27 by SkyWalker9 »


    *

    Offline SkyWalker9

    • ****
    • 301
    • SX20 IS (fw 1.02b)
  • Publish
    Re: Utilities #2 (a collection of mini-scripts)
    « Reply #4 on: 26 / February / 2011, 18:29:17 »
    Code: [Select]
    rem Author SkyWalker9
    @title Utilities #2
    @param a 1ReDo:2Batt:3CntDwn:
    @default a 1
    @param b Reset:     :Seconds:
    @default b 0
    @param c Zoom :     :#Shots :
    @default c 0
    @param d Focus:     :IntMin :
    @default d 0
    @param e .    :     :IntSec :
    @default e 0
    @param f .    :     :       :
    @default f 0
    @param g .    :     :       :
    @default g 0

      if a=1 then goto "option1"
      if a=2 then goto "option2"
      if a=3 then goto "option3"
      goto "done"

    :option1
      if b=1 then goto "reset_loop"
      z=get_time 0
      y=get_time 1
      x=get_time 2
      m=get_time 3
      n=get_time 4
      p=get_time 5
      h=x*100+y
      if h<1 then h=1
      if h>9999 then h=9999
      print_screen h
      print "Date: "m"/"n"/"p
      print "Time: "x":"y":"z
      print " "
      y=get_zoom_steps
      x=get_zoom
      print "Zoom Step: "x" of "y
      x=get_focus
      print "Focus: "x
      x=get_far_limit
      print "Far_limit: "x
      x=get_near_limit
      print "Near_limit: "x
      x=get_dof
      print "DOF: "x
      x=get_hyp_dist
      print "Hyperfocal_dist: "x
      print " "
    rem ***
      get_prop 169 x
      if x=1 then print "Video Quality: 320x240"
      if x=2 then print "Video Quality: 640x480"
      if x=4 then print "Video Quality: 1280x720"
    rem ***
      x=get_resolution
      if x=0 then print "Resolution: Large"
      if x=1 then print "Resolution: Medium 1"
      if x=2 then print "Resolution: Medium 2"
      if x=3 then print "Resolution: Medium 3"
      if x=4 then print "Resolution: Small"
      if x=8 then print "Resolution: Wide"
      x=get_user_av_id
      if x=9 then print "Av: F2.8"
      if x=10 then print "Av: F3.2"
      if x=11 then print "Av: F3.5"
      if x=12 then print "Av: F4.0"
      if x=13 then print "Av: F4.5"
      if x=14 then print "Av: F5.0"
      if x=15 then print "Av: F5.6"
      if x=16 then print "Av: F6.3"
      if x=17 then print "Av: F7.1"
      if x=18 then print "Av: F8.0"
      x=get_user_tv_id
      if x=-12 then print "Tv: 15s"
      if x=-11 then print "Tv: 13s"
      if x=-10 then print "Tv: 10s"
      if x=-9 then print "Tv: 8s"
      if x=-8 then print "Tv: 6s"
      if x=-7 then print "Tv: 5s"
      if x=-6 then print "Tv: 4s"
      if x=-5 then print "Tv: 3.2s"
      if x=-4 then print "Tv: 2.5s"
      if x=-3 then print "Tv: 2s"
      if x=-2 then print "Tv: 1.6s"
      if x=-1 then print "Tv: 1.3s"
      if x=0 then print "Tv: 1s"
      if x=1 then print "Tv: 0.8s "
      if x=2 then print "Tv: 0.6s"
      if x=3 then print "Tv: 0.5s"
      if x=4 then print "Tv: 0.4s"
      if x=5 then print "Tv: 0.3s"
      if x=6 then print "Tv: 1/4"
      if x=7 then print "Tv: 1/5"
      if x=8 then print "Tv: 1/6"
      if x=9 then print "Tv: 1/8"
      if x=10 then print "Tv: 1/10"
      if x=11 then print "Tv: 1/13"
      if x=12 then print "Tv: 1/15"
      if x=13 then print "Tv: 1/20"
      if x=14 then print "Tv: 1/25"
      if x=15 then print "Tv: 1/30"
      if x=16 then print "Tv: 1/40"
      if x=17 then print "Tv: 1/50"
      if x=18 then print "Tv: 1/60"
      if x=19 then print "Tv: 1/80"
      if x=20 then print "Tv: 1/100"
      if x=21 then print "Tv: 1/125"
      if x=22 then print "Tv: 1/160"
      if x=23 then print "Tv: 1/200"
      if x=24 then print "Tv: 1/250"
      if x=25 then print "Tv: 1/320"
      if x=26 then print "Tv: 1/400"
      if x=27 then print "Tv: 1/500"
      if x=28 then print "Tv: 1/640"
      if x=29 then print "Tv: 1/800"
      if x=30 then print "Tv: 1/1000"
      if x=31 then print "Tv: 1/1250"
      if x=32 then print "Tv: 1/1600"
      if x=33 then print "Tv: 1/2000"
      if x=34 then print "Tv: 1/2500"
      if x=35 then print "Tv: 1/3200"
      x=get_iso
      if x=0 then print "ISO: AutoISO"
      if x=1 then print "ISO: 50(80)"
      if x=2 then print "ISO: 100"
      if x=3 then print "ISO: 200"
      if x=4 then print "ISO: 400"
      if x=5 then print "ISO: 800"
      if x=6 then print "ISO: 1600"
      if x=7 then print "ISO: 3200"
      if x=-1 then print "ISO: HiISO"
      print " "
      x=get_orientation_sensor
      print "Sensor Orient: "x
      x=get_IS_mode
      if x=0 then print "IS Mode: Continuous"
      if x=1 then print "IS Mode: Shoot Only"
      if x=2 then print "IS Mode: Panning"
      if x=3 then print "IS Mode: OFF"
    rem ***
      get_prop 209 x
      print "Exp Comp: "x
      get_prop 127 x
      print "Flash Exp Comp: "x
      print " "
      get_prop 270 x
      if x=0 then print "WB: Auto"
      if x=1 then print "WB: Daylight"
      if x=2 then print "WB: Cloudy"
      if x=3 then print "WB: Tungsten"
      if x=4 then print "WB: Fluorescent"
      if x=5 then print "WB: Fluorescent H"
      if x=6 then print "WB: Flash"
      if x=7 then print "WB: Custom"
      get_prop 50 x
      if x=8228 then print "Mode Dial: Custom"
      if x=-32767 then print "Mode Dial: Manual"
      if x=-32766 then print "Mode Dial: Av"
      if x=-32765 then print "Mode Dial: Tv"
      if x=-32764 then print "Mode Dial: Program"
      if x=-32768 then print "Mode Dial: Auto"
      if x=-32755 then print "Mode Dial: Portrait"
      if x=-32756 then print "Mode Dial: Landscape"
      if x=-32757 then print "Mode Dial: Night Snapshot"
      if x=-32249 then print "Mode Dial: Sports"    
      if x=16402 then print "Mode Dial: Sunset"  
      if x=-32246 then print "Mode Dial: Stitch Assist"    
      if x=2600 then print "Mode Dial: Movie"
      get_prop 281 x
      if x=0 then print "Safety MF: OFF"
      if x=1 then print "Safety MF: ON"
      get_prop 155 x
      if x=0 then print "Meter: Evaluative"
      if x=1 then print "Meter: Spot"
      if x=2 then print "Meter: Center Wgt"
      get_prop 66 x
      if x=0 then print "Date Stamp: OFF"
      if x=1 then print "Date Stamp: Date"
      if x=2 then print "Date Stamp: Date & Time"
      print " "
    rem ***
      x=get_flash_mode
      if x=0 then print "Flash mode: auto"
      if x=1 then print "Flash mode: ON"
      if x=2 then print "Flash mode: OFF"
      x=get_usb_power
      if x=0 then print "USB_power: Off" else print "USB_power: On"
      x=get_disk_size
      x=x/1000
      print "Disk Size(MB): "x
      x=get_free_disk_space
      x=x/1000
      print "Free Space(MB): "x
      print_screen 0
      goto "done"
    :reset_loop
      if c<0 then c=0
      x=get_zoom_steps
      if c<=x then set_zoom x
      if d<>0 then set_focus d
      goto "done"

    :option2
      x=get_zoom_steps
      x=x-2
      s=1
    :repeat
      set_zoom 1
      sleep 1500
      cls
      print "Shot: "s
      print " "
      shoot
      sleep 600
      s=s+1
      set_zoom x
      sleep 1500
      cls
      print "Shot: "s
      print " "
      shoot
      sleep 600
      s=s+1
      goto "repeat"

    <Part 2 of 3>
    « Last Edit: 17 / March / 2011, 10:04:51 by SkyWalker9 »

    *

    Offline SkyWalker9

    • ****
    • 301
    • SX20 IS (fw 1.02b)
  • Publish
    Re: Utilities #2 (a collection of mini-scripts)
    « Reply #5 on: 26 / February / 2011, 18:30:30 »
    Code: [Select]
    :option3
      cls
      gosub "num_hold"
      D=(d*600+e*10)*100
      if D<1 then D=1
      if c<1 then c=1
      if d<=0 and e<=0 then e=30
      for h=1 to c
        B=get_tick_count
        S=B+D
    :wait_loop
        B=get_tick_count
        if B<S then goto "wait_loop"
        if b>10 then b=10
        if b<0 then b=0
        for i=0 to b-1
          cls
          x=b-i
          if x=0 then gosub "num_0"
          if x=1 then gosub "num_1"
          if x=2 then gosub "num_2"
          if x=3 then gosub "num_3"
          if x=4 then gosub "num_4"
          if x=5 then gosub "num_5"
          if x=6 then gosub "num_6"
          if x=7 then gosub "num_7"
          if x=8 then gosub "num_8"
          if x=9 then gosub "num_9"
          if x=10 then gosub "num_10"
          sleep 1000
        next i
        cls
        shoot
        sleep 600
        gosub "num_hold"
      next h
      cls
      goto "done"
    :num_0
      print "      **"
      print "     *  *"
      print "     *  *"
      print "     *  *"
      print "      **"
      return
    :num_1
      print "       *"
      print "      **"
      print "       *"
      print "       *"
      print "      ***"
      return
    :num_2
      print "      **"
      print "     *  *"
      print "       *"
      print "      *"
      print "     ****"
      return
    :num_3
      print "     ****"
      print "         *"
      print "      ***"
      print "         *"
      print "     ****"
      return
    :num_4
      print "     *"
      print "     *  *"
      print "     *****"
      print "        *"
      print "        *"
      return
    :num_5
      print "     ****"
      print "     *"
      print "     ****"
      print "         *"
      print "     ****"
      return
    :num_6
      print "      ***"
      print "     *"
      print "     ****"
      print "     *   *"
      print "      ***"
      return
    :num_7
      print "     ****"
      print "        *"
      print "       *"
      print "      *"
      print "      *"
      return
    :num_8
      print "      ***"
      print "     *   *"
      print "      ***"
      print "     *   *"
      print "      ***"
      return
    :num_9
      print "      ***"
      print "     *   *"
      print "      ****"
      print "         *"
      print "      ***"
      return
    :num_10
      print "    *   **"
      print "   **  *  *"
      print "    *  *  *"
      print "    *  *  *"
      print "   ***  **"
      return
    :num_hold
      print "   *  *  **  *   ***"
      print "   *  * *  * *   *  *"
      print "   **** *  * *   *  *"
      print "   *  * *  * *   *  *"
      print "   *  *  **  *** ***"
      return
    :done
    end

    <Part 3 of 3 - final part of script - attach to previous portion>
    « Last Edit: 27 / February / 2011, 12:17:52 by SkyWalker9 »

    *

    Offline SkyWalker9

    • ****
    • 301
    • SX20 IS (fw 1.02b)
  • Publish
    Re: Utilities #3 (a collection of mini-scripts)
    « Reply #6 on: 27 / February / 2011, 12:24:11 »
    Utilities #3
    This is the third in the series of mini-scripts.
    1CntDwn:     :       :    (     1)
    Seconds:     :       :    (     0)
    #Shots :     :       :    (     0)
    IntMin :     :       :    (     0)
    IntSec :     :       :    (     0)
    Reverse:     :       :    (     0)
    .      :     :       :    (     0)


    Like the last time , each mini-script is identified by the first parameter line and the mini-script is chosen by the number in the name of the min-script. If there are parameters for that mini-script, they are shown in the column just below the mini-script name.

    Utility mini-scripts

    1CntDwn. This mini-script has a large pseudo-font countdown display timer for taking a series of pictures and was first included in Utility #2. Since then the script has been upgraded to overcome the reverse display problems when using an articulating display in the facing forward position. Because it was necessary to add more lines/characters to the original mini-script, I needed to put it in a different Utility, so this one was created - I'll add more mini-scripts as they are created.

    There are now five parameters: Seconds, #Shots, IntMin, IntSec and Reverse. "Seconds" is the amount countdown seconds to display (1-10). The "#Shots" is the number of photos to shoot in the series.  The "IntMin" and "IntSec" is the amount between each countdown sequence (between shots) and allows the photographer time to setup the next shot.

    I originally wrote this script so that I could use it on an SX20 which has an articulating display. Since CHDK doesn't display properly on the LCD when facing forward I had to design a way to display the countdown pseudo-font numbers in reverse and to the far right side of the normal CHDK script window. The "Reverse" parameter is set to 1 to use the articulating display facing forward - anything other than 1 will assume the display is not being used in the facing forward position.

    In normal use (non-Reverse) the display is handy when taking group photos and experimenting with creating "cloning" photos. In addition to the pseudo-font countdown numbers, there is a special symbol to indicate when the script is waiting for the interval period to expire and the countdown sequence to begin. Here are  samples of the large display countdown pseudo-font and the special symbol:

        *   **
       **  *  *
        *  *  *
        *  *  *
       ***  **

       *       *
         * * *
         * * *
         * * *
       *       *

    Special notes:

    1. Since the CHDK UBasic is an interpreted script reader, any mini-script that is time sensitive should be located near the top of the "Utility" script in order to insure the fastest run times.

    2. If PropCas statements are used in a mini-script, they are specifically identified in the script positioned between "rem" statements so that they can be easily found and updated to the user's model of camera. Since the list of PropCas for the SX20 is not complete, I have been keeping track and updating the list of PropCas values that I find in the SX20 forum in this post: http://chdk.setepontos.com/index.php?topic=4348.msg60704#msg60704

    Just save this script to your CHDK/SCRIPT folder as BAS.

    <Part 1 of 2>
    « Last Edit: 15 / March / 2011, 20:57:53 by SkyWalker9 »

    *

    Offline SkyWalker9

    • ****
    • 301
    • SX20 IS (fw 1.02b)
  • Publish
    Re: Utilities #3 (a collection of mini-scripts)
    « Reply #7 on: 27 / February / 2011, 12:25:02 »
    Code: [Select]
    rem Author SkyWalker9
    @title Utilities #3
    @param a 1CntDwn:     :       :
    @default a 1
    @param b Seconds:     :       :
    @default b 0
    @param c #Shots :     :       :
    @default c 0
    @param d IntMin :     :       :
    @default d 0
    @param e IntSec :     :       :
    @default e 0
    @param f Reverse:     :       :
    @default f 0
    @param g .      :     :       :
    @default g 0

    if a=1 then goto "option1"
    goto "done"

    :option1
      cls
      gosub "num_hold"
      D=(d*600+e*10)*100
      if D<1 then D=1
      if c<1 then c=1
      if d<=0 and e<=0 then e=30
      for h=1 to c
        B=get_tick_count
        S=B+D
    :wait_loop
        B=get_tick_count
        if B<S then goto "wait_loop"
        if b>10 then b=10
        if b<0 then b=0
        for i=0 to b-1
          cls
          x=b-i
          if x=0 then gosub "num_0"
          if x=1 then gosub "num_1"
          if x=2 then gosub "num_2"
          if x=3 then gosub "num_3"
          if x=4 then gosub "num_4"
          if x=5 then gosub "num_5"
          if x=6 then gosub "num_6"
          if x=7 then gosub "num_7"
          if x=8 then gosub "num_8"
          if x=9 then gosub "num_9"
          if x=10 then gosub "num_10"
          sleep 1000
        next i
        cls
        shoot
        sleep 600
        gosub "num_hold"
      next h
      cls
      goto "done"
    :num_0
      if f=1 then goto "num_0_R"
      print "      **"
      print "     *  *"
      print "     *  *"
      print "     *  *"
      print "      **"
      return
    :num_0_R
      print "                 **"
      print "                *  *"
      print "                *  *"
      print "                *  *"
      print "                 **"
      return
    :num_1
      if f=1 then goto "num_1_R"
      print "       *"
      print "      **"
      print "       *"
      print "       *"
      print "      ***"
      return
    :num_1_R
      print "                 *"
      print "                 **"
      print "                 *"
      print "                 *"
      print "                ***"
      return
    :num_2
      if f=1 then goto "num_2_R"
      print "      **"
      print "     *  *"
      print "       *"
      print "      *"
      print "     ****"
      return
    :num_2_R
      print "                 **"
      print "                *  *"
      print "                 *"
      print "                  *"
      print "                ****"
      return
    :num_3
      if f=1 then goto "num_3_R"
      print "     ****"
      print "         *"
      print "      ***"
      print "         *"
      print "     ****"
      return
    :num_3_R
      print "                ****"
      print "               *"
      print "                ***"
      print "               *"
      print "                ****"
      return
    :num_4
      if f=1 then goto "num_4_R"
      print "     *"
      print "     *  *"
      print "     *****"
      print "        *"
      print "        *"
      return
    :num_4_R
      print "                   *"
      print "                *  *"
      print "               *****"
      print "                *"
      print "                *"
      return
    :num_5
      if f=1 then goto "num_5_R"
      print "     ****"
      print "     *"
      print "     ****"
      print "         *"
      print "     ****"
      return
    :num_5_R
      print "                ****"
      print "                   *"
      print "                ****"
      print "               *"
      print "                ****"
      return
    :num_6
      if f=1 then goto "num_6_R"
      print "      ***"
      print "     *"
      print "     ****"
      print "     *   *"
      print "      ***"
      return
    :num_6_R
      print "                 ***"
      print "                    *"
      print "                 ****"
      print "                *   *"
      print "                 ***"
      return
    :num_7
      if f=1 then goto "num_7_R"
      print "     ****"
      print "        *"
      print "       *"
      print "      *"
      print "      *"
      return
    :num_7_R
      print "                ****"
      print "                *"
      print "                 *"
      print "                  *"
      print "                  *"
      return
    :num_8
      if f=1 then goto "num_8_R"
      print "      ***"
      print "     *   *"
      print "      ***"
      print "     *   *"
      print "      ***"
      return
    :num_8_R
      print "                 ***"
      print "                *   *"
      print "                 ***"
      print "                *   *"
      print "                 ***"
      return
    :num_9
      if f=1 then goto "num_9_R"
      print "      ***"
      print "     *   *"
      print "      ****"
      print "         *"
      print "      ***"
      return
    :num_9_R
      print "                 ***"
      print "                *   *"
      print "                ****"
      print "                *"
      print "                 ***"
      return
    :num_10
      if f=1 then goto "num_10_R"
      print "    *   **"
      print "   **  *  *"
      print "    *  *  *"
      print "    *  *  *"
      print "   ***  **"
      return
    :num_10_R
      print "               **   *"
      print "              *  *  **"
      print "              *  *  *"
      print "              *  *  *"
      print "               **  ***"
      return
    :num_hold
      if f=1 then goto "num_hold_R"
      print "   *       *"
      print "     * * *"
      print "     * * *"
      print "     * * *"
      print "   *       *"
      return
    :num_hold_R
      print "              *       *"
      print "                * * *"
      print "                * * *"
      print "                * * *"
      print "              *       *"
      return
    :done
    end

    <Part 2 of 2>


    *

    Offline SkyWalker9

    • ****
    • 301
    • SX20 IS (fw 1.02b)
  • Publish
    Re: Utilities #2 update (a collection of mini-scripts)
    « Reply #8 on: 08 / March / 2011, 19:13:53 »
    This is an updated version of Utilities #2. The Battery testing script has been updated to include logging the last shot and recording the battery voltages. The 3CntDwn mini-script was replaced with 3BasInt. The 3CntDwn mini-script had been improved and included in the Utilities #3, thus I was waiting to replace with another short mini-script when it became available. The 3BasInt is a very basic intervalometer mini-script.
    1ReDo:2Batt :3BasInt:    (     1)
    Reset:#Shots:#Shots :    (     0)
    Zoom :FilNum:  IM   :    (     0)
    Focus:      :  IS   :    (     0)
    .    :      :  SH   :    (     0)
    .    :      :  SM   :    (     0)
    .    :      :       :    (     0)

    Like the last time , each mini-script is identified by the first parameter line and the mini-script is chosen by the number in the name of the min-script. If there are parameters for that mini-script, they are shown in the column just below the mini-script name.

    Utility mini-scripts

    1ReDo. Due to the limited number of characters allowed in a single posting, please see previous Utilities #2 posting for the function of this mini-script.

    2Batt. This mini-script was written to help a CHDK user test the maximum number of shots that could be taken by a set of batteries. It was designed to zoom all the way in, take a shot, zoom all the way out, take a shot and then continuously repeat until the batteries could no longer take photos. The mini-script first checks the maximum number of zoom steps that are available for the camera, and then uses that limit for the zooming out step. While some safegaurds have been built in, the user is cautioned to use at your own risk.

    Update to original script:
    The script has been updated to allow using smaller SD Cards since the camera may be able to take more photos than an SD Card can hold until the battery voltage runs down. Since the process for erasing photos on a camera is unique to that camera model it isn't easy to code into a UBasic script, so I added:
    - "#Shots" parameter to allow you to shoot a set amount of shots and then stop the script to allow you to delete the images on the SD Card and then restart the script. The counter will restart at 1 for each run, so you'll just have to keep track of the shots you take each time. The final shot will be recorded on the SD Card. If you use a large enough SD Card that will hold all of the shots, then just set the "#Shots" parameter to 0 and it will shoot until the batteries voltage runs down.
    - "FilNum" parameter to allow you to change the LOG file number for each run just in case you wanted to save each run separately. This will also allow you to compare the battery voltage changes later (see following comments regarding the battery voltages). This parameter can be set to numbers greater than zero; if this value is set to zero or less, the script will set the parameter to 1.

    Note: There is a special circumstance where the power may not be sufficient to complete the writing of the LOG file to the SD card and the old file will be erased and no file will be written to the SD Card. Therefore, I added a safe guard to work around this problem by using a "toggle-switch" of sorts that will write the first file using the FilNum value set in the parameter and then the next write will use the FilNum+1000 (i.e. if FilNum is set to 2, the first write will be to LOG_0002.TXT, and the next will be LOG_1002.TXT, the third LOG_0002.TXT, etc.). If the last write is unsuccessful, at least you will still have the next to last recorded file.

    A provision needed to be added to record the last photo shot, so I added the ability to record:
    - date & time
    - last shot taken
    - battery voltage when the script was started (in millivolts)
    - battery voltage just after shot is taken (in millivolts)

    The battery voltage is recorded to show how low the battery voltage drops before the camera shutdowns on its own. The information for the last shot taken is in the file "LOG_0001.TXT" located in the CHDK/LOGS folder on your SD Card. Each new shot rewrites the "LOG_0001.TXT" file so that only the last shot info will be saved. If you change the FilNum parameter, then each LOG file name will also change (i.e. if you change FilNum to 3, then the LOG file name will be saved as "LOG_0003.TXT"). Here is what a sample of the "LOG_0001.TXT" file looks like:
         Date: 28/2/2011
         Time: 14:44:0
     
         Shot number: 5
         Batt start: 5161 mv
         Batt   now: 5151 mv

    3BasInt. While many intervalometer scripts are designed to be feature "rich" in order to allow a user to precisely control the shoot sequence, feature "rich" scripts tend to make them more complicated to use, even for script designers. There are times when only the basics are needed. Such was the case when one of the CHDK members only needed a simple intervalometer script. In response, I created this stripped down version of the feature "rich" Selective Intervalometer I wrote earlier.

    The parameters: #Shots, IM (interval minutes), IS (interval seconds), SH (start hour - 24 hr clock), and SM (start minute).
    - #Shots. Originally, the CHDK member wanted the ability to start the script and "let it run" until the SD card space filled up or the battery died. If the #Shots is set to zero or less, the mini-script will do just that - take photos until the space runs out or the batteries give out. If a user would just like to shoot a limited number of photos, then they can set the #Shots to a set number.
    - IM & IS allow the user to very accurately set an interval time between shots. This mini-script uses  tick_count statements instead of sleep statements to control the time between shots.
    - The SH & SM allow a user to set the time for the mini-script to start (24 clock time).

    Special notes:

    1. Since the CHDK UBasic is an interpreted script reader, any mini-script that is time sensitive should be located near the top of the "Utility" script in order to insure the fastest run times.

    2. If PropCas statements are used in a mini-script, they are specifically identified in the script positioned between "rem" statements so that they can be easily found and updated to the user's model of camera. Since the list of PropCas for the SX20 is not complete, I have been keeping track and updating the list of PropCas values that I find in the SX20 forum in this post: http://chdk.setepontos.com/index.php?topic=4348.msg60704#msg60704

    Just save this script to your CHDK/SCRIPT folder as BAS
    <Part 1 of 3>
    « Last Edit: 08 / March / 2011, 19:24:20 by SkyWalker9 »

    *

    Offline SkyWalker9

    • ****
    • 301
    • SX20 IS (fw 1.02b)
  • Publish
    Re: Utilities #2 update (a collection of mini-scripts)
    « Reply #9 on: 08 / March / 2011, 19:15:47 »
    Code: [Select]
    rem Author SkyWalker9
    @title Utilities #2
    @param a 1ReDo:2Batt :3BasInt:
    @default a 1
    @param b Reset:#Shots:#Shots :
    @default b 0
    @param c Zoom :FilNum:   IM  :
    @default c 0
    @param d Focus:      :   IS  :
    @default d 0
    @param e .    :      :   SH  :
    @default e 0
    @param f .    :      :   SM  :
    @default f 0
    @param g .    :      :       :
    @default g 0

      if a=1 then goto "option1"
      if a=2 then goto "option2"
      if a=3 then goto "option3"
      goto "done"

    :option1
      if b=1 then goto "reset_loop"
      z=get_time 0
      y=get_time 1
      x=get_time 2
      m=get_time 3
      n=get_time 4
      p=get_time 5
      h=x*100+y
      if h<1 then h=1
      if h>9999 then h=9999
      print_screen h
      print "Date: "m"/"n"/"p
      print "Time: "x":"y":"z
      print " "
      y=get_zoom_steps
      x=get_zoom
      print "Zoom Step: "x" of "y
      x=get_focus
      print "Focus: "x
      x=get_far_limit
      print "Far_limit: "x
      x=get_near_limit
      print "Near_limit: "x
      x=get_dof
      print "DOF: "x
      x=get_hyp_dist
      print "Hyperfocal_dist: "x
      print " "
    rem ***
      get_prop 169 x
      if x=1 then print "Video Quality: 320x240"
      if x=2 then print "Video Quality: 640x480"
      if x=4 then print "Video Quality: 1280x720"
    rem ***
      x=get_resolution
      if x=0 then print "Resolution: Large"
      if x=1 then print "Resolution: Medium 1"
      if x=2 then print "Resolution: Medium 2"
      if x=3 then print "Resolution: Medium 3"
      if x=4 then print "Resolution: Small"
      if x=8 then print "Resolution: Wide"
      x=get_user_av_id
      if x=9 then print "Av: F2.8"
      if x=10 then print "Av: F3.2"
      if x=11 then print "Av: F3.5"
      if x=12 then print "Av: F4.0"
      if x=13 then print "Av: F4.5"
      if x=14 then print "Av: F5.0"
      if x=15 then print "Av: F5.6"
      if x=16 then print "Av: F6.3"
      if x=17 then print "Av: F7.1"
      if x=18 then print "Av: F8.0"
      x=get_user_tv_id
      if x=-12 then print "Tv: 15s"
      if x=-11 then print "Tv: 13s"
      if x=-10 then print "Tv: 10s"
      if x=-9 then print "Tv: 8s"
      if x=-8 then print "Tv: 6s"
      if x=-7 then print "Tv: 5s"
      if x=-6 then print "Tv: 4s"
      if x=-5 then print "Tv: 3.2s"
      if x=-4 then print "Tv: 2.5s"
      if x=-3 then print "Tv: 2s"
      if x=-2 then print "Tv: 1.6s"
      if x=-1 then print "Tv: 1.3s"
      if x=0 then print "Tv: 1s"
      if x=1 then print "Tv: 0.8s "
      if x=2 then print "Tv: 0.6s"
      if x=3 then print "Tv: 0.5s"
      if x=4 then print "Tv: 0.4s"
      if x=5 then print "Tv: 0.3s"
      if x=6 then print "Tv: 1/4"
      if x=7 then print "Tv: 1/5"
      if x=8 then print "Tv: 1/6"
      if x=9 then print "Tv: 1/8"
      if x=10 then print "Tv: 1/10"
      if x=11 then print "Tv: 1/13"
      if x=12 then print "Tv: 1/15"
      if x=13 then print "Tv: 1/20"
      if x=14 then print "Tv: 1/25"
      if x=15 then print "Tv: 1/30"
      if x=16 then print "Tv: 1/40"
      if x=17 then print "Tv: 1/50"
      if x=18 then print "Tv: 1/60"
      if x=19 then print "Tv: 1/80"
      if x=20 then print "Tv: 1/100"
      if x=21 then print "Tv: 1/125"
      if x=22 then print "Tv: 1/160"
      if x=23 then print "Tv: 1/200"
      if x=24 then print "Tv: 1/250"
      if x=25 then print "Tv: 1/320"
      if x=26 then print "Tv: 1/400"
      if x=27 then print "Tv: 1/500"
      if x=28 then print "Tv: 1/640"
      if x=29 then print "Tv: 1/800"
      if x=30 then print "Tv: 1/1000"
      if x=31 then print "Tv: 1/1250"
      if x=32 then print "Tv: 1/1600"
      if x=33 then print "Tv: 1/2000"
      if x=34 then print "Tv: 1/2500"
      if x=35 then print "Tv: 1/3200"
      x=get_iso
      if x=0 then print "ISO: AutoISO"
      if x=1 then print "ISO: 50(80)"
      if x=2 then print "ISO: 100"
      if x=3 then print "ISO: 200"
      if x=4 then print "ISO: 400"
      if x=5 then print "ISO: 800"
      if x=6 then print "ISO: 1600"
      if x=7 then print "ISO: 3200"
      if x=-1 then print "ISO: HiISO"
      print " "
      x=get_orientation_sensor
      print "Sensor Orient: "x
      x=get_IS_mode
      if x=0 then print "IS Mode: Continuous"
      if x=1 then print "IS Mode: Shoot Only"
      if x=2 then print "IS Mode: Panning"
      if x=3 then print "IS Mode: OFF"
    rem ***
      get_prop 209 x
      print "Exp Comp: "x
      get_prop 127 x
      print "Flash Exp Comp: "x
      print " "
      get_prop 270 x
      if x=0 then print "WB: Auto"
      if x=1 then print "WB: Daylight"
      if x=2 then print "WB: Cloudy"
      if x=3 then print "WB: Tungsten"
      if x=4 then print "WB: Fluorescent"
      if x=5 then print "WB: Fluorescent H"
      if x=6 then print "WB: Flash"
      if x=7 then print "WB: Custom"
      get_prop 50 x
      if x=8228 then print "Mode Dial: Custom"
      if x=-32767 then print "Mode Dial: Manual"
      if x=-32766 then print "Mode Dial: Av"
      if x=-32765 then print "Mode Dial: Tv"
      if x=-32764 then print "Mode Dial: Program"
      if x=-32768 then print "Mode Dial: Auto"
      if x=-32755 then print "Mode Dial: Portrait"
      if x=-32756 then print "Mode Dial: Landscape"
      if x=-32757 then print "Mode Dial: Night Snapshot"
      if x=-32249 then print "Mode Dial: Sports"    
      if x=16402 then print "Mode Dial: Sunset"  
      if x=-32246 then print "Mode Dial: Stitch Assist"    
      if x=2600 then print "Mode Dial: Movie"
      get_prop 281 x
      if x=0 then print "Safety MF: OFF"
      if x=1 then print "Safety MF: ON"
      get_prop 155 x
      if x=0 then print "Meter: Evaluative"
      if x=1 then print "Meter: Spot"
      if x=2 then print "Meter: Center Wgt"
      get_prop 66 x
      if x=0 then print "Date Stamp: OFF"
      if x=1 then print "Date Stamp: Date"
      if x=2 then print "Date Stamp: Date & Time"
      print " "
    rem ***
      x=get_flash_mode
      if x=0 then print "Flash mode: auto"
      if x=1 then print "Flash mode: ON"
      if x=2 then print "Flash mode: OFF"
      x=get_usb_power
      if x=0 then print "USB_power: Off" else print "USB_power: On"
      x=get_disk_size
      x=x/1000
      print "Disk Size(MB): "x
      x=get_free_disk_space
      x=x/1000
      print "Free Space(MB): "x
      print_screen 0
      goto "done"
    :reset_loop
      if c<0 then c=0
      x=get_zoom_steps
      if c<=x then set_zoom x
      if d<>0 then set_focus d
      goto "done"
    <Part 2 of 3>
    « Last Edit: 17 / March / 2011, 10:05:49 by SkyWalker9 »

     

    Related Topics