口袋数码论坛's Archiver

terst 发表于 2007-2-4 00:02

直接在 PPC 上写程序,不用任何开发语言

[font=Arial]用 HTML 作界面,扩展 JScript 可以调用软件自己的函数以及系统函数;所以只要自己会 C 语法 Jscript, 就可以在 PPC 上写代码。

[color=darkred]软件里 HTML 中调用系统函数的方法:[/color]
函数名称描述格式为:DLL!??Function, 第一个 ? 为 v/b/i/s/r-表示返回函数值类型为 空/BOOL/整数/字符串/浮点数, 第二个为返回值位置 0-F, 0 表示函数返回值,1表示取第一个参数为返回值。

用 GetForegroundWindow 取当前窗口句柄
host.fnFun("Coredll!i0GetForegroundWindow");

取当前窗口的标题
host.fnFun("CoreDll!s2GetWindowTextW", host.fnFun("Coredll!i0GetForegroundWindow"),"260",260);

设置当前窗口标题
host.fnFun("Coredll!v0SetWindowTextW", host.fnFun("Coredll!i0GetForegroundWindow"),"My Title");

用 wsprintf 格式化输出
host.fnFun("coredll!s1wsprintfW","10","%X",15);

取当前程序全路径 GetModuleFileName
host.fnFun("coredll!s2GetModuleFileNameW",0,"260",260)

休眠一秒钟 Sleep
host.fnFun("coredll!v0Sleep",1000)

分配一块内存 LocalAlloc
host.fnFun("coredll!i0LocalAlloc",0,128)

取电源状态 GetSystemPowerStatusEx
host.fnFun("coredll!i0GetSystemPowerStatusEx",1501680,0)

释放内存 LocalFree
host.fnFun("coredll!v0LocalFree",0,1501680)

软件 [/font][url=http://bbs.pdafans.com/thread-313563-1-2.html][font=Arial]http://bbs.pdafans.com/thread-313563-1-2.html[/font][/url]

MacintoshM 发表于 2007-2-4 09:50

太牛了!

化石fossil 发表于 2007-2-19 10:32

不错,好

llfboy 发表于 2007-2-28 15:52

好是好但不是一般人吃的消呀.:(

kelsenxu 发表于 2008-5-28 15:36

你就用到C语言和javascript语言了
应该是不借助开发工具以纯文本编辑

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.