置顶随笔

[置顶]一个新的Skin

摘要: 一个新的Skin应用此Skin方法:此Skin已经被dudu添加到博客园的Skin列表中,可以直接选用,不用在"通过CSS定制页面"中输入css代码了。选择 管理/选项/Configure 在页面的:Display Skin列表框选择:Book 选择 管理/选项/Configure 在页面的:Display Skin( 66)列表框选择:gertrude 在 Custom CSS Selector...阅读全文

posted @ 2006-02-23 13:56 Pharaoh 阅读(1578) 评论(45) 编辑

2010年8月30日

简单的远程控制软件

给客户开发了一套软件,并部署在客户的服务器上。为了方便维护,开了远程控制。不过客户使用的是联通的网络,公司是电信网络,远程控制很慢,于是考虑如何降低网络流量,将远程服务器的屏幕分辨率降低、颜色数降低,不过操作还是很卡。

考虑到一般操作不需要实时刷新屏幕,只有点击鼠标或者输入字符后需要获取最新的屏幕图像,于是按照本思路自己写了一个远程控制的软件。

 

关键技术:

控制方式:

使用B/S方式,客户端直接用IE访问。

服务器端直接通过HTTP协议接收指令,经过搜索,Net直接提供了HttpListener用于处理HTTP通讯。

模拟鼠标操作:

直接调用API:mouse_event,网上介绍也比较多,我在其他项目中使用过,直接使用现有文件。

模拟键盘操作:

.Net直接有SendKeys发送按键,特殊按键都可以进行处理。

获取屏幕截图:

在网上搜索了一下,直接使用网上的代码。

 

将以上内容拼凑一下,软件就完成了。实际使用了一下,效果还不错。

使用方法:

将编译后目录下的“httpServer.exe”和“screen.htm”文件拷贝到服务器上,运行即可。

默认端口9999,也可在可执行文件后跟上端口号。

客户端使用IE服务服务器IP和对应端口即可,例如“http://127.0.0.1:9999/”

鼠标控制:直接点击图像即可。

键盘控制:在文本框中输入键盘指令,发送即可。

图中的示例为: 1回车2TAB键2.1,然后执行全选操作(Ctrl+A),具体特殊键参见SendKeys帮助。

image

 

说明:

必须远程登录后才能获取到图像和执行指令。(必须和远程控制等软件配合使用,不能单独使用。)

可以自行修改screen.htm文件,将一些常用鼠标键盘操作制作为脚本,一键执行,例如自动登录软件等。

附件下载:

源码和可执行文件:/Files/Pharaoh/httpServer.zip

源码为VS2008格式。

posted @ 2010-08-30 17:43 Pharaoh 阅读(249) 评论(0) 编辑

2009年6月11日

学习Python,编写了个网站

这段时间学习了一下python,作为练习,编写了个网站:

论坛表情即时贴

思路来源于以前编写的一个Maxthon插件:论坛表情扩展2

页面风格沿用了SkyShow影 的  "论坛表情即时贴"

 论坛表情即时贴

posted @ 2009-06-11 19:03 Pharaoh 阅读(359) 评论(0) 编辑

2009年5月26日

将Unicode字符串转换为普通文字

     Json传输中文时为了防止乱码,通常我们会进行Unicode编码 ,如{userID:"001",nickname:"\u65e0\u8bed\u68a6" }
    下面的代码,将能完成Unicode的与普通字符的转换功能,函数是在网上找的,做个记号

 

 

private string U2CnCode(string str)
{
    Match m;
    Regex r 
= new Regex("(?<code>\\\\u[a-z0-9]{4})", RegexOptions.IgnoreCase);
    
for (m = r.Match(str); m.Success; m = m.NextMatch())
    {
        
string strValue = m.Result("${code}");   //代码
        int CharNum = Int32.Parse(strValue.Substring(24), System.Globalization.NumberStyles.HexNumber);
        
string ch = string.Format("{0}", (char)CharNum);
        str 
= str.Replace(strValue, ch);
    }
    
return str;
}

 

posted @ 2009-05-26 15:51 Pharaoh 阅读(205) 评论(0) 编辑

2007年9月26日

测试从Mathon插件发表

测试使用BlogEx发布Blog

BlogEX Neo101 6 个月 以前 发布于 插件

扩展截图

Blogex1

描述

Description

A Blog EXtension for Maxthon.

Add posts to your blog quickly with this Maxthon Sidebar plugin!
You can now post to your blog without having to go to your blog.
Just open the sidebar, press "New article" or "blog this" (if you like to blog about the page you're currently viewing),
enter a message in the WYSIWYG editor and publish it to the web!

You can add multiple blog accounts to the plugin, view your latest posts, edit/update your latest posts,
open and save "drafts", add categories to posts and add new posts of course.


The most important changes in the BlogEX 1.1.0 release are:
- support for Blogger
- improved "articles list" layout
- made it easier to add an account
- improved performance
- fixed a lot of bugs



NOTES

This plugin uses the MetaWeblog API and the Blogger API.

Tested with:
- Wordpress
- Blogger
- LiveJournal
- Windows Live Spaces
- Typepad
- Movable Type

But other blog services might work as well if they support the MetaWeblog or Blogger API.

版本信息

Version 1.2.0 12 April 2007

- Fixed issue with Blogger and updating posts containing images
- Fixed issue with category selection
- Fixed updating post right after publishing

Version 1.2.0 RC-1 7 March 2007

- Added "Settings" panel, making settings easier to customize
- New Multi-language support
- Added Dutch translation
- Added auto save feature
- improved "Blog about this page" feature. Text selection works better, and you can select a much longer text now
- Added plugin name, version and link to support topic on the Maxthon Forum
- User settings are stored in User Account folder in Maxthon 2.0
- Collapse/Expand state in "article list" is saved
- Added option to make all BlogEX links from the sidebar open in one tab
- you can now save a draft without selection a blog first
- small interface improvements
- Fixed prompt to save changes when no changes have been made
- draft list show last-update time
- draft list is sorted by last-update
- Other small changes

posted @ 2007-09-26 10:49 Pharaoh 阅读(198) 评论(0) 编辑

2007年7月30日

VS集成环境中的JavaScript脚本语法检查

集成在Visual Studio环境中的JavaScript脚本语法检查。
1.可以直接检验js文件,也可以检验html和aspx页面上的脚本语法。
2.集成环境中直接使用,双击定位到语法错误处。
3.支持GB2312和UTF-8格式。
配置和使用见Flash。
下载:http://pharaoh.cnblogs.googlepages.com/jslint.zip

配置中的参数如下:
"PATH\jslint_wsh.js" //Nologo "$(ItemPath)"  /ue
用自己下载的路径替换PATH。添加了引号,避免目录中有空格。


PS:此脚本也可以在UEStudio(ultraedit)集成环境下调用,配置方法见:快捷方便的对js文件进行语法检查。

posted @ 2007-07-30 14:19 Pharaoh 阅读(2676) 评论(22) 编辑

2007年3月5日

测试用Windows Live Writer

摘要: 测试用Windows Live Writer修改???阅读全文

posted @ 2007-03-05 10:40 Pharaoh 阅读(160) 评论(0) 编辑

2007年1月29日

[转]滚动条颜色生成工具。

posted @ 2007-01-29 10:59 Pharaoh 阅读(149) 评论(0) 编辑

2007年1月10日

用资源管理器打开“打开文件”对话框的目录。

摘要: 有时候我们希望用资源管理器打开"打开文件"对话框的当前目录,如果当前目录有子目录,可以在子目录上用右键的"打开"在资源管理器中打开目录,如果没有子目录,还要先回到上一级目录,再找到刚刚的目录打开,如果子目录比较多,找目录就比较麻烦,于是写了一个批处理文件用于解决此问题。打开"运行",输入"sendto",打开"sendto"文件夹。新建一个文本文件,改名为"用资源管理器打开.bat",输入下面的语...阅读全文

posted @ 2007-01-10 13:08 Pharaoh 阅读(318) 评论(0) 编辑

用Word2007发Blog的配置方法(多图)。

摘要: 昨天刚刚配置成功,博客园也有不少人都写了配置方法,还是有人问,就截几个图介绍一下配置方法。在博客园中进入配置。 在页面的底部选中允许Web Service。记录下MetaWeblog的访问地址。 新建账户,提供商选择"其他"。 API选择:MetaWeblog。输入上面的MetaWeblog的访问地址。输入用户名和密码。 确定后就可以使用Word2007发布Blog了。但是图片不能正确上传,dud...阅读全文

posted @ 2007-01-10 09:11 Pharaoh 阅读(299) 评论(0) 编辑

2007年1月9日

测试Word2007

摘要: 从word2007发布。测试图片功能阅读全文

posted @ 2007-01-09 15:03 Pharaoh 阅读(123) 评论(2) 编辑

导航

统计

公告

Cheap Domain Names
昵称:Pharaoh
园龄:6年9个月
粉丝:1
关注:0

搜索

 
 

常用链接

我的标签

随笔分类(36)

随笔档案(37)

积分与排名

最新评论

阅读排行榜

评论排行榜

推荐排行榜