(https://i.imgur.com/psPg1wt.jpeg)
Just Testing this..
This code is for copying a dragged file into your project Folder, if its not already there
Strict
Function CopyFileIfNotExists(OriginalFileURL:String, DestinationFolderURL:String) 'Copies file to Destination only if its not already there
Local FN:String = ExtractFilenameFromURL(OriginalFileURL)
Local NFU:String = DestinationFolderURL + FN
If FileExists (NFU) = False
CopyFile(OriginalFileURL, NFU)
Print "File copied to Destination"
End If
End Function
Function ExtractFilenameFromURL:String(FileNameAndPath:String, ReturnWithoutFileEnding = False, ReturnEvenIfNoFileEnding = True)
If ExtractExt(FileNameAndPath) = "" And ReturnEvenIfNoFileEnding = False Then Return
Local LenFNA = Len(FileNameAndPath)
For Local I = LenFNA To 1 Step - 1
Local MidFNA:String = Mid(FileNameAndPath, I, 1)
If MidFNA = "/" Or MidFNA = "\" Then
Local MaybeFileName:String = Right(FileNameAndPath, LenFNA - I)
If ReturnWithoutFileEnding = True Then MaybeFileName = StripAll(MaybeFileName)
Return MaybeFileName
End If
Next
Return FileNameAndPath
End Function
Function FileExists(URLAndFilename:String = "")
Local TempStream:TStream
TempStream = OpenStream(URLAndFilename, False, False)
If TempStream <> Null Then
CloseStream(TempStream)
Return True
End If
End Function
That looks really neat and tidy that! :)
Very nice!
Dabz
Thanks.. Ill post all what concerns Music/Audio under one Topic.
There is a forum for general media discussion (scroll down the list), but if there is code involved, then yeah, might be better to stay in the realms of the BlitzMax bit! 8)
Dabz
You can move it if you think its the wrong place. I dont mind :)
Just another image of a different project
(https://i.imgur.com/FfyfzoL.jpeg)
Eventually my main goal is to make music.
so soon maybe ill be able to do it my way.
EDIT: I've shuffled it to the Worklogs section, I think that will be a better home for it as it's about your projects - Dabz
(https://i.imgur.com/mMstDBs.jpeg)
ONE subsection of my music project is cell recorder..
its like in ableton that you can press a cell and record and than
loop the whole Column..
Quote from: Hardcoal on Jun 12, 2025, 02:27 PM(https://i.imgur.com/mMstDBs.jpeg)
ONE subsection of my music project is cell recorder..
its like in ableton that you can press a cell and record and than
loop the whole Column..
Id love to know how to write something like this? Id love to write a tracker.
Baggey
I always love to help those who want help
and save them all the trouble i went through.
so if you have questions, ask..
also i have an idea to make one big shared library
like a type of an engine
same like modules but without compile so it can be accessed easily and
changed
Quotealso i have an idea to make one big shared library
like a type of an engine
Not sure what you mean by this?
Quotesame like modules but without compile so it can be accessed easily and
changed
Well that's a BIG LIKE from me ;)
I try to access code where people try to help and you have to cmake and compile etc.. That's me stumpped! ::)
I might explain what i mean in a new post..
explaining the method i work