Active application - how to tell?
Active application - how to tell?
- Subject: Active application - how to tell?
- From: Peter Mathiessen <email@hidden>
- Date: Tue, 22 Jun 2004 09:59:15 +0200
Hi all,
How do I tell the System event application if an application is running or
not?
I have a problem with an other applescript and I need to know if the
application "dropzip" is running or not. The script shall only be activated
if "dropzip" is NOT running! If it is still running the applescript, that is
triggered by Folder actions won4t work.
Also, how do I do if I want the script to recheck if "dropzip" is not
running anymore? I want the script only to be triggered if "dropzip" is not
running. If it is running I want the script to check until dropzip is not
running.
This won4t work, but maybe someone have a clue?
--on adding folder items to this_folder after receiving added_items
tell application "System Events"
if process "Dropzip" is activated then
copy "Macintosh HD:Script_folder:Dropzip:" as text to the_vol
set searchFolder to (the_vol & "zip_files:")
set destfolder to (the_vol & "temp_folder:")
set myList to list folder alias searchFolder without invisibles
repeat with myFilename in every item of myList
set movefile to alias (searchFolder & myFilename)
tell application "Finder"
if name of movefile ends with "zip" then
set name of file movefile to characters 1 thru -9
of(myFilename)as string
end if
if name of movefile does not end with "zip" then
move file movefile to destfolder with replacing
end if
end tell
end repeat
set searchFolder to (the_vol & "temp_folder:")
set destfolder to (the_vol & "Klara Filer:")
set myList to list folder alias searchFolder without invisibles
repeat with myFilename in every item of myList
set xfile to alias (searchFolder & myFilename)
tell application "Finder"
set name of xfile to (myFilename & ".zip")
move file xfile to destfolder with replacing
end tell
end repeat
set item_count to (the_vol & "Klara filer:")
if the item_count is greater than 1 then
tell application "Finder"
make new Finder window to folder "Klara filer" of folder "Dropzip"
of folder "Script_folder" of startup disk
end tell
end if
end if
end tell
--end adding folder items to
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.