为了方便添加我用到的库 我还做了转义 按钮 看看就指导怎么设置了

macroScript gt_10_weiku
--enabledIn:#("max", "viz") --pfb: 2003.12.12 added product switch
category:"盖天工具"
--internalCategory: "UVW Unwrap" --do not localize
toolTip:"转函数库"
--silentErrors:TRUE
buttontext:"转函数库"
(

try (DestroyDialog zhuan_text)catch ()
rollout zhuan_text "转字符为库"
(
button btn1 "转为我用" width:137 height:50
spinner ui "最大行数" range:[0,99999999,2] type:#integer fieldWidth:80
local kl
on btn1 pressed do
(
try(
--while not eof std_oo do
for o = 1 to ui.value do
(
local opo = readLine std_oo
coun= filterString opo " "

if coun.count>1 then
(
kl= ""
for i in coun do
(
kl+=i
kl+="*"
)

format "%\n" kl to:li
--print kl
)else if coun.count==1 then
(
format "%\n" coun[1] to:li

)

)
)catch (messageBox "你给的行数不够 或太多。")


)
on zhuan_text open do
(
try (
global filePath,std_oo
filePath = getDir #maxRoot + @"\ce.api"
std_oo=openFile filePath


----输到新文件中。
global lingshi ,li
lingshi = getDir #maxRoot + @"\mytools.tmp"

li = createfile lingshi

)catch (messageBox "配置文件不全")
)
on zhuan_text close do
(
try (
close std_oo

close li
)catch ()
)





)
CreateDialog zhuan_text 162 80 mouse.screenpos.x (mouse.screenpos.y+20)
--SetDialogPos zhuan_text mouse.screenpos
)

posted on 2011-10-14 10:33  盖天00  阅读(118)  评论(0编辑  收藏  举报

导航