Create a list of files from dropping into a target...
Is this even possible?
I'd like to have a list of files that I just drag files from a finder window into and just have them append to the list. I have been searching but cannot find anything. Think of it like a playlist that I want to add to.
THANKS!
Rick
> I'd like to have a list of files that I just drag files from a finder window into and just have >them append to the list. I have been searching but cannot find anything. Think of it like a >playlist that I want to add to.
This is completely stolen from someone off the list... please pipe up
if this is your useful creation. I just changed one box from "prepend
prefix" to "prepend append." You can add to the list, clear the list,
and pick items from the list.
Thanks,
Keith
keith manlove schrieb:
> This is completely stolen from someone off the list... please pipe up
> if this is your useful creation.
It's certainly not, its basically from the ubumenu help file
[p prefix_settings]...
Stefan
--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com
Oops... someone gave it to me on the list... shame on me. Thanks to
that ubumenu subpatcher then.
On 7/14/07, Stefan Tiedje wrote:
> keith manlove schrieb:
> > This is completely stolen from someone off the list... please pipe up
> > if this is your useful creation.
>
> It's certainly not, its basically from the ubumenu help file
> [p prefix_settings]...
>
> Stefan
>
> --
> Stefan Tiedje------------x-------
> --_____-----------|--------------
> --(_|_ ----|-----|-----()-------
> -- _|_)----|-----()--------------
> ----------()--------www.ccmix.com
>
>
>
Thanks for this input so far. This solves part of the issue, my second thing I'd like is that I have a large visual list not inside a dropdown, maybe like 10 lines high that has these in them. So you could just glance and see what is going on.
I don't see anything off the top of my head that could do this. Has anyone seen this or is it something you could implement with java?
jit.cellblock works great for this kind of thing.
but if you don't have jitter, you could create something similar with several textedit's stacked up.
isn't jit.cellblock released with max and not jitter? That's a good
answer, Rick.
On 7/14/07, Robert Ramirez wrote:
>
> jit.cellblock works great for this kind of thing.
> but if you don't have jitter, you could create something similar with several textedit's stacked up.
>
On 15 juil. 07, at 01:36, keith manlove wrote:
> isn't jit.cellblock released with max and not jitter? That's a good
> answer, Rick.
jit.cellblock does not require Jitter since MaxMSP 4.5.
ej
I do in fact have jitter! :)
I did start writing what I wanted in JS (after I found the JSUI documentation).
I will play with the jit.cellblock and see about automating it. So far I can see how to do everything but reordering entries in the list I create. I wanted to drag and reorder items in the list, that might be the deal breaker here. Other than that, it works great.
don't know about dragging items around, perhaps possible with javascript. however an easier solution might be to have one column function as a re-ordering column. eg. you click on a particular row in this column once to store the value, and click again to tell it where to go, or swap the two values out.
should be possible without scripting, methinks
hmmm, this was much more fun than work.
hope it helps.
-rob
Wow, you all have been amazingly helpful!
Okay, so now when I drag a file in, if its longer than a certain size it gets part of the song replaced with like #AF3984. Is there any way that I can keep the whole original name?
Hi.
Another (sunday) example of dragging items around, but on more than one
line, and working with coll:
Quote: grimepoch wrote on Sat, 14 July 2007 23:05
----------------------------------------------------
> Wow, you all have been amazingly helpful!
>
> Okay, so now when I drag a file in, if its longer than a certain size it gets part of the song replaced with like #AF3984. Is there any way that I can keep the whole original name?
----------------------------------------------------
heh, you are the only other person i know of who has complained about this problem (other than me). it's a weird os x limitation, you can search the forum for a good explanation somebody gave me. it doesn't happen on windows. my solution (which took me ages to get right) uses a combination of java and javascript. java for the display of the full file name, and javascript for communication with max.
i believe i had this working originally with the shell object instead of java, but then the shell object got itself broken and was just recently fixed.
max, javascript and java files posted below. i put the max file in a bpatcher with an argument. good luck.
***** save and compile as JShell.java *****
import com.cycling74.max.*;
import java.io.*;
public class JShell extends MaxObject {
//private shell mShell;
public JShell() {
post("JShell: -ls");
declareIO(1,1);
}
public void anything(String arg, Atom[] args)
{
if(arg.equals("ls")) {
File file = new File(args[0].toString());
if(file.exists())
{
String[] files = file.list();
for(int i=0; i
{
if(!files[i].startsWith("."))
outlet(0, files[i]);
}
}
else
post("Error: can't find file: " + args[0].toString());
}
else
{
post("Did not recognize command " + arg);
}
}
}
**** save as folderiter.js *****
/*
simple example of iterating through the files in a folder
*/
outlets = 7;
setoutletassist(6,"folder path");
setoutletassist(5,"number of files in folder");
setoutletassist(4,"file size (in bytes)");
setoutletassist(3,"file type");
setoutletassist(2,"file extension");
setoutletassist(1,"modification date");
setoutletassist(0,"file name");
function get_folder_files(v)
{
var loc_folder = new Folder(v);
var count_files = -1;
loc_folder.reset();
while (!loc_folder.end) {
if ((loc_folder.filetype != "fold") && (loc_folder.extension != ".wvf")
&& (loc_folder.extension != ".jpg") && (loc_folder.extension != ".doc")
&& (loc_folder.extension != ".db") && (loc_folder.filename.length >= 1)) {
var thefile = new File(loc_folder.pathname + "/" + loc_folder.filename);
if (thefile.isopen) {
outlet(4,thefile.eof);
thefile.close();
} else {
outlet(4,0);
}
outlet(3,loc_folder.filetype);
outlet(2,loc_folder.extension);
outlet(1,loc_folder.moddate);
outlet(0,loc_folder.filename);
count_files += 1;
}
loc_folder.next();
}
outlet(5,count_files);
loc_folder.close();
}
function recursefolders(v)
{
var f = new Folder(v);
var count_files;
count_files = -1;
f.reset();
while (!f.end) {
if (f.filetype == "fold") {
var foldername;
// if path doesn't end with a slash add one
if (f.pathname.charAt(f.pathname.length-1) != "/")
foldername = f.pathname + "/" + f.filename;
else
foldername = f.pathname + f.filename
recursefolders(foldername);
} else {
count_files++;
}
f.next();
}
if (count_files > 0) {
outlet(6,f.pathname);
outlet(5,f.count);
}
f.close();
}
**** save as whateva i do what i want ***
the previous post is intended to work with a folder of folders of files.
i foresee problems with the text versions, so i created an archive of the necessary files. this also does some fancy stuff if the files exist on a drive that is not root. and i have no idea if it works on windows(but there's no need for this on windows).
-rob
Wow, this is great to know. I've been avoiding jit.cellblock when building abstractions for the sake of students who can't shell out for jitter!
Your java, js folder stuff works perfectly fine on windows over here, btw.