2015-06-22 82 views

回答

0

如果你没有在你的领域一个巨大的文字您可以使用:

on mouseMove 
    if the mouseLoc is within the rect of me then 
     put the mouseChunk into tChunk 
     # Check if chars before or after is a "spacing char" 
     put word 2 of tChunk into tstart 
     put word 4 of tChunk into tEnd 
     repeat with i = tStart down to 1 step -1 
     if matchText(char i of me, "\s") then exit repeat 
     end repeat 
     put i+1 into tStart 
     repeat with i = tEnd to the number of chars of me 
     if matchText(char i of me, "\s") then exit repeat 
     end repeat 
     put i-1 into tEnd 
     select char tstart to tEnd of me 
    end if 
end mouseMove 
0

你怎么选择?例如,如果这是在该领域的脚本:

on mousemove select the mouseText end mouse move

你会选择光标下的文本。为了选择复合文本,例如“usa-uk”,您必须对该文本片段进行分组。这将该片段的textStyle设置为“链接”。

克雷格·纽曼

相关问题