Is applescript completely unable to have empty variables? By empty I mean…
set myVar to "false"
NOTE: That -^ is NOT meant to be a boolean, it’s meant to be a string variable that holds the word “true” or “false”. (Because applescript won’t let me have empty booleans either…)
So now, I’m forced to write my variables to hidden text files on disk, then re-read them later. Which is slow… and stupid. But anyway… if my variable does not represent something, like the contents of a text fbox applescript ALWAYS returns that the variable does not exist! WTF? It’s right there! It’s the word “false”! sigh
I CAN fix this problem. by writing all my variables to disk. Oh well, I’ll try that next.
Any help would be great, thanks!
Model: iBook
AppleScript: 1.10
Browser: Safari 412.5
Operating System: Mac OS X (10.4)
It only does anything if it failed, it if passed, then it’s to be ignored, otherwise I’d need even more variables, but fear not. It will no longer have a failed/passed checker.
Instead it will plough on trying to do the impossible until all system resources are consumed and the computer crashes, resulting in data loss.
Hmm now I’m solving problems like Bill Gates! I’ll be rich in no time!
.so it shouldn’t be a problem in this particular instance. If you shell script is supposed to return “true” or “false,” but is returning “Hello World!,” then you have other problems.
Your original question still doesn’t make any sense. According to the glossary.
So, typically, variables contain a value. If you want to represent an empty/missing/null value, then you can do this (as EliseVanLooij stated):
In instances where a boolean is appropriate, these two values are all you need.
It’s not. It’s a string:
set myVar to "false"
return class of myVar
-- Result: string
Note that any string expect “true” (ignoring case), if coerced to a boolean value, will be false.
Wait, where did that come? What’s really going on here? Perhaps you should post your entire script (and shell script) here, so that the rest of us can follow along.