# REMAINPX.CSM name "Remaining Pictures Script" # location in the menu mode 0 menu "Kodak Scripts" label "Remaining Pictures" declare u:uCameraType, uImageTaken, uImageAvail, uStorage declare i:iImageRaw declare u:uSsiz, uScpn, uChoice declare u:uCurrent, u220SG, u220SR, u220SB, u220HG, u220HR, u220HB declare u:u260SG, u260SR, u260SB, u260MG, u260MR, u260MB, u260HG, u260HR, u260HB declare s:sProductName, sString1, sString2 # Get camera type and use a unsigned integer to identify it GetProductInfo ("ptid", sProductName) if sProductName == "KODAK DIGITAL SCIENCE DC220" uCameraType = 220 end if sProductName == "KODAK DIGITAL SCIENCE DC260" uCameraType = 260 end # Error trap - in case of a product name change or being used # on cameras other than DC220/DC260 if uCameraType != 220 if uCameraType != 260 DisplayClear() DisplayLine("") DisplayLine("This script has to be used on Kodak DC220 or DC260 cameras only.") Wait(4000) goto Done end end # Needed but not used for GetStorageStatus uStorage = 1 iImageRaw = -1 # Get the current resolution and quality value # picture resolution GetCameraState ("ssiz", uSsiz) # picture quality GetCameraState ("scpn", uScpn) # Get the picture left to be taken with current setting GetStorageStatus (uStorage, uImageTaken, uCurrent, iImageRaw) # Display a few lines of comments # Clear the display and display current setting # display current resolution and quality DisplayClear() if uCurrent == 0 Display("No") end if uCurrent > 0 Display(uCurrent) end Display(" more pictures can be taken with your current setting:") DisplayLine("") if uCameraType == 220 if uSsiz == 1 sString1 = "High Res" end if uSsiz == 3 sString1 = "Standard Res" end end if uCameraType == 260 if uSsiz == 1 sString1 = "High Res" end if uSsiz == 2 sString1 = "Medium Res" end if uSsiz == 3 sString1 = "Standard Res" end end if uScpn == 4 sString2 = "/Best Quality" end if uScpn == 3 sString2 = "/Better Quality" end if uScpn == 2 sString2 = "/Good Quality" end DisplayLine(sString1, sString2) DisplayLine("") Display("Please Wait...") Wait(5000) # In case it is a DC220 camera, two resolutions are available if uCameraType == 220 # for 1152X864 SetCameraState ("ssiz", 1) # Quality: BEST SetCameraState ("scpn", 4) GetStorageStatus (uStorage, uImageTaken, u220HB, iImageRaw) # Quality: BETTER SetCameraState ("scpn", 3) GetStorageStatus (uStorage, uImageTaken, u220HR, iImageRaw) # Quality: GOOD SetCameraState ("scpn", 2) GetStorageStatus (uStorage, uImageTaken, u220HG, iImageRaw) # for 640X480 SetCameraState ("ssiz", 3) SetCameraState ("scpn", 4) GetStorageStatus (uStorage, uImageTaken, u220SB, iImageRaw) SetCameraState ("scpn", 3) GetStorageStatus (uStorage, uImageTaken, u220SR, iImageRaw) SetCameraState ("scpn", 2) GetStorageStatus (uStorage, uImageTaken, u220SG, iImageRaw) end # In case it is a DC260 camera, three resolutions are possible if uCameraType == 260 # for 1536X1024 SetCameraState ("ssiz", 1) SetCameraState ("scpn", 4) GetStorageStatus (uStorage, uImageTaken, u260HB, iImageRaw) SetCameraState ("scpn", 3) GetStorageStatus (uStorage, uImageTaken, u260HR, iImageRaw) SetCameraState ("scpn", 2) GetStorageStatus (uStorage, uImageTaken, u260HG, iImageRaw) # for 1152X768 SetCameraState ("ssiz", 2) SetCameraState ("scpn", 4) GetStorageStatus (uStorage, uImageTaken, u260MB, iImageRaw) SetCameraState ("scpn", 3) GetStorageStatus (uStorage, uImageTaken, u260MR, iImageRaw) SetCameraState ("scpn", 2) GetStorageStatus (uStorage, uImageTaken, u260MG, iImageRaw) # for 768X512 SetCameraState ("ssiz", 3) SetCameraState ("scpn", 4) GetStorageStatus (uStorage, uImageTaken, u260SB, iImageRaw) SetCameraState ("scpn", 3) GetStorageStatus (uStorage, uImageTaken, u260SR, iImageRaw) SetCameraState ("scpn", 2) GetStorageStatus (uStorage, uImageTaken, u260SG, iImageRaw) end # Reset to the original resolution and quality SetCameraState ("ssiz", uSsiz) SetCameraState ("scpn", uScpn) # Dispaly results DisplayClear() if uCameraType == 220 DisplayLine("High Resolution (1152X864):") DisplayLine("") DisplayLine("1. High Res/Best Quality: ", u220HB) DisplayLine("2. High Res/Better Quality: ", u220HR) DisplayLine("3. High Res/Good Quality: ", u220HG) Wait(5000) DisplayClear() DisplayLine("Standard Resolution (640X480):") DisplayLine("") DisplayLine("4. Std Res/Best Quality: ", u220SB) DisplayLine("5. Std Res/Better Quality: ", u220SR) DisplayLine("6. Std Res/Good Quality: ", u220SG) Wait(5000) DisplayClear() DisplayLine("") DisplayLine("Please select a combination of picture resolution/quality which best suits your needs.") Wait(4000) DisplayClear() # Display an option list with SetOption (1, "Remain Unchanged", 0) SetOption (2, "1. High Res/Best Quality", 0) SetOption (3, "2. High Res/Better Quality", 0) SetOption (4, "3. High Res/Good Quality", 0) SetOption (5, "4. Std Res/Best Quality", 0) SetOption (6, "5. Std Res/Better Quality", 0) SetOption (7, "6. Std Res/Good Quality", 0) GetOption (uChoice) # Set options selected # in case of uChoise == 1 (Remain Unchanged) # use the values previously acquired if uChoice == 2 uSsiz = 1 uScpn = 4 sString1 = "High Res" sString2 = "/Best Quality" end if uChoice == 3 uSsiz = 1 uScpn = 3 sString1 = "High Res" sString2 = "/Better Quality" end if uChoice == 4 uSsiz = 1 uScpn = 2 sString1 = "High Res" sString2 = "/Good Quality" end if uChoice == 5 uSsiz = 3 uScpn = 4 sString1 = "Standard Res" sString2 = "/Best Quality" end if uChoice == 6 uSsiz = 3 uScpn = 3 sString1 = "Standard Res" sString2 = "/Better Quality" end if uChoice == 7 uSsiz = 3 uScpn = 2 sString1 = "Standard Res" sString2 = "/Good Quality" end end if uCameraType == 260 DisplayLine("High Resolution(1536X1024):") DisplayLine("") DisplayLine("1. High Res/Best Quality: ", u260HB) DisplayLine("2. High Res/Better Quality: ", u260HR) DisplayLine("3. High Res/Good Quality: ", u260HG) Wait(5000) DisplayClear() DisplayLine("Medium Resolution(1152X768):") DisplayLine("") DisplayLine("4. Med Res/Best Quality: ", u260MB) DisplayLine("5. Med Res/Better Quality: ", u260MR) DisplayLine("6. Med Res/Good Quality: ", u260MG) Wait(5000) DisplayClear() DisplayLine("Standard Resolution(768X512):") DisplayLine("") DisplayLine("7. Std Res/Best Quality: ", u260SB) DisplayLine("8. Std Res/Better Quality: ", u260SR) DisplayLine("9. Std Res/Good Quality: ", u260SG) Wait(5000) DisplayClear() DisplayLine("") DisplayLine("Please select a combination of picture resolution/quality which best suits your needs.") Wait(4000) DisplayClear() # Display an option list with SetOption (1, "Remain Unchanged", 0) SetOption (2, "1. High Res/Best Quality", 0) SetOption (3, "2. High Res/Better Quality", 0) SetOption (4, "3. High Res/Good Quality", 0) SetOption (5, "4. Med Res/Best Quality", 0) SetOption (6, "5. Med Res/Better Quality", 0) SetOption (7, "6. Med Res/Good Quality", 0) SetOption (8, "7. Std Res/Best Quality", 0) SetOption (9, "8. Std Res/Better Quality", 0) SetOption (10, "9. Std Res/Good Quality", 0) GetOption (uChoice) # Set options selected # in case of uChoise == 1 (Remain Unchanged) # use the values previously acquired if uChoice == 2 uSsiz = 1 uScpn = 4 sString1 = "High Res" sString2 = "/Best Quality" end if uChoice == 3 uSsiz = 1 uScpn = 3 sString1 = "High Res" sString2 = "/Better Quality" end if uChoice == 4 uSsiz = 1 uScpn = 2 sString1 = "High Res" sString2 = "/Good Quality" end if uChoice == 5 uSsiz = 2 uScpn = 4 sString1 = "Medium Res" sString2 = "/Best Quality" end if uChoice == 6 uSsiz = 2 uScpn = 3 sString1 = "Medium Res" sString2 = "/Better Quality" end if uChoice == 7 uSsiz = 2 uScpn = 2 sString1 = "Medium Res" sString2 = "/Good Quality" end if uChoice == 8 uSsiz = 3 uScpn = 4 sString1 = "Standard Res" sString2 = "/Best Quality" end if uChoice == 9 uSsiz = 3 uScpn = 3 sString1 = "Standard Res" sString2 = "/Better Quality" end if uChoice == 10 uSsiz = 3 uScpn = 2 sString1 = "Standard Res" sString2 = "/Good Quality" end end # set picture resolution and quality SetCameraState ("ssiz", uSsiz) SetCameraState ("scpn", uScpn) # Needed but not used for GetStorageStatus uStorage = 1 iImageRaw = -1 # Get the picture left to be taken with current setting GetStorageStatus (uStorage, uImageTaken, uCurrent, iImageRaw) DisplayClear() DisplayLine("You have set your camera to") DisplayLine(sString1, sString2, ".") DisplayLine("") if uCurrent == 0 Display("You will NOT be able to take any more pictures with this setting!") end if uCurrent != 0 Display("This setting will let you take ", uCurrent, " more pictures.") end Wait(5000) exitscript