• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Active Application -Smile-
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Choose location dialog - view as html
  • Next by Date: Re: Choose location dialog - view as html
  • Previous by thread: Re: Choose location dialog - view as html
  • Next by thread: How to get Finder and System Events confused
  • Index(es):
    • Date
    • Thread