Re: Using Log with Smile
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