Setting Variables to certain applications

Look under the if Lsn = “Quit” and if Lsn = “Open” . parts, and ull see what i mean :stuck_out_tongue:

set Listening to {"Quit","Open","Activate", "Cancel", "Exit", "Stop", "Time"}
repeat
	repeat
		try
			tell application "SpeechRecognitionServer" to set Lsn to listen for Listening
			exit repeat
		end try
	end repeat
	if Lsn = "Quit"
		tell app "Finder" to set QuitableApps to  -- All Open Applications
		tell application "SpeechRecognitionServer" to set Quitme to listen for QuitableApps
		tell app Quitme to Quit
	if Lsn = "Open" or Lsn = "Activate"
		tell app "Finder" to set OpenableApps to -- All Applications
		tell application "SpeechRecognitionServer" to set Openme to listen for OpenableApps
		tell app Openme to Activate
	else if Lsn = "Cancel" or Lsn = "Exit" or Lsn = "Stop" then
		exit repeat
	else if Lsn contains "Time" then
		say "The Time is " & (current date)
	end if
end repeat

Also, could u tell me how to change the Time to just the time and not the whole date? lol

set Now to (current date)
set time of Now to 8 * hours + 30 * minutes
Now ---> date "Monday, February 6, 2006 8:30:00 AM"

How about the setting variableA to all open apps, and variableB to all apps?

Try using

tell app “System Events”
set app_names to (displayed name of every process whose visible is true and displayed name is not “Finder”)
end tell

This is not 100% full proof.

gl,