Re: Active Application -Smile-
Re: Active Application -Smile-
- Subject: Re: Active Application -Smile-
- From: Philippe GRUCHET <email@hidden>
- Date: Wed, 19 Mar 2003 01:51:57 +0100
From: Paul Berkowitz <email@hidden>
(Smile defines "name" within its application classes, but it will
return allways an empty string, why? Bug?)
last word of ((path name of me as string) & ":Contents:MacOS:Smile")
--> "Smile"
And:
last word of ((path name of me as string) & ":Phnurk:Peekaboo:Tibbles")
--> "Tibbles"
Yeap!
So what? Since you're adding it onto the end, that's obviously
imposing the result. It doesn't exactly answer the question.
From within Smile itself:
set SmileName to last word of (path name of me as string)
--> "Smile.app"
set SmileName to (words -1 thru -1 of (path name of me as string) as
text)
--> "Smile.app"
set SmileName to text -6 thru -10 of (path name of me as string)
--> "Smile"
set SmileName to (items -6 thru -10 of (path name of me as string) as
text)
--> "Smile"
set text item delimiters to ":"
set SmileName to text items -1 thru -2 of (path name of me as string)
set text item delimiters to ""
set SmileName to SmileName as text
--> "Smile.app"
Then, do what you want with 'SmileName'. Examples:
1) Inside a Smile's script window:
tell application SmileName to make new text window with properties
{name:"aName"}
--> text window id n
2) Inside a Smile's text window:
set SmileName to text -6 thru -10 of (path name of me as string)
-- Then select this line and press Enter and only Enter. Not Return!
--> "Smile.app"
tell application SmileName to make new script window with properties
{name:"anotherName"}
-- 'select Enter'
--> script window id n
And so on...
Kind regards,
Philippe Gruchet/SVM Mac
VNU Publications France
http://svmmac.vnunet.fr
_______________________________________________
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.