applescript-users Mailing List http://lists.apple.com/archives/applescript-users/2008/Jul/index.html applescript-users Mailing List Sat, 05 Jul 2008 18:00:00 +0000 "running" command issues http://lists.apple.com/archives/applescript-users/2008/Jul/msg00024.html Reply to list

Can anyone explain what the utility of using Leopard's "running" command is?

I was under the impression that it is faster than get "every process" from
"system events", and thought the latter was meant to be deprecated.

Unfortunately there seem to be problems. [...]
]]>
help needed - Broken (folder of front window) http://lists.apple.com/archives/applescript-users/2008/Jul/msg00023.html Reply to list

Hi all,  
Just installed Leopard, and several of my scripts broke, one of them  
here: 

tell application "Finder" to set the source_folder to (folder of the  
front window) as alias 

 I get this error:  
"Can't make <<class cfol>> of window 1 of application "Finder" into  
type alias. [...]
]]>
RSS Mailboxes http://lists.apple.com/archives/applescript-users/2008/Jul/msg00022.html Reply to list

Mail's dictionary says that a mailbox has the properties: name, unread  
count, account and container. 

 I can get an RSS mailbox to show this information in the console:  
 	mailbox "Apple ..." of account "RSS" of ...  
So, I know that an RSS mailbox has account "RSS". [...]
]]>
Re: InDesign CS3 | afterOpen event listener issue http://lists.apple.com/archives/applescript-users/2008/Jul/msg00021.html Reply to list

thnxs again,
you are so right!
Thanks a lot, everything works fine! I can proceed and get happy!  
  Am 04.07.2008 um 14:59 schrieb Shane Stanley:  
 On 4/7/08 10:46 PM, "demski" <email@hidden> wrote:

[...]

mit besten Grüssen
Kind regards  
 demski   [...]
]]>
Re: InDesign CS3 | afterOpen event listener issue http://lists.apple.com/archives/applescript-users/2008/Jul/msg00020.html Reply to list

[...]

The problem is with "active document"; if you use "document 1" instead, your
script should work fine. I'm not sure why (although "active" document won't
work in InDesign Server, either).

Also, you don't need all that "main(evt)" and "on main(invoker)" stuff -- [...]
]]>
Re: InDesign CS3 | afterOpen event listener issue http://lists.apple.com/archives/applescript-users/2008/Jul/msg00019.html Reply to list

Thanks for your answer, Shane!  
 Do You maybe have an example, where I can see, what I did wrong?
For better understanding here my example, that doesn't work:  
script 1: create event listener: 
tell application "Adobe InDesign CS3" 
	make event listener with properties {event type:"afterOpen",   [...]
]]>
Re: InDesign CS3 | afterOpen event listener issue http://lists.apple.com/archives/applescript-users/2008/Jul/msg00018.html Reply to list
[...]

I've only used it briefly, but I've found the scripts work fine even though
the document window is not visible until the script is finished.

 
]]>
InDesign CS3 | afterOpen event listener issue http://lists.apple.com/archives/applescript-users/2008/Jul/msg00017.html Reply to list

Hi all, 
I am playing around with the afterOpen event listener provided by  
InDesign CS3. 

I have no problems to make a listener like that and let the assigned  
handler script run afterwards. 

The problem is, that the handler script runs before the document is  
shown. [...]
]]>
osascript not getting Terminal contents http://lists.apple.com/archives/applescript-users/2008/Jul/msg00016.html Reply to list

I've written a small script to get the contents of the current Terminal tab:

tell application "Terminal"
       return the contents of the selected tab of its front window
end tell

This works fine when testing with Script Editor, but when I run the [...]
]]>
Re: Finder Network File Copy Timeout http://lists.apple.com/archives/applescript-users/2008/Jul/msg00015.html Reply to list

Hi Laine,  
Thanks for your explanation. I saved the script as an application and  
performed an AppleScript from FileMaker that opens the application and  
it all works well. To allow the database to perform the script, I have  
to save the application in a FileMaker container field and have a   [...]
]]>
set understanding to (get explanation) http://lists.apple.com/archives/applescript-users/2008/Jul/msg00014.html Reply to list

While fixing an error in another script, I ran the following  
experiment to see what would happen. 

tell application "Mail" 
	activate 
	if (count message viewers) = 0 then make new message viewer 
	set frontViewer to (some message viewer whose index is 1)  [...]
]]>
Re: Finder Network File Copy Timeout http://lists.apple.com/archives/applescript-users/2008/Jul/msg00013.html Reply to list
[...]

I suspect that FileMaker's scripting implementation wraps around yours so
that the result is something that might be described as a script within a
script. The only problem is that while you can modify your script, you can't
touch the scripting used by FileMaker, it's set at the factory (although
maybe you can submit a bug report). I apply the same general perspective to
what happens under certain circumstances when you run a do shell script. The
way I look at it, you have to break the link between the processes so that
they can work independently of each other. Technote 2065 describes the
solution of adding "> /dev/null 2>&1  &" to accomplish this for a do shell
script, I just made the same sort of suggestion for your FileMaker
situation.

I'm not the best at explaining, and I may have just made a lucky guess. The
real cause may not have anything to do with what I'm talking about. Anybody
can hit one out of 50.

 
]]>
Re: Finder Network File Copy Timeout http://lists.apple.com/archives/applescript-users/2008/Jul/msg00012.html Reply to list

[...]

I ran the FileMaker script yesterday with the Script Debugger active  
in FileMaker Pro Advanced and stopped at the Perform AppleScript  
script step. I switched to Late Night Software's Script Debugger and  
ran the AppleScript from there and the timeout error didn't occur. [...]
]]>
Re: Automated Screen Capture http://lists.apple.com/archives/applescript-users/2008/Jul/msg00011.html Reply to list
[...]

Note that this product is built in Runtime Revolution, so hopefully Runrev
is keeping up.

 
]]>
Re: Finder Network File Copy Timeout http://lists.apple.com/archives/applescript-users/2008/Jul/msg00010.html Reply to list

[...]

Here's an offhand idea. Turn the script into an application and see if the
same thing happens when you open it in Finder. If the new app's job is
completed successfully, then make FileMaker run a script that launches the
app you just created instead of the original script. [...]
]]>
Re: Automated Screen Capture http://lists.apple.com/archives/applescript-users/2008/Jul/msg00009.html Reply to list

[...]

They probably figured out a way to override the system hot keys (look  
at the symbol table of the enhancedmac bundle binary inside in the  
MacOS subfolder of the application). 

One thing to note is they are currently using a _lot_ of function   [...]
]]>
Automated Screen Capture http://lists.apple.com/archives/applescript-users/2008/Jul/msg00008.html Reply to list

The application "ScreenSteps" has an interesting feature.

You can click a preference on their app; and all screen-capture-to-clipboard
actions are automatically routed to their application.

How'd they do that?

And what other kinds of actions might be auto-captured this way? [...]
]]>
Re: Meta data help http://lists.apple.com/archives/applescript-users/2008/Jul/msg00007.html Reply to list

[...]

I tested the script in 10.4.11 and it works fine apart from annoyingly  
returning a file path whether you want it or not :-( 

Files that don't have keywords will not return "(null)" in 10.4  
because there is no reference to the keyword metadata field if none  
are present. [...]
]]>
Meta data help http://lists.apple.com/archives/applescript-users/2008/Jul/msg00006.html Reply to list

On Fri,
27 Jun 2008 Martin
Orpen Wrote On  the supject: Meta data help   Reboot!
;-)   I'm
using 10.5.3 and kMDItemKeywords works as expected -- so maybe  there
is a problem in 10.4 or more likely you've got a local problem  with
your Mac?   The [...]
]]>
Finder Network File Copy Timeout http://lists.apple.com/archives/applescript-users/2008/Jul/msg00005.html Reply to list

I've searched the archives and MacScripter's forums and haven't found  
a definitive answer to this. 

I have a script that is copying a large number of files to a network  
volume and it hits the default 2 minute timeout. The script is running  
in 10.4. [...]
]]>
Re: Looking for wrong computer http://lists.apple.com/archives/applescript-users/2008/Jul/msg00004.html Reply to list
Michelle,    I found the problem;     A script called later was still referring to a different computer.     On Jul 1, 2008, at 7:23 AM, Michelle Steiner wrote:    On Jul 1, 2008, at 6:19 AM, Robert Poland wrote:  > quoted text
      on run  	main()  end run     on main()  	tell application "Finder"  		run script POSIX file "/library/Scripts/Universal Scripts/setsoundvolume" as alias  	end tell  	   	set clickSound to (path to documents folder as string) & "clutter:Sounds:click" as alias  	delay 1  	   	run script POSIX file "/Library/Scripts/Universal Scripts/Day-Date" as alias  	   	tell application "Mail" to activate  	delay 1  	   	tell application "Play Sound" to play POSIX file "/Users/rpoland/Documents/clutter/Sounds/click" as alias  	return  end main         Bob Poland - Fort Collins, CO               
]]>
Re: Looking for wrong computer http://lists.apple.com/archives/applescript-users/2008/Jul/msg00003.html Reply to list
[...]

In that case, I expect that you have the computer's name explicit in  
the "setsoundvolume" script. 

 -- Michelle  
 --
"Growth for the sake of growth is the ideology of the cancer cell."  
  
]]>
Re: Looking for wrong computer http://lists.apple.com/archives/applescript-users/2008/Jul/msg00002.html Reply to list
Oops,    That didn't work either, still looks for wrong computer.        On Jul 1, 2008, at 7:11 AM, Robert Poland wrote:   Thanks Michelle,    This doesn't seem to work for me;      		run script POSIX file (path to scripts folder from local domain as text) & "Universal Scripts/setsoundvolume" as alias     But this does;      		run script (path to scripts folder from local domain as text) & "Universal Scripts:setsoundvolume" as alias       On Jun 30, 2008, at 7:01 PM, Michelle Steiner wrote:  > quoted text
      Bob Poland - Fort Collins, CO               
]]>
Re: Looking for wrong computer http://lists.apple.com/archives/applescript-users/2008/Jul/msg00001.html Reply to list
On Jul 1, 2008, at 6:11 AM, Robert Poland wrote:   This doesn't seem to work for me;      		run script POSIX file (path to scripts folder from local domain as text) & "Universal Scripts/setsoundvolume" as alias     But this does;      		run script (path to scripts folder from local domain as text) & "Universal Scripts:setsoundvolume" as alias       On Jun 30, 2008, at 7:01 PM, Michelle Steiner wrote:  > quoted text
     Of course; the path I gave is not a POSIX path, so there's no need to have "POSIX file" on that line.     -- Michelle    --   Patient: But doctor, slow metabolism runs in my family.     Doctor: The problem is nobody runs in your family!           
]]>
Re: Looking for wrong computer http://lists.apple.com/archives/applescript-users/2008/Jul/msg00000.html Reply to list
Thanks Michelle,    This doesn't seem to work for me;      		run script POSIX file (path to scripts folder from local domain as text) & "Universal Scripts/setsoundvolume" as alias     But this does;      		run script (path to scripts folder from local domain as text) & "Universal Scripts:setsoundvolume" as alias       On Jun 30, 2008, at 7:01 PM, Michelle Steiner wrote:  > quoted text
      Bob Poland - Fort Collins, CO               
]]>