newcod3r wrote: ↑
normally I will write it like this
Code: Select all
SendInput, % "{Text}SendInput % ((Toggle := !Toggle) ? ""A"" : ""B"")"
Well, that line doesn't toggle anything. It sends everything past the {Text} exactly as shown, which I don't think you mean. What it ends up sending would itself be a correct example of a toggle. I am guessing you use that line with a hotkey to write an example of a toggle into your script. What I think you mean is the following, which is the text that results from executing the above line:
Code: Select all
SendInput % ((Toggle := !Toggle) ? "A" : "B")
newcod3r wrote: ↑
But I'm not sure how to put it within a parameter.
The inverse sorting is as such:
I assume you mean within a
function parameter because the above is also a parameter to the SendInput
command, which is why you have to force an expression if you don't want to use command/legacy syntax. Basically it's the same except you don't need to force an expression because function parameters are already expressions. So your string "prop:+System.DateModified;" would be one result of the ternary operation, and you'd have whatever string you want as the other result:
Code: Select all
f10::sortFolders((Toggle := !Toggle) ? "prop:-System.DateModified" : "other string")