SparkOut and Klaus, thanks for your responses!
I'm still scratching my head a bit, as I can't access the folder (my android is not rooted) nor can I write to the SD card (I've tried loads of different code). I'm deploying to my phone and running tests there. I do have it writing to a file called "testwrite" in defaultFolder("Documents") and then reading from it. I write it and read it to a label and it seems to be working well - using the following code:
Code: Select all
put gCount & comma & gRunTime & comma & gNameOfFile into field "lblTEST"
set the defaultFolder to specialFolderPath("Documents")
put field "lblTEST" into URL ("file:testwrite.txt")
and then wrtiing the contents of "testwrite" to a new label
Code: Select all
set the defaultFolder to specialFolderPath("Documents")
put URL ("file:testwrite.txt") into field "lblTEST2"
I do, however, want to write to a file on the SD and then allow the user to take this and look at it on their computer. This is just one of the issues I'm having.
I'm doing a series of small tests to see if the observational program I made for PC/Mac can be easily deployed for tablets (android).
1) I'm testing playing a movie clip on android - this I have done, but I cannot select a movie from the SDcard yet - I can just bundle it with the program
2) need to calculate playing times when other buttons are pressed and write this an codes to variables (easy part so far!)
3) write this file in SD card (can't do yet) - but have written to defaultFolder("Documents"), so maybe I can transfer it from there (not sure)
If I can do these 3 steps, I can recreate my program.
Thanks again for your help.
Colin