While waiting for my issue with missing posts to be resolved...
How would I use getFile without grabbing (or removing) the file's extension?
Example:
Code:
def load_script = getFile("Select a .groovy file");
...allows me to select a file. However...
Code:
return ""+load_script+""
... won't work because getfile understandably fetches the full name of the file selected, including the extension (eg. "intro.groovy"). Thus:
Code:
return "intro.groovy"
... is called and (logically) fails.
I fixed the extension problem by first calling:
Code:
load_script = load_script.replace(".groovy", "");
but it seems that it's still trying to return the full path rather than just the file name.
So how do I get "intro" from the user picking the file rather than "C:\Programs\SexScripts\Scripts\intro.groovy"?
Not sure what the best approach is, let alone how to do it, so help would be appreciated by those more skilled in Groovy/Java than I am!