Getting Path of Application after match creator type

Hello there,

Is there a way to get the folder path of an Application after knowing that the application exist in the computer (by using creator type)??

I am trying to write a script that will :

  1. Look to see if Quark exists in computer (i guess by searching creator type XPR3)
  2. If so, got the folder path of Quark, together with the info of the disk it is on
  3. Using the path, launch Quark

Being a newbie, I am a bit stuck at first step. Okei… Having to know quark is XPR3, how do i search?? and then how do i get path??

Thanks for all ur help… Appreciate it…

Without getting the path:

tell application "Finder"
	try
		set AppName to name of application file id "ttxt" -- use your creator code
	on error
		display dialog "Application not found"
		return
	end try
end tell

tell application AppName
	run
end tell

Using Cuneyt’s code to take it a step further:

tell application "Finder"
	try
		set AppName to displayed name of application file id "ttxt" -- use your creator code 
		set appContainer to container of application file id "ttxt" as alias
	on error
		display dialog "Application not found"
		return
	end try
	reveal alias ((appContainer as text) & AppName)
end tell