Hi everyone,
I simply try to catch the filepath I am chossing in a directory open dialog and try saving it to a text file - without luck yet.
Here is my code so far dereived from the examples “cabbageFileOpcodes”:
instr 1000
SFileToOpen, kTrigger cabbageGetValue "openFile"
SFile1 cabbageGetFilename SFileToOpen
cabbageSet kTrigger, "label1", sprintfk("text(\"File name: %s\")", SFile1)
SFile2 cabbageGetFileExtension SFileToOpen
cabbageSet kTrigger, "label2", sprintfk("text(\"File extension: %s\")", SFile2)
SFile3 cabbageGetFileNoExtension SFileToOpen
cabbageSet kTrigger, "label3", sprintfk("text(\"File without extension: %s\")", SFile3)
SFile4 cabbageGetFilePath SFileToOpen
cabbageSet kTrigger, "label4", sprintfk("text(\"File path: %s\")", SFile4)
ktrig metro 1
if ktrig == 1 then
Sgetter = sprintfk("text(\"File path: %s\")", SFile4)
strset 1, Sgetter
String strget 1
fprints "my111.sco", String, String
endif
endin
What I end up with in my txt file is:
text("File path: ")
But the path is not saved. Strange thing is I can see it in the GUI of cabbage.
thanks for any hints.