You must remember that CHDKs lmitations are down to the user and the build you use. I know I keep harping on about things like that but its true. So please do refer to the Wiki & the forum, I'm sure your problems will be answered there.

Apart from what I've mentioned on the other page and in the tutorial, there are a couple of items that might help you.


The scripts must carry the file extension .bas In Windows you can use Notepad to write your scripts. Then to save just select All Files and and enter your file extension. There is another way I used to use when hand coding html in the old days ;-)) Simply save as a text file if you have created it off the desktop, then click the file name once and pause, click it again. The name will be highlighted blue and the cursor will flash at the end of the name don't do anything other than begin to write in your chosen filename and extension, such as, myscript.bas and then click away from the file. Windows will complain but just say Yes you want to change it. It is a very simple way to switch between editing a file and executing it in this case.

Mac users however have a different problem. The Wiki has a special FAQ/Mac page which is worth looking at. Basically you can use the TextEdit to create your script but when coming to save ensure that you make it Plain Text Encoding: Unicode (UTF-8) and uncheck the box "if no file extension etc" write in your full file name e.g. myscript.bas and then load to your script folder on the SD card. I've noticed that if you use the Cover Flow method of viewing files, when you take the script file over to the SD card the file changes to Unix Executable in the Cover Flow window for the SD card which is what you want.

Check the Wiki out for all the latest developments.


Lutz Treczoks Cody

The "rem" line in scripts should be used frugally.
I know its there to remind you but think another
way and keep a copy of the rems as a text file,
which can also be loaded and viewed if needed
and given a name the same as the bas file for
cross reference. The reason being is that there
is a file limit on the UBasic script of 8k
(8129 bytes) and every rem line uses that up.
Furthermore each line of code takes 10ms to
execute. So if your script has 10 rem lines at
the beginning it takes 1/10 sec to reach the
meat of what you are doing before you start.
For most users this is not a problem but I
should think it will affect those who may be
using the high speed facilities. As mentioned
before another good idea is to have an SD
card for each script with autoboot turned on.
This way it eliminates mistakes.