what applications are running
Mark Schonewille
m.schonewille at economy-x-talk.com
Thu Feb 25 06:07:07 EST 2010
Hi Nicolas,
This might work:
function programs
if the platform is "MacOS" then -- only OSX!
put shell("ps -xcw") into myList
put offset("COMMAND",myList) into myColPos
repeat for each line myLine in myList
put char myColPos to -1 of myLine & cr after myNewList
end repeat
filter myNewList without "(*"
return line 2 to -1 of myNewList
else if the platform is "Win32" then
put line 4 to -1 of shell("tasklist") into myList
repeat for each line myLine in myList
put word 1 of myLine & cr after myNewList
end repeat
return line 1 to -2 of myNewList
else
return empty
end if
end programs
The MacOS part might also work on Linux, but I'm not sure.
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
Economy-x-Talk is always looking for new software development
projects. Feel free to contact me for a quote.
More information about the use-livecode
mailing list