Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
CnPack IDE 专家包(CnWizards)
» 腳本專家問題
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: 腳本專家問題
jAmEs_
灌水部部长
UID 886
Digest Posts 0
Credits 1134
Posts 600
点点分 1134
Reading Access 10
Registered 2005-6-5
Location 广东
Status Offline
#1
Post at 2008-1-9 16:58
Profile
|
Blog
|
P.M.
腳本專家問題
var
IsDelphi: Boolean;
begin
//IsDelphi := Compiler <> cnBCB6; // 為何不能判斷是否在BCB和Delphi環境?
IsDelphi := Pos('Delphi', Application.MainForm.Caption) > 0;
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#2
Post at 2008-1-9 17:14
Profile
|
Blog
|
P.M.
用WizOptions.CompilerID吧。
Compiler这些并未在专家脚本中注册。
能使用哪些内容,可以查看PSDeclEx目录下的文件内容。
jAmEs_
灌水部部长
UID 886
Digest Posts 0
Credits 1134
Posts 600
点点分 1134
Reading Access 10
Registered 2005-6-5
Location 广东
Status Offline
#3
Post at 2008-1-9 17:44
Profile
|
Blog
|
P.M.
WizOptions.CompilerID不知道怎么用,試過:
IsDelphi := WizOptions.CompilerID <> cnBCB6;不行
看還是我那種方法快速方便
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#4
Post at 2008-1-9 22:58
Profile
|
Blog
|
P.M.
把WizOptions.CompilerID 给WriteLn出来看其值嘛。
jAmEs_
灌水部部长
UID 886
Digest Posts 0
Credits 1134
Posts 600
点点分 1134
Reading Access 10
Registered 2005-6-5
Location 广东
Status Offline
#5
Post at 2008-1-10 09:08
Profile
|
Blog
|
P.M.
原來是字符型的啊,難怪編譯不通過。
IsDelphi := WizOptions.CompilerID <> 'CB6';
這樣可以。
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#6
Post at 2008-1-10 09:18
Profile
|
Blog
|
P.M.
是哇。WizOptions的声明在PSDeclEx的CnWizOptions.pas里头有,使用时可以看看。
jAmEs_
灌水部部长
UID 886
Digest Posts 0
Credits 1134
Posts 600
点点分 1134
Reading Access 10
Registered 2005-6-5
Location 广东
Status Offline
#7
Post at 2008-1-10 09:42
Profile
|
Blog
|
P.M.
就是不太想去看才這樣。。。不想了解太多接口了
shenloqi
灌水处处长
UID 34
Digest Posts
1
Credits 287
Posts 179
点点分 287
Reading Access 10
Registered 2003-3-15
Status Offline
#8
Post at 2008-1-10 10:01
Profile
|
P.M.
IsDelphi := Pos('Delphi', Application.MainForm.Caption) > 0;
这样的代码对于英文版本的Delphi没有问题,可是对于其他语言版本的Delphi估计就不行了吧?
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#9
Post at 2008-1-10 10:25
Profile
|
Blog
|
P.M.
那里头都是中文注释,够容易懂吧。
不想了解CW额外提供的接口,就只有想别的硬办法判断了。哈哈。
jAmEs_
灌水部部长
UID 886
Digest Posts 0
Credits 1134
Posts 600
点点分 1134
Reading Access 10
Registered 2005-6-5
Location 广东
Status Offline
#10
Post at 2008-1-10 17:14
Profile
|
Blog
|
P.M.
不是容易不容易理解的问题,的确现在软件太多接口了,每年还有大量的概念出现,我是多么希望统一的啊,那样就不用面对选择,呵呵
不过要做的好些就只能去了解了
jAmEs_
灌水部部长
UID 886
Digest Posts 0
Credits 1134
Posts 600
点点分 1134
Reading Access 10
Registered 2005-6-5
Location 广东
Status Offline
#11
Post at 2008-1-10 17:15
Profile
|
Blog
|
P.M.
而且我看例子有用Compiler,但是不行,才说问问。。。
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#12
Post at 2008-1-10 19:42
Profile
|
Blog
|
P.M.
不对。Compiler应该是行的,注册了的。
比如我在Delphi 7 里头跑脚本。
IsDelphi := Compiler <> cnBCB6;
if IsDelphi then
Writeln('xxxxx');
这句,是会打出来xxxxx的。
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#13
Post at 2008-1-10 20:07
Profile
|
Blog
|
P.M.
抱歉,经过检查。我们在注册Compiler的值的时候,对BCB的值处理错位了。导致BCB5 和BCB6的Compiler值判断错误。因此才导致您一开始的脚本判断失败。
这个问题将在下一版本修正。
一个bug,
感谢感谢。
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 16:28
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.015581 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