christian,
Maybe this is a good place to mention that it would be great if it were someday scriptable to to pull up those popupwindows windows. Is it thinkable that someday javascript enabled pages will be scriptable in devonthink? I suppose its something for 2.0 if so…but I just thought I’d mention that I’d really be in favor of it.
What I keep wanting to do is be able to issue a command in a script that would do something like:
----beware: this is imaginary code!
......
----code to get url would go here
----
set the_record to create record with {name:"temp", source:the_source,URL:the_url,} in import_location
set new_window to create new window of record the_record with {visible:false}
repeat while loading of new_window is true
wait 1
end repeat
do javascript(javascript_command_extracted_from_window) in window new_window
repeat while loading of new_window is true
wait 1
end repeat
set x to source of new_window
close window the_window
delete record the_record
(obviously this code will not work right now…because the visible property is not writable on creation, and there is now “in window” property for javascript…)
I guess I haven’t tried it, but can devonagent apply arbitrary javascript to an open window, or is that not working yet there either…? Hmmm…maybe it would work there or in safari, and I could temporarily work around this problem in DTP for the moment…oh I bet it is buggy in Safari. I suspect that if anyone is going to make this work it will be you Christian.
Probably it isn’t easy to embed the whole java engine into a webkit program, and that’s why no one has made this scriptably doable yet, but it is sort of the missing link for a lot of web pages these days. I just thought I’d mention that this would be greatly appreciated!
The other random thing apropos this thread is that it would be really nice if in the scripting language there would be some way to know if the object in the currently viewed window is a pdf other than looking at the “extension” at the end of the url is “.pdf”
Is there any chance that it is possible that “think windows” have a property called “type” that would answer “PDF” or “html” or the like? or is this simply not known? Gee, no, I’m not greedy: invisible windows, window properties, and javascript support…all in due time I guess
one way or another, it all does keep getting better…
cheers,
erico