• 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: Using Log with Smile
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Log with Smile


  • Subject: Re: Using Log with Smile
  • From: Robert Poland <email@hidden>
  • Date: Fri, 23 Jan 2015 09:18:01 -0700

> On Jan 22, 2015, at 3:56:PM, Christopher Stone <email@hidden> wrote:
>
> On Jan 22, 2015, at 08:32, Robert Poland <email@hidden> wrote:
>> I need to learn how to use the Log in Smile.
> ______________________________________________________________________
>
> Hey Bob,
>
> There is not such a thing as the Log in Smile.
>
> As Deivy mentioned output for the log command will show up in the Console.
>
> But as you said separating the wheat from the chaff can be problematic.
>
> So.  Let us not forget that Smile is itself scriptable, therefore creating your own special-purpose log is simple.
>
> -------------------------------------------------------------------------------------------
> tell application "Smile"
>   stop log
>   set logWin to make new text window with properties {name:"Log Window", bounds:{1075, 22, 1920, 1196}}
>   tell logWin
>     set end of its text to "My Log Item" & linefeed
>   end tell
>   start log
> end tell
> -------------------------------------------------------------------------------------------
>
> In the script I'm using start/stop log, because I don't want the operation to show up in the Console.

I’m lost. How does the “log” data get to the logWin?

Test Script
tell application "Smile"
	stop log
	set logWin to make new text window with properties {name:"Log Window", bounds:{1075, 22, 1920, 1196}}

	try
		error 99
	on error 99
		# say "Caught expected error."
		log (current date) & " - Caught expected error."
	end try

	tell logWin
		set end of its text to "My Log Item - " & (current date) & linefeed
	end tell
	start log
end tell

> --
> Best Regards,
> Chris

Robert Poland
Fort Collins CO


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


  • Follow-Ups:
    • Re: Using Log with Smile
      • From: Christopher Stone <email@hidden>
References: 
 >Using Log with Smile (From: Robert Poland <email@hidden>)
 >Re: Using Log with Smile (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Labels and tags ?
  • Next by Date: Differences between commands in AppleScript editor and commands drop-down from tools menue from within Dragon Dictate
  • Previous by thread: Re: Using Log with Smile
  • Next by thread: Re: Using Log with Smile
  • Index(es):
    • Date
    • Thread