Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
CnPack IDE 专家包(CnWizards)
» [BUG?]脚本功能
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: [BUG?]脚本功能
jAmEs_
灌水部部长
UID 886
Digest Posts 0
Credits 1134
Posts 600
点点分 1134
Reading Access 10
Registered 2005-6-5
Location 广东
Status Offline
#1
Post at 2010-5-6 11:46
Profile
|
Blog
|
P.M.
[BUG?]脚本功能
IdeSetEditorSelectedText每次执行后,会多一个回车的动作,导致当前源码换行,这个是什么原因?能否改掉?
zjy
管理员
UID 2
Digest Posts
6
Credits 2385
Posts 1543
点点分 2385
Reading Access 102
Registered 2002-12-16
Location China
Status Offline
#2
Post at 2010-5-6 16:30
Profile
|
Site
|
Blog
|
P.M.
这个函数是用来进行多行和整行文本处理的
参数也是用TStringList来保存文本,所以转换后会有个回车。
如果不想要回车,可以自己用OTA的块操作接口来处理。
Zhou JingYu
CnPack Administrator
http://www.cnpack.org/
jAmEs_
灌水部部长
UID 886
Digest Posts 0
Credits 1134
Posts 600
点点分 1134
Reading Access 10
Registered 2005-6-5
Location 广东
Status Offline
#3
Post at 2010-5-6 16:41
Profile
|
Blog
|
P.M.
晕哦,不能由CW处理吗?
本来是希望把ToUpper功能放到工具栏的,使用才方便,但是这个功能不能放,所以用脚本,结果。。。
zjy
管理员
UID 2
Digest Posts
6
Credits 2385
Posts 1543
点点分 2385
Reading Access 102
Registered 2002-12-16
Location China
Status Offline
#4
Post at 2010-5-6 18:31
Profile
|
Site
|
Blog
|
P.M.
选择块转大写,可以用这个:
[Copy to clipboard]
CODE:
{*******************************************************}
{ }
{ Pascal Script Source File }
{ Run by RemObjects Pascal Script in CnWizards }
{ }
{ Generated by CnPack IDE Wizards }
{ }
{*******************************************************}
program Script3;
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ToolsAPI, CnWizUtils;
var
View: IOTAEditView;
begin
View := CnOtaGetTopMostEditView(nil);
if (View <> nil) and (View.GetBlock <> nil) then
begin
View.GetBlock.UpperCase;
end;
end.
Zhou JingYu
CnPack Administrator
http://www.cnpack.org/
jAmEs_
灌水部部长
UID 886
Digest Posts 0
Credits 1134
Posts 600
点点分 1134
Reading Access 10
Registered 2005-6-5
Location 广东
Status Offline
#5
Post at 2010-5-6 19:28
Profile
|
Blog
|
P.M.
太感激了:)
Poll
Trade
Reward
Activity
CnPack Forum
CnPack English Forum
> CnWizards IDE Wizards
> CVSTracNT
> Announcements & Others
All times are GMT++8, the time now is 2024-11-23 06:13
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.008852 second(s), 9 queries , Gzip enabled
TOP
Clear Cookies
-
Contact Us
-
CnPack Website
-
Archiver
-
WAP
Member's CP Home
Edit Profile
Credits Transaction
Public User Groups
Buddy List
Main
Page Views
User Agents
Posts History
Top Forums
Top Threads
Post Ranking
Credit Ranking
Online Time
Team
Moderation Stats