No.
Yes.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
start using stack "<path to file S>"
Code: Select all
execution error at line … (Chunk: cant find stack), char 1
Code: Select all
on mouseup
if the optionkey is down then
FromPath
else
ExplicitFromFile
end if
putmilliseconds
end mouseup
on FromPath
start using stack "/Users/robertcailliau/Desktop/pms.livecodescript"
end FromPath
on ExplicitFromFile
create script only stack "pms"
open file "/Users/robertcailliau/Desktop/pms.livecodescript" for "utf-8" text read
read from file "/Users/robertcailliau/Desktop/pms.livecodescript" until EOF
set the script of stack "pms" to it
start using stack "pms"
end ExplicitFromFile
Code: Select all
stack "pms"
on putmilliseconds
put the milliseconds into field 1
end putmilliseconds
Code: Select all
stack "pms"
Code: Select all
script "pms"
Code: Select all
start using stack "/Users/robertcailliau/Desktop/pms.txt"
A little further down, you will see what Thierry mentioned...https://livecode.com/script-only-stacks/ wrote: In a nutshell, a script only stack is a text file, structured in a specific way, which the engine can load and save as if it were a normal stackfile. When the engine loads a script only stack, it creates a stack with the name specified in text file and sets the stacks script property to the script specified in the text file. When the engine saves a script only stack it reverses this process, writing out a text file containing the stack name and stack script and absolutely nothing else.
Reporting from Lockdown New England,The fact that script only stack files really are just text files is really important! It means you can edit and create them in any text editor you choose, and use any text based processing tool on them (the key thing for git is that you can diff and patch them)! The only thing to remember is that the very first line in the text file has to be of the form:With every line after the first being taken as the stack script.script "<name>"