Text
Posted: Fri Jul 25, 2008 6:42 pm
I have a text input, but I only want to have text (not numbers) entered.
Is there a way of telling betwwen the two please.
Is there a way of telling betwwen the two please.
Code: Select all
temp$ = INPUT$
ROFL = len(temp$)
OK = 0
for X = 0 to ROFL
lookat = Asc(Mid(temp$,rofl,1))
if lookat > 65
OK = 1
endif
next
if OK = 1
; input good!
else
; BAD INPUT
endif
Here's an example that loops through files listed in an array and sets the date by adding sequential day values to an arbitrary start date:dannyboy99 wrote:Thanks for your work on this one
As the last poster says, I was using several textgadget to input data, but of only 4 numbers. and one box could only contain text.
While I am here, does anyone know how to use setfiledate
I have a load of files that I wanted to alter the creation dates so my mp3 player will play them in the order I want - its for amateur drama.
does anyone have an example of how to do this.
Thanks
Code: Select all
startDate.l = ParseDate("%yy/%mm/%dd", "02/12/01") ;pick your start date
numberOfSongs.l = 30
For sequenceNumber = 1 to numberOfSongs
songFile.s = songFilenameArray.s(sequenceNumber) ;a sample entry in the songFilenameArray would look like "C:\Song.mp3"
SetFileDate(songFile, #PB_Date_Created ,AddDate(startDate, #PB_Date_Day, sequenceNumber.l))
Next
I didn't supply a complete code example, I had thought that you only lacked an understandng on the use of SetFileDate(). You can add this on to the beginning of the code sample I gave previously. You'll still need to tailor the code with information regarding your songs.dannyboy99 wrote:I tried this, but I get an error message saying
song.s() is not a function (or not available in demo mode)
And should songs.s be the directory where all the sound effects are stored.
Knowing me, I have done something wrong, but I an not sure what.
Thanks
Dan
Code: Select all
#numberOfSongs = 30
DataSection
songList:
Data.s "C:\Song.mp3","C:\Song2.mp3" ;add each song, 30 total
EndDataSection
Dim songFilenameArray.s(#numberOfSongs)
Restore songList
For i.l = 1 To #numberOfSongs
Read songFilenameArray(i)
Next