Posted by member 212670 on 2006-03-13 21:07:31 link
Ok, first, one problem you might have is that "path" is already a Windows environment variable. So don't use that. :P
Next, and this might be what DeV was getting at, you can use the full path while it's in memory. If you want to see an example, try this:
TheLabelOnDrop !bang "%[droppath]%"
*Script bang !bang
*Script exec !varset tmp "%{args:1}"
*Script exec !alert "%{tmp}"
*Script exec "$FileManager$" "%{args:1}"
*Script exec !xTextSaveEvar @$ConfigDir$test.rc@ @test@ @%{args:1}@
*Script ~bang
That sends the droppath as an argument, which includes the entire path. You'll see it uses the entire path properly by the way !alert shows it, and the way it opens your filemanager to the path.
Now, if you want to save that, you can do !varsave tmp (assuming you have a var named "tmp" in your vars file), BUT you don't want to. mzscript won't include the quotes, even if you surrounded the argument with mz's escapes for quotes (atleast it wouldn't for me), which of course will be a problem next time you load your var file.
So, you can play with the full path while its in memory, when you want to actually write it, just use xTextEdit.
I hope I made sense in there somewhere. :D
Now, back to the topic: There is a problem with %[droppath]% and writing paths in to vars and trying to save them. I use comdlgls to set vars all the time, and mzcript saves the variables with no problems at all.
Next, and this might be what DeV was getting at, you can use the full path while it's in memory. If you want to see an example, try this:
TheLabelOnDrop !bang "%[droppath]%"
*Script bang !bang
*Script exec !varset tmp "%{args:1}"
*Script exec !alert "%{tmp}"
*Script exec "$FileManager$" "%{args:1}"
*Script exec !xTextSaveEvar @$ConfigDir$test.rc@ @test@ @%{args:1}@
*Script ~bang
That sends the droppath as an argument, which includes the entire path. You'll see it uses the entire path properly by the way !alert shows it, and the way it opens your filemanager to the path.
Now, if you want to save that, you can do !varsave tmp (assuming you have a var named "tmp" in your vars file), BUT you don't want to. mzscript won't include the quotes, even if you surrounded the argument with mz's escapes for quotes (atleast it wouldn't for me), which of course will be a problem next time you load your var file.
So, you can play with the full path while its in memory, when you want to actually write it, just use xTextEdit.
I hope I made sense in there somewhere. :D
Now, back to the topic: There is a problem with %[droppath]% and writing paths in to vars and trying to save them. I use comdlgls to set vars all the time, and mzcript saves the variables with no problems at all.