mattclinch Posted February 17, 2011 Share Posted February 17, 2011 (edited) hey all. really hoping some maxscript genius can solve this problem for me... i am trying to rehash a bit of code from the Blurscript 'bsrun.ms', which essentially pulls in a list of available maxscripts from a specific directory and displays them in a dropdown allowing quick access. currently part of the scripts reads as fn bsrun_update = ( script_names = #() script_files = get_all_files_in_dir ((getdir #scripts) + "\\BlurScripts\\") false "ms" if script_files.count != 0 then ( for i = 1 to script_files.count do ( the_name = (filenameFromPath script_files[i]) append script_names (strip_file_extension the_name) ) ) ) fn bsr_io = ( bsr_ini_name = ((getdir #scripts) + "\\BlurScripts\\" + "BSRun.ini") if openFile bsr_ini_name != undefined then ( bsr_ini = openFile bsr_ini_name inputdata = readLine bsr_ini my_index = findItem script_names inputdata if my_index == 0 then my_index = 1 last_script_index = my_index close bsr_ini ) else ( bsr_ini = createFile bsr_ini_name format (strip_file_extension (filenameFromPath (script_files[the_script] as string))) to:bsr_ini close bsr_ini ) ) now if i wanted to point it to an existing mapped network location for my scripts, i would have thought i simply needs to change the lines that include... ((getdir #scripts) + "\\BlurScripts\\") to something more like.. ("z:\scripts\\") but its doesn't like it. i know that the "getdir" element allows you quickly to point to a directory within the root max folder, so i assume i don't include it. i've also tried it with UNC paths and no joy either.. appreciate any help. ta. M Edited February 17, 2011 by mattclinch Link to comment Share on other sites More sharing options...
mattclinch Posted February 17, 2011 Author Share Posted February 17, 2011 nevermind! got it! network location has to be UNc and requires two extra forward slashes.. get_all_files_in_dir ("\\\\SERVER_NAME\directory\scripts\\") false "ms" Link to comment Share on other sites More sharing options...
Koper Posted February 17, 2011 Share Posted February 17, 2011 cool just been looking to do the exact same script. do you mind posting the final code? Link to comment Share on other sites More sharing options...
mattclinch Posted February 17, 2011 Author Share Posted February 17, 2011 Blurscripts are free. http://www.neilblevins.com/blurscripts/blurscripts.htm Link to comment Share on other sites More sharing options...
Koper Posted February 17, 2011 Share Posted February 17, 2011 I know thanx anyhoo Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now