On Mar 6, 2011, at 15:39, Artemio González López wrote:
> On Mar 6, 2011, at 1:49 PM, [email protected]
> wrote:
>
>> So how does it work with a scriptable app from Apple, like TextEdit?
>>
>> And can you sample Skim while the 'open' command is running? (Activity
>> Monitor.app, select Skim, View > Sample Process).
>>
>> Christiaan
>
>
> Hi, Christiaan,
>
> The "open" command seems to work normally in TexTEDit, namely:
>
> set theFile to POSIX file "/Volumes/TRANS-IT/fm-2.tex"
> tell application "TextEdit"
> activate
> open theFile
> tell document 1
> count words
> end tell
> end tell
>
> opens the file and produces the expected result:
>
> tell application "TextEdit"
> activate
> open file "TRANS-IT:fm-2.tex"
> --> document "fm-2.tex"
> count every word of document 1
> --> 11362
> end tell
> Result:
> 11362
>
> And here's Skim's sample while the following script is running:
>
> set theFile to POSIX file "/Volumes/TRANS-IT/fm-2.pdf"
> set theSource to POSIX file "/Volumes/TRANS-IT/fm-2.tex"
> tell application "Skim"
> activate
> open theFile
> tell document 1
> go to TeX line 1000 from theSource
> end tell
> end tell
>
> Sampling process 24897 for 1 seconds with 1 millisecond of run time between
> samples
> Sampling completed, processing symbols...
> Analysis of sampling Skim (pid 24897) every 1 millisecond
> Process: Skim [24897]
> Path: /Volumes/Macintosh
> HD/Users/artemio/Applications/Skim.app/Contents/MacOS/Skim
> Load Address: 0x100000000
> Identifier: net.sourceforge.skim-app.skim
> Version: 1.3.12 (62)
> Code Type: X86-64 (Native)
> Parent Process: launchd [162]
>
> Date/Time: 2011-03-06 14:58:11.077 +0100
> OS Version: Mac OS X 10.7 (11A390)
> Report Version: 7
>
> Call graph:
> 916 Thread_670732 DispatchQueue_1: com.apple.main-thread (serial)
> 916 start
> 916 NSApplicationMain
> 916 -[NSApplication run]
> 916 -[NSApplication
> nextEventMatchingMask:untilDate:inMode:dequeue:]
> 916 _DPSNextEvent
> 916 BlockUntilNextEventMatchingListInMode
> 916 ReceiveNextEventCommon
> 916 RunCurrentEventLoopInMode
> 916 CFRunLoopRunSpecific
> 916 __CFRunLoopRun
> 916 __CFRunLoopServiceMachPort
> 916 mach_msg
> 916 mach_msg_trap
> [snip]
> Thanks a lot,
>
> Artemio
>
Strange, nothing there, and I get the same sample on 10.6. And the app itself
is responsive while the script is waiting?
Christiaan
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Skim-app-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-users