尽可能说全面一些:中国与美国真实生活之比较
作者:Hilarry 提交日期:2006-10-29 9:39:00
本人1988年来美。现已入美国国籍。但仍有一颗赤诚爱国之心。神六升空,奥运国歌一样会荡起作中国人的自豪。多次回国探亲,所见所闻,网易新闻,论坛所读所闻,又叫我见国家之弊病,国人之劣性而感到痛心。今静心持笔,以真实生活对中国和美国社会生活及各方面作一比较,仁智之见,仅供各位参考。
1、总体比较
中国文化渊源流长。中国美食誉满全球。近年来中国发展之快,领世人瞩目。但总体相比,在政治,社会等诸多方面还是落后100年左右。美国一个世纪前发生的事情,好像正在中国发生。
2、社会体制
美国200多年前先人留下的宪法一直都是所有其他法律之本。而它又以自由,尊重个人为前提。政府结构强调的是权力的平衡,无论是三权鼎力,还是文官担任国防部长,都体现了这一点。我不想多谈中国社会体制,否则你也看不到这篇文章。当然,民主自由也会付出代价,比如说成人片行业就是受宪法所保护,才无法从社会中抹去。权力相鼎,有时也会推迟一些法律的通过。但是民主给予了每位公民一份平等的权力和一份责任。高至总统下至市长,法官都由百姓选举而生。入美籍后,我经历了三次总统大选,我都投下了我的一票,虽不能阻止布什进驻白宫,但我尽力了。在美,除选举外,还有好多事也是由大家投票来决定。沃尔玛超市每建一新店,当地居民都会要求开听证会或公投,因为超市有可能会降低他们的房产值。我所在城市周边的一座城市,最近市长提议更改市名,但公投后,市民以 101否决了这一提议。民主给每个人充分的权力,这方面的例子还有很多,我就不一一列举了。
3、为人民服务
我小时候学过为人民服务,中国各级政府都号称公仆为人民服务。可是在中国,连办护照这样一些基本小事情,都会让你心惊胆颤。美国所有的参议员众议员都有自己的网站、电话、电邮。办公室工作日都有人接电话,你随时都可以向他们放映问题,请求他们的帮助。大致国家大事,小致个人问题都可以和他们联络。我知道好多给家人办探亲,或者给未婚妻办签证的人都得到过他们所在选区的众议员或参议员的帮助。这些参、众议员们会给美国驻中国的大使馆写信或打电话,询问签证进度。在中国,人民警察难得为人民服务,更不说他们对普通百姓的职业态度了,在美国,大至命案火案,小至邻里相扰,你都可以打911请求帮助,警察都会在10分钟左右赶到现场。有一天深夜,我被撞击声惊醒,我发现我的邻居小孩正在往自己家的窗户上一次次的扔鞋子,可能是要唤醒他妈妈给他开门,我等了大概 10-15分钟左右,看他没有停下来的意思,只好拨了911,警察 5分钟就赶到。警察并没有过分的责备这个孩子,只是告诉他这样会骚扰邻里,然后尽全力帮助他,这时已是凌晨3点。在美国很少听到为人民服务,但经常可以听到为纳税人服务。这可能就是两国之间的差异了。
4、人与人之间
中国几千年的文明加之孔孟之道都可以令国人骄傲。孔老夫子早就教悔我们己不欲者勿施于人。但看今日之中国、看今日之国人之表现叫人看不出古国的文明,孔孟的风尚。从最基本的人与人之间的互相尊重到复杂的上下级之间的相处,都体现出一个累字。在美国从学步幼子到银发老人,说的最多的就是谢谢和对不起。从相互开门让路这样的琐事,到不同种族之间不同职业之间的相互尊重,都体现出轻松和谐。有一次我去711小买店,一个满身又脏又臭的墨西哥人不小心出门时把怀中报的东西撒落一地,恰巧一位白人女士进门,这位女士一直站在那撑着门,还不时低腰帮助捡东西。我们一家经常去餐馆吃饭,这里没有人对餐馆的服务员吆三喝四,无论是新客人或是老主顾,大家都寒喧几句,有时还开开玩笑唠唠家常。实际上在美国你无论作什么、无论去那里,大多数情况下你都可以得到作人最基本的尊重。你既要谢谢刚刚替你看过病的医生,也要谢谢帮你在办公室收垃圾的墨裔。你没有必要刻意奉承你的上司,也没有必要在他面前低三下四。公司的总裁也是和员工在同一个咖啡桶里喝咖啡,同一个饭厅里吃饭,下班后同样自己开车回家。当然他开的是奔驰,我开的是丰田。
5、社会各面
中国的社会是围绕着一个情字,而今又多了一个钱字。钱情两字让多少国人丧失了职业道德和作人的良知。我并不奢望生活在一个人人都是雷锋的社会,或者是充满三个的真空。试想我们的医生、我们的老师、我们的法官、我们的公仆踏踏实实的遵守了他们的职业道德规范,或我们每一位公民都尽一位普通公民的职责,有时甚至只是作人应有的一定的准则,当今中国会变成一个多么可爱的国家。小从随地吐痰,按时上下班,大至人命关天,都能反映出人的基本素质。
在美国经常听人说,我不能这样作,因为它违背了我的原则。这种原则出于那种约束也好,源自于宗教也罢。或多或少都是对人的一种约束。中国人觉得老美有时太傻。中国人有时灵活的叫你目瞪口呆。
在美国,我在我家庭医生诊所里也经常遇见医药代表。他们和护士打过招呼得到允许进入诊所,把新的样品药放入指定位置,如果医生有时间,会询问一下药效等,然后请医生签名,然后离开。当然医生也会收到晚餐邀请,我的医生讲,他一般不要去,不是因为吃了嘴短,而是怕自己胆固醇增高。
刚来美国的人都会感觉到美国特别干静。的确美国人口少。但即使是人多聚集场合,也不见狼藉。十月份,我和太太参加一个德裔的传统节日,和中国的食品节差不多,人山人海,但地上还是非常干净。前年我和我太太在国内一家大城市参加食品节,一个场景令我们非常吃惊,好多垃圾桶都是半空的,而地上却是一片狼藉。
同中国一样美国住房也是完全商品化。或租或买完全靠个人收入而定。国内一些地区的房价和我所在城市房价不相上下。但在美国没有任何单位包括公仆机构或教育行业会给予职员补贴或优惠房价。
在美国注册一家公司只需要100美元左右。公仆们决不会刁难你。美国也有卫生部门来检查餐馆卫生,有如此多中餐馆,还从未听说被人刁难过。
美国实行的是陪审制度,每个公民都有义务和可能被选入陪审团。法官只能帮助陪审团理解法律,无权干涉案件结果。陪审团成员都是随机挑选的。我去过一次初选,到了法庭还不知道会被选入哪个案例。200多各个来自不同族裔不同年龄不同职业的候选人等待入选。行贿受贿的可能几乎到了零。我等了一上午,但最后还是没被选中。不是因为我是中国人,只是我的号码没有被计算机选中。
也许在许多国人的眼里,西方社会道德败坏,性开放,不孝敬老人。。。可事实好像不是如此。我原来的房子卖给了一个美国人,这位女士把自己公寓卖掉,买下我的房子,就是想和她80的母亲一起住有个照应。美国人在计划结婚之前,是有些随便。但一旦结婚,就非常清楚自己的责任。家庭便摆在首位,工作也是次要。很少结了婚的人还会经常去泡吧。和欧洲一些国家相比,美国的电视也非常干净,连骂人的脏话都被删掉。美国大部分州都是禁娼,所有色情有关的场所都必须在指定的位置。要远离教会,学校。既便如此,他们还是常遭受一些周边居民的抗议。相比之下,中国道是比美国开放的多。我们回国下榻的酒店,3星到5 星,小姐进进出出好像是正常。加之洗头房,洗脚房,卡拉 ok,夜总会等诸多场所之多,堪称世界之冠。我们每次在国内用餐,特别是晚上,发现一怪现象。看到最多的是满桌满桌的男人,而很少看见举家用餐的场景。且不论谁买单,难道这些男士都是单身么,我想大多都已结婚。难道这就是中国文明之一吗。当然不是。难道他们不喜欢他们的家庭吗,我不知道。
几年前,我去外面就餐不小心,钱包掉了。丢些钱到是次要,几张信用卡,驾照都在里面。当然是很着急。但回家不久,我的信用卡公司打来电话,说一个美国人检到了我的钱包,不知如何找到我,所以通过他们找到了我。当然第二天我拿回了钱包。三年前,我和太太去三峡,回重庆之前,从宜昌承大巴去武汉。刚到酒店,我太太发现手上拎的包忘在大巴上。我们马上与客车总站联络,他们说他们找到了我太太的包。我们非常高兴,赶快打的前往。但是我们拿到包之后,却大为失望。里面新买的手机,800 元现金,不翼而飞。我们只能自认倒酶,庆幸身份证和回程的机票还在。这班车上除我们之外,还有3位其它客人。包掉的位置靠近窗边,很难被人发现。我们拿到包,不知是不是应该谢谢交还给我们的司机和售票员。但愿他们像他们说的一样的无辜伟大。
6。中美物价比
刚到美国时,常常把美元乘上8,总感觉美国东西真贵。现在来久了,发现这样思维不正确。一比一的算,才是正确。我们三口之家,一个星期买一次食品及生活用品,平均每个星期在100美元到150美元之间。这些包括蔬菜,肉类,牛奶,水果,零食,矿泉水,餐巾纸,洗发水等等。美国工薪阶层穿的衣服大都在几十元左右,鞋也是如此。基本在百元之内。遇到节日打折,有时十几块钱就可以买到像polo 这样的牌子衣服。
美国离不开车。普通家车如佳美,雅阁车一般是中产阶层年收入的五分之一到三分之一。不到两万美元
可以买一部很好的佳美或雅阁。据我说之,国内广本雅阁都要比这个贵。我们三部车每月的油费大概在150–200美元之间,每年三部车的保险大概在 1600–2000美元之间,这还是因为我小孩年龄在25岁以下,否则会更便宜。在美国去参加驾照笔试,只需5美元。去参加路考拿驾照只需十几美元。美国大部分的过路收费站都在40–75美分之间。每部车每年的养路费在50美元左右,每部车每年的车检在30美元左右。
美国人的主要开支是用在购房上。美国各地的房价也相差非常大。从东西两岸居高不下的房价到中西部地区可以接受的价格。我们所在的地区20万美元就可以买一栋装修完的将近200平米的小别墅,还附带可放两部车的车库,还外加房子周围的草坪花园。厨房还配备有微波炉、烤箱、自动洗碗机、中央冷暖空调,还有 24小时提供热水的小锅炉,有时还会有外面草坪所用的自动喷水器。
中美还有好多地方可比。看到此你大概也累了,我也写累了。以后有时间一定再为人民服务。
7。在世界上的地位
难道奥运多几个冠军,神六升天我们就变成强国了么。我们的国人就自豪的站立于世界民族之林了吗。我看未必。我之所以入美籍,主要不是我多爱美国,而主要是美国的护照比较好使。去好多国家都是免签证。中国在世上的形像,有时要比北韩要好,但有时又是相差无几。
October 31, 2006
china vs. u.s
October 30, 2006
Grub
Linux、XP 雙OS,GRUB 重裝辦法
在 PTT 上看來的。
以下內容版權歸 shujiemao@gmail.com 所有,所有文字在 GPL 2.0 下發布:
Grub安裝心得:
在googlegroup和bdwm bbs linux版的xdjm的熱心幫助下,我終於成功安裝了Grub,現將心得記錄如下,僅供大家參考:
1、一個很好的grub安裝指導網頁:
http://www.uplinux.com/www/sys/01/432.shtml
2、下載一個grub for dos:
http://www.linuxeden.com/download/softdetail.php?softid=1026 或者在google上隨便搜一個,比較多的。我下載的是wingrub,它包括了 grub for dos 最新版以及一個非常好的圖形界面,在windows環境下可以安裝。然後就開始安裝了
,在windows下面,因此點擊setup後,一路next就裝好了。
3、裝好後運行:
出現一個圖形界面,然後在一個菜單中選擇install grub,又出現一個界面,然後選擇boot.ini選項,而盤符默認就是C:,然後點擊intall。安裝完,再到C盤下你會發現一個文件夾:Mygrub,裡面有一個文件。
4、重啟系統
5、開機時出現兩個可選的東西:Windows XP、mygrub
6、我進入mygrub,發現有三個操作系統: Debian 3.1、Debian 3.1 recovery、Windows XP。
7、選擇 Debian 3.1,但是不按「enter」鍵,而是按「c」,進入grub模式。
8、修改grub:
出現了
>grub
這時,你就可以寫grub 命令了。於是我寫:
grub>root (hdX,Y)
(因為我的Linux裝在hda3里了,所以我寫的是grub>root (hd0,2))
grub>setup (hd0)
如果成功會有一個successful……..
這裡的X,如果是一個盤,就是0,如果你所安裝的linux的根分區在第二個硬盤上,那X就是1了;Y,就是裝有linux系統所在的根分區。 setup (hd0)就是把GRUB寫到硬盤的MBR上。因為我裝Linux時已經安裝過grub,所以它可以在硬盤的分區上自動找尋關於grub的配置文件,找到 linux的內核並且寫到內存裡,以便啟動。然後還可以把引導權交給NT loader(NT的引導管理器),以便引導windows XP。
9、重新啟動系統,就直接出現三個可選擇的東西。
Debian 3.1……
Debian 3.1 recovery ……
Windows XP
10、隨便選擇一個,呵呵,就可以正常啟動了。
以上是我的安裝過程,其實還有很多方法,現列一個如下:
下載grub for dos,然後解壓縮,把其中的grldr 和 grub.exe 拷貝到C:下。
編輯C:boot.ini(在路徑輸入C:boot.ini就可以了,那個文件既是系統文件,又是隻讀隱藏。 也可以這樣編輯 boot.ini:開始 –> 運行–> 輸入msconfig –> 選擇boot.ini。)
在最後加一行 C:grldr=”grub”,重新啟動電腦就可以看到選擇單。
October 24, 2006
Firefox popup window can not be resized, annoying issue
> I experience many websites where clicking on a link brings a small
> pop-up window which cannot be resized as the ‘maximise’ icon does
> not work. This is very frustrating as the text/images in the
> window are unable to be read/viewed fully as not all of it is
> visible. I am using XP Home SP2 with Firefox Version 1.5.0.6
> Any ideas to a solution to this problem would be appreciated.
Enter “about:config” in the location bar, then enter
“dom.disable_window_open_feature.resizable” in the filter box which
appears. Double-click the “false” to chang it to “true”. After that,
all popups should be resizable.
You may want to set some of the other dom.disable_window_open_feature.*
prefs to true also, to give websites less ability to control what you
can do or see in the popup windows. I set all of mine to true and
haven’t had any cause to regret it.
October 23, 2006
trayicon interactive of AutoHotKey
1) search through icon
Sleep, 100
hw_notification := FindWindow( “Shell_TrayWnd|TrayNotifyWnd|SysPager|ToolbarWindow32,Notification Area” )
WinGetPos, s_x, s_y, s_w, s_h, ahk_id %hw_notification%
CoordMode, Pixel, Screen
ImageSearch, t_x, t_y, s_x, s_y, s_x+s_w-1, s_y+s_h-1, *Icon1 %A_ProgramFiles%\autohotkey\autohotkey.exe
if ( ErrorLevel = 0 )
{
CoordMode, Mouse, Screen
MouseClick, Right, t_x, t_y, 1
}
return
FindWindow( p_tree )
{
level_total = 0
loop, parse, p_tree, |
{
level_total++
ix := InStr( a_LoopField, “,” )
if ( ix )
{
StringMid, tree[%level_total%]?class, a_LoopField, 1, ix-1
StringMid, tree[%level_total%]?title, a_LoopField, ix+1, StrLen( a_LoopField )-ix
}
else
{
tree[%level_total%]?class := a_LoopField
tree[%level_total%]?title = 0
}
}
hw_parent = 0
hw_child = 0
level = 1
loop,
{
hw_child := FindWindowEx( hw_parent, hw_child, tree[%level%]?class, tree[%level%]?title )
if ( hw_child )
{
if ( level = level_total )
return, hw_child
level++
hw_parent_old := hw_parent
hw_parent := hw_child
hw_child_old := hw_child
hw_child = 0
}
else
{
if ( level = 1 )
return, 0
level–
hw_parent := hw_parent_old
hw_child := hw_child_old
}
}
}
FindWindowEx( p_hw_parent, p_hw_child, p_class, p_title=0 )
{
if ( p_title = 0 )
type_title = uint
else
type_title = str
return, DllCall( “FindWindowEx”
, “uint”, p_hw_parent
, “uint”, p_hw_child
, “str”, p_class
, type_title, p_title )
}
2) walk through ICONS in tray
WM_USER = 0×400
hw_notification_area := FindWindow( “Shell_TrayWnd|TrayNotifyWnd|SysPager|ToolbarWindow32,Notification Area” )
MsgBox, hw_notification_area = %hw_notification_area%
VarSetCapacity( pid_explorer, 4 )
WinGet, pid_explorer, PID, ahk_id %hw_notification_area%
MsgBox, pid_explorer: %pid_explorer%
hp_explorer := DllCall( “OpenProcess”, “uint”, 0×8|0×10, “int”, true, “uint”, pid_explorer )
MsgBox, openprocess: %ErrorLevel% – %hp_explorer%
remote_buffer := DllCall( “VirtualAllocEx”
, “uint”, hp_explorer
, “uint”, 0
, “uint”, 0×1000
, “uint”, 0×1000
, “uint”, 0×4 )
MsgBox, virtualallocex: %ErrorLevel% – %remote_buffer%
TB_BUTTONCOUNT := WM_USER+24
SendMessage, TB_BUTTONCOUNT, 0, 0,, ahk_id %hw_notification_area%
MsgBox, button count = %ErrorLevel%
TB_GETBUTTON := WM_USER+23
SendMessage, TB_GETBUTTON, 0, remote_buffer,, ahk_id %hw_notification_area%
MsgBox, TB_GETBUTTON: %ErrorLevel%
remote_buffer2 := remote_buffer+200
TB_GETITEMRECT := WM_USER+29
SendMessage, TB_GETITEMRECT, index, remote_buffer2,, ahk_id %hw_notification_area%
MsgBox, TB_GETITEMRECT: %ErrorLevel%
VarSetCapacity( buffer, 1000, 0 )
VarSetCapacity( buffer_actual_size, 4, 0 )
pBuffer2 := &buffer+200
result := DllCall( “ReadProcessMemory”
, “uint”, hp_explorer
, “uint”, remote_buffer
, “uint”, &buffer
, “uint”, 1000
, “uint”, &buffer_actual_size )
buffer_actual_size := ReadInteger( “uint”, &buffer_actual_size, 0 )
MsgBox, readprocessmemory: %ErrorLevel% – %result% ~ %buffer_actual_size%
; — data —
VarSetCapacity( buffer2, 1000, 0 )
VarSetCapacity( buffer_actual_size, 4, 0 )
result := DllCall( “ReadProcessMemory”
, “uint”, hp_explorer
, “uint”, ReadInteger( “int”, &buffer, 12 )
, “uint”, &buffer2
, “uint”, 1000
, “uint”, &buffer_actual_size )
buffer_actual_size := ReadInteger( “uint”, &buffer_actual_size, 0 )
MsgBox, readprocessmemory: %ErrorLevel% – %result% ~ %buffer_actual_size%
; — string —
VarSetCapacity( buffer3, 1000, 0 )
VarSetCapacity( buffer_actual_size, 4, 0 )
result := DllCall( “ReadProcessMemory”
, “uint”, hp_explorer
, “uint”, ReadInteger( “int”, &buffer, 16 )
, “uint”, &buffer3
, “uint”, 1000
, “uint”, &buffer_actual_size )
buffer_actual_size := ReadInteger( “uint”, &buffer_actual_size, 0 )
MsgBox, readprocessmemory: %ErrorLevel% – %result% ~ %buffer_actual_size%
MsgBox, %
( Join
“– [" A_Index-1 "] button information –”
“`n`ncommand = ” ReadInteger( “int”, &buffer, 4 )
“`nstate = ” ReadInteger( “uchar”, &buffer, 8 )
“`ndata = ” ReadInteger( “uint”, &buffer, 12 )
“`nstring = ” ReadInteger( “int”, &buffer, 16 )
“`n`nrect = ” ReadInteger( “int”, pBuffer2, 0, false )
”, ” ReadInteger( “int”, pBuffer2, 4, false )
”, ” ReadInteger( “int”, pBuffer2, 8, false )
”, ” ReadInteger( “int”, pBuffer2, 12, false )
“`n`ndata = ” ReadInteger( “uint”, &buffer2, 0 )
“`nstring = ” ReadStringA( &buffer3, 0, 1000 )
)
ExitApp
TwosComplement( p_value, p_size )
{
return, ( p_value^( 2**( p_size*8 )-1 ) )+1
}
ReadInteger( p_type, p_address, p_offset, p_hex=true )
{
old_FormatInteger := a_FormatInteger
if ( p_hex )
SetFormat, integer, hex
else
SetFormat, integer, dec
if ( p_type = “int” )
{
sign := true
size = 4
}
else if ( p_type = “uint” )
{
sign := false
size = 4
}
else if ( p_type = “short” )
{
sign := true
size = 2
}
else if ( p_type = “ushort” )
{
sign := false
size = 2
}
else if ( p_type = “char” )
{
sign := true
size = 1
}
else if ( p_type = “uchar” )
{
sign := false
size = 1
}
else
MsgBox, [ReadInteger] error: the type %p_type% is undefined!
value = 0
loop, %size%
value := value+( *( ( p_address+p_offset )+( a_Index-1 ) ) << ( 8*( a_Index-1 ) ) )
if ( sign )
{
sign := ( *( p_address+p_offset+( size-1 ) ) ) >> 7
if ( sign )
value := -1*TwosComplement( value, size )
}
SetFormat, integer, %old_FormatInteger%
return, value
}
ReadStringA( p_address, p_offset, p_size )
{
text=
address := p_address+p_offset-2
loop, %p_size%
{
address += 2
if ( *( address ) = 0 )
break
text := text Chr( *( address ) )
}
return, text
}
FindWindow( p_tree )
{
level_total = 0
loop, parse, p_tree, |
{
level_total++
ix := InStr( a_LoopField, “,” )
if ( ix )
{
StringMid, tree[%level_total%]?class, a_LoopField, 1, ix-1
StringMid, tree[%level_total%]?title, a_LoopField, ix+1, StrLen( a_LoopField )-ix
}
else
{
tree[%level_total%]?class := a_LoopField
tree[%level_total%]?title = 0
}
}
hw_parent = 0
hw_child = 0
level = 1
loop,
{
hw_child := FindWindowEx( hw_parent, hw_child, tree[%level%]?class, tree[%level%]?title )
if ( hw_child )
{
if ( level = level_total )
return, hw_child
level++
hw_parent_old := hw_parent
hw_parent := hw_child
hw_child_old := hw_child
hw_child = 0
}
else
{
if ( level = 1 )
return, 0
level–
hw_parent := hw_parent_old
hw_child := hw_child_old
}
}
}
FindWindowEx( p_hw_parent, p_hw_child, p_class, p_title=0 )
{
if ( p_title = 0 )
type_title = uint
else
type_title = str
return, DllCall( “FindWindowEx”
, “uint”, p_hw_parent
, “uint”, p_hw_child
, “str”, p_class
, type_title, p_title )
}
; output is kind like
;– [-1] button information —
;command = 0xc
;state = 0×4
;data = 0×16ec80
;string = 0×120528
;rect = 0, 0, 18, 18
;data = 0×4053c
;string = ActivateTrayIcon2.ahk
3) communicate with a trayICON from pid
;Assign the PID of interest to “pid_target” and run the script.
#NoTrayIcon
DetectHiddenWindows, On
OnExit, HandleExit
pid_target = 2532
hw_notification_area := FindWindow( “Shell_TrayWnd|TrayNotifyWnd|SysPager|ToolbarWindow32,Notification Area” )
if ( ErrorLevel or ! hw_notification_area )
{
MsgBox, [error] FindWindow failed: ToolbarWindow32,Notification Area
ExitApp
}
WinGet, pid_explorer, PID, ahk_id %hw_notification_area%
if ( ErrorLevel or ! pid_explorer )
{
MsgBox, [error] WinGet~PID failed: explorer
ExitApp
}
hp_explorer := DllCall( “OpenProcess”
, “uint”, 0×18 ; PROCESS_VM_OPERATION|PROCESS_VM_READ
, “int”, false
, “uint”, pid_explorer )
if ( ErrorLevel or ! hp_explorer )
{
MsgBox, [error] OpenProcess failed: explorer
ExitApp
}
remote_buffer_size = 0×1000
remote_buffer := DllCall( “VirtualAllocEx”
, “uint”, hp_explorer
, “uint”, 0
, “uint”, remote_buffer_size
, “uint”, 0×1000 ; MEM_COMMIT
, “uint”, 0×4 ) ; PAGE_READWRITE
if ( ErrorLevel or ! remote_buffer )
{
MsgBox, [error] VirtualAllocEx failed: explorer ~ remote_buffer
ExitApp
}
; TB_BUTTONCOUNT
SendMessage, 0×418, 0, 0,, ahk_id %hw_notification_area%
button_count := ErrorLevel
buffer_size = 40
VarSetCapacity( buffer, buffer_size )
loop, %button_count%
{
; TB_GETBUTTON
SendMessage, 0×417, A_Index-1, remote_buffer,, ahk_id %hw_notification_area%
if ( ! ErrorLevel )
{
MsgBox, [error] SendMessage~TB_GETBUTTON failed: hw_notification_area
ExitApp
}
result := DllCall( “ReadProcessMemory”
, “uint”, hp_explorer
, “uint”, remote_buffer
, “uint”, &buffer
, “uint”, buffer_size
, “uint”, 0 )
if ( ErrorLevel or ! result )
{
MsgBox, [error] ReadProcessMemory failed: explorer ~ remote_buffer (TB_GETBUTTON)
ExitApp
}
data_address := *( &buffer+12 )+( ( *( &buffer+13 ) ) << 8 )+( ( *( &buffer+14 ) ) << 16 )+( ( *( &buffer+15 ) ) << 24 )
result := DllCall( “ReadProcessMemory”
, “uint”, hp_explorer
, “uint”, data_address
, “uint”, &buffer
, “uint”, buffer_size
, “uint”, 0 )
if ( ErrorLevel or ! result )
{
MsgBox, [error] ReadProcessMemory failed: explorer ~ data_address
ExitApp
}
wid := *( &buffer )+( ( *( &buffer+1 ) ) << 8 )+( ( *( &buffer+2 ) ) << 16 )+( ( *( &buffer+3 ) ) << 24 )
WinGet, pid, PID, ahk_id %wid%
if ( pid = pid_target )
{
; TB_GETITEMRECT
SendMessage, 0×41D, A_Index-1, remote_buffer,, ahk_id %hw_notification_area%
if ( ! ErrorLevel )
{
MsgBox, [error] SendMessage~TB_GETITEMRECT failed: hw_notification_area
ExitApp
}
result := DllCall( “ReadProcessMemory”
, “uint”, hp_explorer
, “uint”, remote_buffer
, “uint”, &buffer
, “uint”, buffer_size
, “uint”, 0 )
if ( ErrorLevel or ! result )
{
MsgBox, [error] ReadProcessMemory failed: explorer ~ remote_buffer (TB_GETITEMRECT)
ExitApp
}
WinGetPos, x, y,,, ahk_id %hw_notification_area%
x := x+*( &buffer )+( ( *( &buffer+1 ) ) << 8 )+( ( *( &buffer+2 ) ) << 16 )+( ( *( &buffer+3 ) ) << 24 )+8
y := y+*( &buffer+4 )+( ( *( &buffer+5 ) ) << 8 )+( ( *( &buffer+6 ) ) << 16 )+( ( *( &buffer+7 ) ) << 24 )+8
CoordMode, Mouse, Screen
MouseClick, Right, x, y, 1, 0
break
}
}
return
HandleExit:
result := DllCall( “VirtualFreeEx”
, “uint”, hp_explorer
, “uint”, remote_buffer
, “uint”, 0
, “uint”, 0×8000 ) ; MEM_RELEASE
if ( ErrorLevel or ! result )
MsgBox, [warning] VirtualFreeEx failed: explorer ~ remote_buffer
result := DllCall( “CloseHandle”, “uint”, hp_explorer )
if ( ErrorLevel or ! result )
MsgBox, [warning] CloseHandle failed: explorer
ExitApp
FindWindow( p_tree )
{
level_total = 0
loop, parse, p_tree, |
{
level_total++
ix := InStr( a_LoopField, “,” )
if ( ix )
{
StringMid, tree[%level_total%]?class, a_LoopField, 1, ix-1
StringMid, tree[%level_total%]?title, a_LoopField, ix+1, StrLen( a_LoopField )-ix
}
else
{
tree[%level_total%]?class := a_LoopField
tree[%level_total%]?title = 0
}
}
hw_parent = 0
hw_child = 0
level = 1
loop,
{
hw_child := FindWindowEx( hw_parent, hw_child, tree[%level%]?class, tree[%level%]?title )
if ( hw_child )
{
if ( level = level_total )
return, hw_child
level++
hw_parent_old := hw_parent
hw_parent := hw_child
hw_child_old := hw_child
hw_child = 0
}
else
{
if ( level = 1 )
return, 0
level–
hw_parent := hw_parent_old
hw_child := hw_child_old
}
}
}
FindWindowEx( p_hw_parent, p_hw_child, p_class, p_title=0 )
{
if ( p_title = 0 )
type_title = uint
else
type_title = str
return, DllCall( “FindWindowEx”
, “uint”, p_hw_parent
, “uint”, p_hw_child
, “str”, p_class
, type_title, p_title )
}
4) mouseover a trayicon
#persistent
Menu, Tray, Icon, pifmgr.dll, 2 ; set the icon for this script
; the icon to look for (in this case the one of this script)
iconstr = 2 pifmgr.dll ; the number of the icon [space] filename containing the icon
; get the icon sizes (system small) in order to determine the size of the area for the mouseover event
sysget, sm_cxsmicon, 49
sysget, sm_cysmicon, 50
; MsgBox, %sm_cxsmicon% %sm_cysmicon%
SetTimer, mouseovericon, 500 ; check every half second if the mouse is over the icon
mouseovericon:
mouseovericon := iconfind(iconstr,sm_cxsmicon,sm_cysmicon)
if mouseovericon = 0
MsgBox Now! ; display now! when the mouse is over the icon
return
iconfind(iconstr,sm_cxsmicon,sm_cysmicon)
; checks to see if the mouse is over the given tray icon
; returns:
; 0 if mouse is over the icon,
; 1 if image not found
; 2 if imagesearch produced an error or
; 3 if icon was found but mouse was not over the image
{
coordmode, pixel, screen ; set the coords for imagesearch to absolute
coordmode, mouse, screen ; set mouse coords to absolute
; retrieve the tray position and size in order to limit (speedup) the imagesearch
WinGetPos, trayX, trayY, trayWidth, trayHeight, ahk_class Shell_TrayWnd
MouseGetPos, mouseX, mouseY ; get the mouse position
; see if the icon exists in the traywindow
ImageSearch, imageX, imageY, trayX, trayY, trayX+trayWidth, trayY+trayHeight, *Icon%iconstr%
coordmode, pixel, relative ; reset the coords for imagesearch to default
coordmode, mouse, relative ; reset mouse coords to default
if ErrorLevel > 0 ; image not found or an image search error occurred
return %errorlevel%
imageXlarge := imageX+sm_cxsmicon ; the outerlimit for X
imageYlarge := ImageY+sm_cysmicon ; the outerlimit for Y
if mouseX between %imageX% and %imageXlarge%
if mouseY between %imageY% and %imageYlarge%
return 0 ; if the mouse is over the designated icon
return 3 ; 3 means mouse not over the icon
}
5) activate an application and simulate close action
SetKeyDelay,10
WinShow,ahk_class ZAFrameWnd
WinActivate,ahk_class ZAFrameWnd
WinWaitActive,ahk_class ZAFrameWnd,,0
if errorlevel != 1
{
Send, !{Space}
Send SS
Send {Enter 2}
}
basic tutaorial on AutoHotKey
0) hotkeys
!: Sends an ALT keystroke. For example, Send This is text!a would send the keys “This is text” and then press ALT+a. Note: !A produces a different effect in some programs than !a. This is because !A presses ALT+SHIFT+A and !a presses ALT+a. If in doubt, use lowercase.
+: Sends a SHIFT keystroke. For example, Send +abC would send the text “AbC”, and Send !+a would press ALT+SHIFT+a.
^: Sends a CONTROL keystroke. For example, Send ^!a would press CTRL+ALT+a, and Send ^{Home} would send CONTROL+HOME. Note: ^A produces a different effect in some programs than ^a. This is because ^A presses CONTROL+SHIFT+A and ^a presses CONTROL+a. If in doubt, use lowercase.
#: Sends a WIN keystroke, therefore Send #e would hold down the Windows key and then press the letter “e”.
1) use IfWinActive and if else
;use the F1 & F2 keys to switch tabs
F1::
IfWinActive, ahk_class TFormEditPadLite
{
PostMessage, 0×111, 83,,, ahk_class TFormEditPadLite ; prev tab
return
}
else
Send, {F1}
return
$F2::
IfWinActive, ahk_class TFormEditPadLite
{
PostMessage, 0×111, 82,,, ahk_class TFormEditPadLite ; next tab
return
}
else
Send, {F2}
return
2) loop
Loop %RunCount% { Run C:\Check Server Status.exe Sleep 60000 ; Wait 60 seconds. }In the above, the loop is performed the specified number of times unless RunCount contains 0, in which case the loop is skipped entirely.
A loop may also terminate itself when one or more conditions change. The following example clicks the left mouse button repeatedly while the user is holding down the F1 key:
$F1:: ; Make the F1 key into a hotkey (the $ symbol facilitates the "P" mode of GetKeyState below). Loop ; Since no number is specified with it, this is an infinite loop unless "break" or "return" is encountered inside. { if not GetKeyState("F1", "P") ; If this statement is true, the user has physically released the F1 key. break ; Break out of the loop. ; Otherwise (since the above didn't "break"), keep clicking the mouse. Click ; Click the left mouse button at the cursor's current position. } return
3) variable
MyVar1 = 123 MyVar2 = my stringTo compare the contents of a variable to a number or string, follow these examples:
if MyVar2 = my string { MsgBox MyVar2 contains the string "my string". } if MyVar1 >= 100 { MsgBox MyVar1 contains %MyVar1%, which is a number greater than or equal to 100. }if ErrorLevel <> FAIL{}if (ItemCount > ItemLimit) { MsgBox The value in ItemCount, which is %ItemCount%, is greater than %ItemLimit%. }Notice that the first line of the example above contains parentheses. The parentheses signify that the if-statement contains an expression.
NetPrice := Price * (1 - Discount/100)
4) logic
if (ColorName <> “” AND not FindColor(ColorName))
MsgBox %ColorName% could not be found.
5) share functions
Using #Include to Share Functions Among Multiple Scripts
The #Include directive may be used (even at the top of a script) to load functions from an external file.
Explanation: When the script’s flow of execution encounters a function definition, it jumps over it (using an instantaneous method) and resumes execution at the line after its closing brace. Consequently, execution can never fall into a function from above, nor does the presence of one or more functions at the very top of a script affect the auto-execute section.
6) use pid
*) from process name to pid
Process, Exist, asshole.exe
AssholePID=%Errorlevel%
if AssholePID{
msgbox, Gotcha Asshole! (%AssholePID%); To use a pid…
; IfWinActive, ahk_pid %AssholePID%
; or WinGet, AssholeHWND, id, ahk_pid %AssholePID% ; use pid to get window id . a.k.a hwnd
; note, window id is a different cencept
;WinGet, notepad1, ID, Untitled – Notepad ;the notepad1 is windows id, we can then use it to minimize or close
; WinMinimize, ahk_id %notepad1%
}else
msgbox, F**k!@#!@#!@
*) from window id to pid
WinGet, pid_explorer, PID, ahk_id %hw_notification_area%
*) enumerate processes
Gui, Add, ListView, x5 y5 w400 h200, PID|file name
Gui, Show, x50 y50, EnumProcesses experiment
total := EnumProcesses( pid_list )
loop, parse, pid_list, |
LV_Add( “”, A_LoopField, GetModuleFileNameEx( A_LoopField ) )
LV_ModifyCol( 1, “Integer Sort AutoHdr” )
LV_ModifyCol( 2, “AutoHdr” )
returnGuiClose:
ExitAppEnumProcesses( byref r_pid_list )
{
if A_OSVersion in WIN_95,WIN_98,WIN_ME
{
MsgBox, This Windows version (%A_OSVersion%) is not supported.
return, false
}
pid_list_size := 4*1000
VarSetCapacity( pid_list, pid_list_size )
status := DllCall( “psapi.dll\EnumProcesses”, “uint”, &pid_list, “uint”, pid_list_size, “uint*”, pid_list_actual )
if ( ErrorLevel or !status )
return, false
total := pid_list_actual//4
r_pid_list=
address := &pid_list
loop, %total%
{
r_pid_list := r_pid_list “|” ( *( address )+( *( address+1 ) << 8 )+( *( address+2 ) << 16 )+( *( address+3 ) << 24 ) )
address += 4
}
StringTrimLeft, r_pid_list, r_pid_list, 1
return, total
}GetModuleFileNameEx( p_pid )
{
if A_OSVersion in WIN_95,WIN_98,WIN_ME
{
MsgBox, This Windows version (%A_OSVersion%) is not supported.
return
}
h_process := DllCall( “OpenProcess”, “uint”, 0×10|0×400, “int”, false, “uint”, p_pid )
if ( ErrorLevel or h_process = 0 )
return
name_size = 255
VarSetCapacity( name, name_size )
result := DllCall( “psapi.dll\GetModuleFileNameExA”, “uint”, h_process, “uint”, 0, “str”, name, “uint”, name_size )
DllCall( “CloseHandle”, h_process )
return, name
}
or through pslist
; Get list of running processes with PSList http://www.sysinternals.com/Utilities/PsList.html
RunWait %comspec% /c pslist -t >list.txt, , Hide
Loop, Read, list.txt
{
if A_LoopReadLine not contains Russinovich,Sysinternals,Process,Name,Idle
Loop, parse, A_LoopReadLine, %A_Space%
{
if A_LoopField !=
count++
if count = 2 ; pid column
{
name := getmodulefilenameex(A_LoopField) ; MsgBox, %A_LoopField%
; use splitpath to obtain drive letter of each app:
SplitPath, name, , , , , Drive
if Drive = %mydrive%
WinClose, ahk_pid %pid%
count=
break
}
}
}
return
combined effect
; code by Serenity, shimanov
; pieced together and modified by corrupt
if A_OSVersion in WIN_95,WIN_98,WIN_ME
{
MsgBox, 16, Error, This Windows version (%A_OSVersion%) is not supported.
ExitApp
}
Gui, Add, Button, x22 y80 w75 h23 gCloseApps, OK
Gui, Add, Button, x103 y80 w75 h23 gGuiClose, Cancel
Gui, Add, Text, x14 y10 w180 h15 , Please choose your device from the list:
Gui, Add, DropDownList, x16 y40 w170 h120 Choose1 vList1,
SplashTextOn, 200, 60,, Please wait.`n Generating a list of drives on your system…
driveget, list, list ; all drives
stringlen, len, list
loop, %len%
{
stringleft, drive, list, 1
If drive <> A
driveget, label, label, %drive%:
GuiControl,,List1, %drive%: %label%
stringtrimleft, list, list, 1
}
GuiControl,Choose, List1, 1
Gui, Show, h116 w200, Close Programs
SplashTextOff
Return
CloseApps:
GuiControlGet, List1
Gui, Hide
DetectHiddenWindows, On
stringleft, mydrive, List1, 2
total := EnumProcesses( pid_list )
; get PID for this script to avoid self destruction
Process, Exist
this_pid = %ErrorLevel%
loop, parse, pid_list, |
{
lname := GetModuleFileNameEx( A_LoopField )
If lname<>
{
; use splitpath to obtain drive letter of each app:
SplitPath, lname, , , , , Drive
; close the program if drive matches:
if ( Drive = mydrive AND A_LoopField <> this_pid )
{
WinKill, ahk_pid %A_LoopField%
Process, Exist, %A_LoopField%
If (ErrorLevel)
{
Process, Close, %A_LoopField%
If ErrorLevel = 0
{
RetError := KillProcess( A_LoopField )
If RetError = 0
MsgBox, %lname% is not responding. `nPlease manually close this application
}
}
}
}
}
MsgBox, 64, Done, Finished processing drive %mydrive%
GuiClose:
ExitApp
EnumProcesses( byref r_pid_list )
{
pid_list_size := 4*1000
VarSetCapacity( pid_list, pid_list_size )
status := DllCall( “psapi.dll\EnumProcesses”, “uint”, &pid_list, “uint”, pid_list_size, “uint*”, pid_list_actual )
if ( ErrorLevel or !status )
return, false
total := pid_list_actual//4
r_pid_list=
address := &pid_list
loop, %total%
{
r_pid_list := r_pid_list “|” ( *( address )+( *( address+1 ) << 8 )+( *( address+2 ) << 16 )+( *( address+3 ) << 24 ) )
address += 4
}
StringTrimLeft, r_pid_list, r_pid_list, 1
return, total
}
GetModuleFileNameEx( p_pid )
{
h_process := DllCall( “OpenProcess”, “uint”, 0×10|0×400, “int”, false, “uint”, p_pid )
if ( ErrorLevel or h_process = 0 )
return
name_size = 255
VarSetCapacity( name, name_size )
result := DllCall( “psapi.dll\GetModuleFileNameExA”, “uint”, h_process, “uint”, 0, “str”, name, “uint”, name_size )
DllCall( “CloseHandle”, h_process )
return, name
}
KillProcess( p_pid )
{
h_process := DllCall( “OpenProcess”, “uint”, 0xF0000|0×100000|0xFFF, “int”, false, “uint”, p_pid )
if ( ErrorLevel or h_process = 0 )
return
result := DllCall( “TerminateProcess”, “uint”, h_process, “uint”, 0)
DllCall( “CloseHandle”, h_process )
return, result
}
- use output from a command
Testing shows that due to file caching, a temporary file can be very fast for relatively small outputs. In fact, if the file is deleted immediately after use, it often does not actually get written to disk. For example:
RunWait %comspec% /c dir > C:\My Temp File.txt FileRead, VarToContainContents, C:\My Temp File.txt FileDelete, C:\My Temp File.txt
*) get pid from Run
Run, notepad,,, PID
*) getpid from active window or title
WinGet, active_pid, PID, AWinGet, active_pid, PID, Untitled-Notepad;get pid of AutoHotKey scriptDetectHiddenWindows on
WinGet, scriptPID, PID, %A_ScriptFullPath% – AutoHotkey v
MsgBox, PID=%scriptPID%*)Get windows id from mouse position
CoordMode, Mouse, Relative
SysGet, TitleBarHeight, 4 ; 4 is SM_CYCAPTIONMButton::
MouseGetPos,, ClickY, WindowIDClicked
If, ClickY <= %TitleBarHeight%
{
WinGet, WindowPIDClicked, PID, ahk_id %WindowIDClicked%
WinClose, ahk_pid %WindowPIDClicked%
}
Return
Return
7) loop through windows
WinGet, id, list
Loop, %id%
{
loop_id:=id%a_index%
WinGetClass, loop_class, ahk_id %loop_id%
;IfNotInString, loop_class, Afx:400000:8:10011:0: ; for you (uncomment)
IfNotInString, loop_class, Note ; I tested on notepad
continue
Else
{
assid:=loop_id
assclass:=loop_class
WinGet, asspid, pid, ahk_id %assid%
WinGetTitle, asstitle, ahk_id %assid%
msgbox, 64, ,
(LTrim
Gotcha Asshole!
PID: %asspid%
ID: %assid%
Title: %asstitle%
Class: %assclass%
)
exit
}
}
msgbox, 16, , Couldn’t find asshole!
refresh desktop icons
WinGet, hw_program_manager, ID, Program Manager ahk_class Progman
;MsgBox, % hw_program_manager
hw_SHELLDLL_DefView := FindWindowEx( hw_program_manager, 0, “SHELLDLL_DefView”, 0 )
;MsgBox, % hw_SHELLDLL_DefView
hw_FolderView := FindWindowEx( hw_SHELLDLL_DefView, 0, “SysListView32″, “FolderView” )
;MsgBox, % hw_FolderView
MsgBox, Now you see them …
WinHide, ahk_id %hw_FolderView%
MsgBox, .. now you dont!
WinShow, ahk_id %hw_FolderView%
return
FindWindowEx( p_hw_parent, p_hw_child, p_class, p_title )
{
if ( p_title = 0 )
type_title = uint
else
type_title = str
return, DllCall( “FindWindowEx”
, “uint”, p_hw_parent
, “uint”, p_hw_child
, “str”, p_class
, type_title, p_title )
}
9) customized menu
#SingleInstance ignore
#Persistent
SetKeyDelay, -1
MsgBox, 4096, AbrExpansion, AbrExpansion is now loaded. You can exit this program by pressing Shift+E or by right clicking`non it’s system tray icon. Press “Ok” to exit this dialogue, and enable Abbreviation Expansion.
Menu, tray, NoStandard
menu, tray, add
menu, tray, add, Exit
menu, tray, add
Return
Exit:
Send, {Shift Down}e{Shift Up}
Return
+e::
Msgbox, 4096, AbrExpansion, Thank you for using AbrExpansion.`nThe program will now exit., 6
ExitApp
Return
windows msg code ref for AutoHotKey
0x0000 WM_NULL
0x0001 WM_CREATE
0x0002 WM_DESTROY
0x0003 WM_MOVE
0x0005 WM_SIZE
0x0006 WM_ACTIVATE
0x0007 WM_SETFOCUS
0x0008 WM_KILLFOCUS
0x000A WM_ENABLE
0x000B WM_SETREDRAW
0x000C WM_SETTEXT
0x000D WM_GETTEXT
0x000E WM_GETTEXTLENGTH
0x000F WM_PAINT
0x0010 WM_CLOSE
0x0011 WM_QUERYENDSESSION
0x0012 WM_QUIT
0x0013 WM_QUERYOPEN
0x0014 WM_ERASEBKGND
0x0015 WM_SYSCOLORCHANGE
0x0016 WM_ENDSESSION
0x0017 WM_SYSTEMERROR
0x0018 WM_SHOWWINDOW
0x0019 WM_CTLCOLOR
0x001A WM_WININICHANGE
0x001A WM_SETTINGCHANGE
0x001B WM_DEVMODECHANGE
0x001C WM_ACTIVATEAPP
0x001D WM_FONTCHANGE
0x001E WM_TIMECHANGE
0x001F WM_CANCELMODE
0x0020 WM_SETCURSOR
0x0021 WM_MOUSEACTIVATE
0x0022 WM_CHILDACTIVATE
0x0023 WM_QUEUESYNC
0x0024 WM_GETMINMAXINFO
0x0026 WM_PAINTICON
0x0027 WM_ICONERASEBKGND
0x0028 WM_NEXTDLGCTL
0x002A WM_SPOOLERSTATUS
0x002B WM_DRAWITEM
0x002C WM_MEASUREITEM
0x002D WM_DELETEITEM
0x002E WM_VKEYTOITEM
0x002F WM_CHARTOITEM
0x0030 WM_SETFONT
0x0031 WM_GETFONT
0x0032 WM_SETHOTKEY
0x0033 WM_GETHOTKEY
0x0037 WM_QUERYDRAGICON
0x0039 WM_COMPAREITEM
0x0041 WM_COMPACTING
0x0041 WM_COMPACTING
0x0044{obsoleteinWin32} WM_COMMNOTIFY
0x0044{obsoleteinWin32} WM_COMMNOTIFY
0x0046 WM_WINDOWPOSCHANGING
0x0047 WM_WINDOWPOSCHANGED
0x0048 WM_POWER
0x0048 WM_POWER
0x004A WM_COPYDATA
0x004B WM_CANCELJOURNAL
0x004E WM_NOTIFY
0x0050 WM_INPUTLANGCHANGEREQUEST
0x0051 WM_INPUTLANGCHANGE
0x0052 WM_TCARD
0x0053 WM_HELP
0x0054 WM_USERCHANGED
0x0055 WM_NOTIFYFORMAT
0x0055 WM_NOTIFYFORMAT
0x007B WM_CONTEXTMENU
0x007C WM_STYLECHANGING
0x007D WM_STYLECHANGED
0x007E WM_DISPLAYCHANGE
0x007F WM_GETICON
0x0080 WM_SETICON
0x0080 WM_SETICON
0x0081 WM_NCCREATE
0x0082 WM_NCDESTROY
0x0083 WM_NCCALCSIZE
0x0084 WM_NCHITTEST
0x0085 WM_NCPAINT
0x0086 WM_NCACTIVATE
0x0087 WM_GETDLGCODE
0x00A0 WM_NCMOUSEMOVE
0x00A1 WM_NCLBUTTONDOWN
0x00A2 WM_NCLBUTTONUP
0x00A3 WM_NCLBUTTONDBLCLK
0x00A4 WM_NCRBUTTONDOWN
0x00A5 WM_NCRBUTTONUP
0x00A6 WM_NCRBUTTONDBLCLK
0x00A7 WM_NCMBUTTONDOWN
0x00A8 WM_NCMBUTTONUP
0x00A9 WM_NCMBUTTONDBLCLK
0x00A9 WM_NCMBUTTONDBLCLK
0x0100 WM_KEYFIRST
0x0100 WM_KEYDOWN
0x0101 WM_KEYUP
0x0102 WM_CHAR
0x0103 WM_DEADCHAR
0x0104 WM_SYSKEYDOWN
0x0105 WM_SYSKEYUP
0x0106 WM_SYSCHAR
0x0107 WM_SYSDEADCHAR
0x0108 WM_KEYLAST
0x0108 WM_KEYLAST
0x0110 WM_INITDIALOG
0x0111 WM_COMMAND
0x0112 WM_SYSCOMMAND
0x0113 WM_TIMER
0x0114 WM_HSCROLL
0x0115 WM_VSCROLL
0x0116 WM_INITMENU
0x0117 WM_INITMENUPOPUP
0x011F WM_MENUSELECT
0x0120 WM_MENUCHAR
0x0121 WM_ENTERIDLE
0x0121 WM_ENTERIDLE
0x0132 WM_CTLCOLORMSGBOX
0x0133 WM_CTLCOLOREDIT
0x0134 WM_CTLCOLORLISTBOX
0x0135 WM_CTLCOLORBTN
0x0136 WM_CTLCOLORDLG
0x0137 WM_CTLCOLORSCROLLBAR
0x0138 WM_CTLCOLORSTATIC
0x0138 WM_CTLCOLORSTATIC
0x0200 WM_MOUSEFIRST
0x0200 WM_MOUSEMOVE
0x0201 WM_LBUTTONDOWN
0x0202 WM_LBUTTONUP
0x0203 WM_LBUTTONDBLCLK
0x0204 WM_RBUTTONDOWN
0x0205 WM_RBUTTONUP
0x0206 WM_RBUTTONDBLCLK
0x0207 WM_MBUTTONDOWN
0x0208 WM_MBUTTONUP
0x0209 WM_MBUTTONDBLCLK
0x020A WM_MOUSEWHEEL
0x020A WM_MOUSELAST
0x020A WM_MOUSELAST
0x0210 WM_PARENTNOTIFY
0x0211 WM_ENTERMENULOOP
0x0212 WM_EXITMENULOOP
0x0213 WM_NEXTMENU
0x0213 WM_NEXTMENU
532 WM_SIZING
533 WM_CAPTURECHANGED
534 WM_MOVING
536 WM_POWERBROADCAST
537 WM_DEVICECHANGE
537 WM_DEVICECHANGE
0x010D WM_IME_STARTCOMPOSITION
0x010E WM_IME_ENDCOMPOSITION
0x010F WM_IME_COMPOSITION
0x010F WM_IME_KEYLAST
0x010F WM_IME_KEYLAST
0x0281 WM_IME_SETCONTEXT
0x0282 WM_IME_NOTIFY
0x0283 WM_IME_CONTROL
0x0284 WM_IME_COMPOSITIONFULL
0x0285 WM_IME_SELECT
0x0286 WM_IME_CHAR
0x0286 WM_IME_CHAR
0x0290 WM_IME_KEYDOWN
0x0291 WM_IME_KEYUP
0x0291 WM_IME_KEYUP
0x0220 WM_MDICREATE
0x0221 WM_MDIDESTROY
0x0222 WM_MDIACTIVATE
0x0223 WM_MDIRESTORE
0x0224 WM_MDINEXT
0x0225 WM_MDIMAXIMIZE
0x0226 WM_MDITILE
0x0227 WM_MDICASCADE
0x0228 WM_MDIICONARRANGE
0x0229 WM_MDIGETACTIVE
0x0230 WM_MDISETMENU
0x0230 WM_MDISETMENU
0x0231 WM_ENTERSIZEMOVE
0x0232 WM_EXITSIZEMOVE
0x0233 WM_DROPFILES
0x0234 WM_MDIREFRESHMENU
0x0234 WM_MDIREFRESHMENU
0x02A1 WM_MOUSEHOVER
0x02A3 WM_MOUSELEAVE
0x02A3 WM_MOUSELEAVE
0x0300 WM_CUT
0x0301 WM_COPY
0x0302 WM_PASTE
0x0303 WM_CLEAR
0x0304 WM_UNDO
0x0305 WM_RENDERFORMAT
0x0306 WM_RENDERALLFORMATS
0x0307 WM_DESTROYCLIPBOARD
0x0308 WM_DRAWCLIPBOARD
0x0309 WM_PAINTCLIPBOARD
0x030A WM_VSCROLLCLIPBOARD
0x030B WM_SIZECLIPBOARD
0x030C WM_ASKCBFORMATNAME
0x030D WM_CHANGECBCHAIN
0x030E WM_HSCROLLCLIPBOARD
0x030F WM_QUERYNEWPALETTE
0x0310 WM_PALETTEISCHANGING
0x0311 WM_PALETTECHANGED
0x0312 WM_HOTKEY
0x0312 WM_HOTKEY
791 WM_PRINT
792 WM_PRINTCLIENT
792 WM_PRINTCLIENT
856 WM_HANDHELDFIRST
863 WM_HANDHELDLAST
863 WM_HANDHELDLAST
0x0380 WM_PENWINFIRST
0x038F WM_PENWINLAST
0x038F WM_PENWINLAST
0x0390 WM_COALESCE_FIRST
0x039F WM_COALESCE_LAST
0x039F WM_COALESCE_LAST
0x03E0 WM_DDE_FIRST
0x03E0 WM_DDE_INITIATE
0x03E1 WM_DDE_TERMINATE
0x03E2 WM_DDE_ADVISE
0x03E3 WM_DDE_UNADVISE
0x03E4 WM_DDE_ACK
0x03E5 WM_DDE_DATA
0x03E6 WM_DDE_REQUEST
0x03E7 WM_DDE_POKE
0x03E8 WM_DDE_EXECUTE
0x03E8 WM_DDE_LAST
0x03E8 WM_DDE_LAST
0x8000 WM_APP
0x8000 WM_APP
0x0400 WM_USER
0x0400 WM_USER
0x0400 WM_USER
0x0400 WM_USER
0x0400 WM_USER
0x0000 WM_NULL
0x0001 WM_CREATE
0x0002 WM_DESTROY
0x0003 WM_MOVE
0x0005 WM_SIZE
0x0006 WM_ACTIVATE
0x0007 WM_SETFOCUS
0x0008 WM_KILLFOCUS
0x000A WM_ENABLE
0x000B WM_SETREDRAW
0x000C WM_SETTEXT
0x000D WM_GETTEXT
0x000E WM_GETTEXTLENGTH
0x000F WM_PAINT
0x0010 WM_CLOSE
0x0011 WM_QUERYENDSESSION
0x0012 WM_QUIT
0x0013 WM_QUERYOPEN
0x0014 WM_ERASEBKGND
0x0015 WM_SYSCOLORCHANGE
0x0016 WM_ENDSESSION
0x0018 WM_SHOWWINDOW
0x001A WM_WININICHANGE
0x001A WM_SETTINGCHANGE
0x001B WM_DEVMODECHANGE
0x001C WM_ACTIVATEAPP
0x001D WM_FONTCHANGE
0x001E WM_TIMECHANGE
0x001F WM_CANCELMODE
0x0020 WM_SETCURSOR
0x0021 WM_MOUSEACTIVATE
0x0022 WM_CHILDACTIVATE
0x0023 WM_QUEUESYNC
0x0024 WM_GETMINMAXINFO
0x0026 WM_PAINTICON
0x0027 WM_ICONERASEBKGND
0x0028 WM_NEXTDLGCTL
0x002A WM_SPOOLERSTATUS
0x002B WM_DRAWITEM
0x002C WM_MEASUREITEM
0x002D WM_DELETEITEM
0x002E WM_VKEYTOITEM
0x002F WM_CHARTOITEM
0x0030 WM_SETFONT
0x0031 WM_GETFONT
0x0032 WM_SETHOTKEY
0x0033 WM_GETHOTKEY
0x0037 WM_QUERYDRAGICON
0x0039 WM_COMPAREITEM
0x003D WM_GETOBJECT
0x0041 WM_COMPACTING
0x0046 WM_WINDOWPOSCHANGING
0x0047 WM_WINDOWPOSCHANGED
0x0048 WM_POWER
0x004A WM_COPYDATA
0x004B WM_CANCELJOURNAL
0x004E WM_NOTIFY
0x0050 WM_INPUTLANGCHANGEREQUEST
0x0051 WM_INPUTLANGCHANGE
0x0052 WM_TCARD
0x0053 WM_HELP
0x0054 WM_USERCHANGED
0x0055 WM_NOTIFYFORMAT
0x007B WM_CONTEXTMENU
0x007C WM_STYLECHANGING
0x007D WM_STYLECHANGED
0x007E WM_DISPLAYCHANGE
0x007F WM_GETICON
0x0080 WM_SETICON
0x0081 WM_NCCREATE
0x0082 WM_NCDESTROY
0x0083 WM_NCCALCSIZE
0x0084 WM_NCHITTEST
0x0085 WM_NCPAINT
0x0086 WM_NCACTIVATE
0x0087 WM_GETDLGCODE
0x0088 WM_SYNCPAINT
0x00A0 WM_NCMOUSEMOVE
0x00A1 WM_NCLBUTTONDOWN
0x00A2 WM_NCLBUTTONUP
0x00A3 WM_NCLBUTTONDBLCLK
0x00A4 WM_NCRBUTTONDOWN
0x00A5 WM_NCRBUTTONUP
0x00A6 WM_NCRBUTTONDBLCLK
0x00A7 WM_NCMBUTTONDOWN
0x00A8 WM_NCMBUTTONUP
0x00A9 WM_NCMBUTTONDBLCLK
0x0100 WM_KEYFIRST
0x0100 WM_KEYDOWN
0x0101 WM_KEYUP
0x0102 WM_CHAR
0x0103 WM_DEADCHAR
0x0104 WM_SYSKEYDOWN
0x0105 WM_SYSKEYUP
0x0106 WM_SYSCHAR
0x0107 WM_SYSDEADCHAR
0x0108 WM_KEYLAST
0x010D WM_IME_STARTCOMPOSITION
0x010E WM_IME_ENDCOMPOSITION
0x010F WM_IME_COMPOSITION
0x010F WM_IME_KEYLAST
0x0110 WM_INITDIALOG
0x0111 WM_COMMAND
0x0112 WM_SYSCOMMAND
0x0113 WM_TIMER
0x0114 WM_HSCROLL
0x0115 WM_VSCROLL
0x0116 WM_INITMENU
0x0117 WM_INITMENUPOPUP
0x011F WM_MENUSELECT
0x0120 WM_MENUCHAR
0x0121 WM_ENTERIDLE
0x0122 WM_MENURBUTTONUP
0x0123 WM_MENUDRAG
0x0124 WM_MENUGETOBJECT
0x0125 WM_UNINITMENUPOPUP
0x0126 WM_MENUCOMMAND
0x0132 WM_CTLCOLORMSGBOX
0x0133 WM_CTLCOLOREDIT
0x0134 WM_CTLCOLORLISTBOX
0x0135 WM_CTLCOLORBTN
0x0136 WM_CTLCOLORDLG
0x0137 WM_CTLCOLORSCROLLBAR
0x0138 WM_CTLCOLORSTATIC
0x0200 WM_MOUSEFIRST
0x0200 WM_MOUSEMOVE
0x0201 WM_LBUTTONDOWN
0x0202 WM_LBUTTONUP
0x0203 WM_LBUTTONDBLCLK
0x0204 WM_RBUTTONDOWN
0x0205 WM_RBUTTONUP
0x0206 WM_RBUTTONDBLCLK
0x0207 WM_MBUTTONDOWN
0x0208 WM_MBUTTONUP
0x0209 WM_MBUTTONDBLCLK
0x020A WM_MOUSEWHEEL
0x0210 WM_PARENTNOTIFY
0x0211 WM_ENTERMENULOOP
0x0212 WM_EXITMENULOOP
0x0213 WM_NEXTMENU
0x0214 WM_SIZING
0x0215 WM_CAPTURECHANGED
0x0216 WM_MOVING
0x0219 WM_DEVICECHANGE
0x0220 WM_MDICREATE
0x0221 WM_MDIDESTROY
0x0222 WM_MDIACTIVATE
0x0223 WM_MDIRESTORE
0x0224 WM_MDINEXT
0x0225 WM_MDIMAXIMIZE
0x0226 WM_MDITILE
0x0227 WM_MDICASCADE
0x0228 WM_MDIICONARRANGE
0x0229 WM_MDIGETACTIVE
0x0230 WM_MDISETMENU
0x0231 WM_ENTERSIZEMOVE
0x0232 WM_EXITSIZEMOVE
0x0233 WM_DROPFILES
0x0234 WM_MDIREFRESHMENU
0x0281 WM_IME_SETCONTEXT
0x0282 WM_IME_NOTIFY
0x0283 WM_IME_CONTROL
0x0284 WM_IME_COMPOSITIONFULL
0x0285 WM_IME_SELECT
0x0286 WM_IME_CHAR
0x0288 WM_IME_REQUEST
0x0290 WM_IME_KEYDOWN
0x0291 WM_IME_KEYUP
0x02A1 WM_MOUSEHOVER
0x02A3 WM_MOUSELEAVE
0x0300 WM_CUT
0x0301 WM_COPY
0x0302 WM_PASTE
0x0303 WM_CLEAR
0x0304 WM_UNDO
0x0305 WM_RENDERFORMAT
0x0306 WM_RENDERALLFORMATS
0x0307 WM_DESTROYCLIPBOARD
0x0308 WM_DRAWCLIPBOARD
0x0309 WM_PAINTCLIPBOARD
0x030A WM_VSCROLLCLIPBOARD
0x030B WM_SIZECLIPBOARD
0x030C WM_ASKCBFORMATNAME
0x030D WM_CHANGECBCHAIN
0x030E WM_HSCROLLCLIPBOARD
0x030F WM_QUERYNEWPALETTE
0x0310 WM_PALETTEISCHANGING
0x0311 WM_PALETTECHANGED
0x0312 WM_HOTKEY
0x0317 WM_PRINT
0x0318 WM_PRINTCLIENT
0x0358 WM_HANDHELDFIRST
0x035F WM_HANDHELDLAST
0x0360 WM_AFXFIRST
0x037F WM_AFXLAST
0x0380 WM_PENWINFIRST
0x038F WM_PENWINLAST
0x0400 WM_USER
0x8000 WM_APP
0x8000 WM_APP
0x8000 WM_APP
0x8000 WM_APP
1 CS_VREDRAW
2 CS_HREDRAW
4 CS_KEYCVTWINDOW
8 CS_DBLCLKS
32 CS_OWNDC
64 CS_CLASSDC
128 CS_PARENTDC
256 CS_NOKEYCVT
512 CS_NOCLOSE
2048 CS_SAVEBITS
4096 CS_BYTEALIGNCLIENT
8192 CS_BYTEALIGNWINDOW
16384 CS_PUBLICCLASS
16384 CS_PUBLICCLASS
16384 CS_PUBLICCLASS
16384 CS_PUBLICCLASS
0x0 WS_OVERLAPPED
0x80000000 WS_POPUP
0x40000000 WS_CHILD
0x20000000 WS_MINIMIZE
0x10000000 WS_VISIBLE
0x8000000 WS_DISABLED
0x4000000 WS_CLIPSIBLINGS
0x2000000 WS_CLIPCHILDREN
0x1000000 WS_MAXIMIZE
0xC00000 WS_CAPTION
0x800000 WS_BORDER
0x400000 WS_DLGFRAME
0x200000 WS_VSCROLL
0x100000 WS_HSCROLL
0x80000 WS_SYSMENU
0x40000 WS_THICKFRAME
0x20000 WS_GROUP
0x10000 WS_TABSTOP
0x20000 WS_MINIMIZEBOX
0x10000 WS_MAXIMIZEBOX
0x0 WS_TILED
0x20000000 WS_ICONIC
0x40000 WS_SIZEBOX
0xCF0000 WS_OVERLAPPEDWINDOW
0x80880000 WS_POPUPWINDOW
0x80880000 WS_POPUPWINDOW
0x80880000 WS_POPUPWINDOW
0x80880000 WS_POPUPWINDOW
0x1 WS_EX_DLGMODALFRAME
0x4 WS_EX_NOPARENTNOTIFY
0x8 WS_EX_TOPMOST
0x10 WS_EX_ACCEPTFILES
0x20 WS_EX_TRANSPARENT
0x40 WS_EX_MDICHILD
0x80 WS_EX_TOOLWINDOW
0x100 WS_EX_WINDOWEDGE
0x200 WS_EX_CLIENTEDGE
0x400 WS_EX_CONTEXTHELP
0x1000 WS_EX_RIGHT
0x0 WS_EX_LEFT
0x2000 WS_EX_RTLREADING
0x0 WS_EX_LTRREADING
0x4000 WS_EX_LEFTSCROLLBAR
0x0 WS_EX_RIGHTSCROLLBAR
0x10000 WS_EX_CONTROLPARENT
0x20000 WS_EX_STATICEDGE
0x40000 WS_EX_APPWINDOW
0x300 WS_EX_OVERLAPPEDWINDOW
0x188 WS_EX_PALETTEWINDOW
0x80000 WS_EX_LAYERED
0x80000 WS_EX_LAYERED
0x80000 WS_EX_LAYERED
0x80000 WS_EX_LAYERED
0 HCBT_MOVESIZE
1 HCBT_MINMAX
2 HCBT_QS
3 HCBT_CREATEWND
4 HCBT_DESTROYWND
5 HCBT_ACTIVATE
6 HCBT_CLICKSKIPPED
7 HCBT_KEYSKIPPED
8 HCBT_SYSCOMMAND
9 HCBT_SETFOCUS
0 PM_NOREMOVE
1 PM_REMOVE
2 PM_NOYIELD
0 HC_ACTION
1 HC_GETNEXT
2 HC_SKIP
3 HC_NOREMOVE
3 HC_NOREM
4 HC_SYSMODALON
5 HC_SYSMODALOFF
0 MSGF_DIALOGBOX
1 MSGF_MESSAGEBOX
2 MSGF_MENU
5 MSGF_SCROLLBAR
6 MSGF_NEXTWINDOW
8 MSGF_MAX
4096 MSGF_USER
32769 MSGF_DDEMGR
1 HSHELL_WINDOWCREATED
2 HSHELL_WINDOWDESTROYED
3 HSHELL_ACTIVATESHELLWINDOW
4 HSHELL_WINDOWACTIVATED
5 HSHELL_GETMINRECT
6 HSHELL_REDRAW
7 HSHELL_TASKMAN
8 HSHELL_LANGUAGE
8 HSHELL_LANGUAGE
8 HSHELL_LANGUAGE
8 HSHELL_LANGUAGE
0x00000000L const long BS_PUSHBUTTON
0x00000001L const long BS_DEFPUSHBUTTON
0x00000002L const long BS_CHECKBOX
0x00000003L const long BS_AUTOCHECKBOX
0x00000004L const long BS_RADIOBUTTON
0x00000005L const long BS_3STATE
0x00000006L const long BS_AUTO3STATE
0x00000007L const long BS_GROUPBOX
0x00000008L const long BS_USERBUTTON
0x00000009L const long BS_AUTORADIOBUTTON
0x0000000BL const long BS_OWNERDRAW
0x00000020L const long BS_LEFTTEXT
0x00000000L const long BS_TEXT
0x00000040L const long BS_ICON
0x00000080L const long BS_BITMAP
0x00000100L const long BS_LEFT
0x00000200L const long BS_RIGHT
0x00000300L const long BS_CENTER
0x00000400L const long BS_TOP
0x00000800L const long BS_BOTTOM
0x00000C00L const long BS_VCENTER
0x00001000L const long BS_PUSHLIKE
0x00002000L const long BS_MULTILINE
0x00004000L const long BS_NOTIFY
0x00008000L const long BS_FLAT
0x00000020L const long BS_RIGHTBUTTON
0 const long BN_CLICKED
1 const long BN_PAINT
2 const long BN_HILITE
3 const long BN_UNHILITE
4 const long BN_DISABLE
5 const long BN_DOUBLECLICKED
2 const long BN_PUSHED
2 const long BN_UNPUSHED
5 const long BN_DBLCLK
6 const long BN_SETFOCUS
7 const long BN_KILLFOCUS
0x00F0 const long BM_GETCHECK
0x00F1 const long BM_SETCHECK
0x00F2 const long BM_GETSTATE
0x00F3 const long BM_SETSTATE
0x00F4 const long BM_SETSTYLE
0x00F5 const long BM_CLICK
0x00F6 const long BM_GETIMAGE
0x00F7 const long BM_SETIMAGE
0x0000 const long BST_UNCHECKED
0x0001 const long BST_CHECKED
0x0002 const long BST_INDETERMINATE
0x0004 const long BST_PUSHED
0x0008 const long BST_FOCUS
0x0000L const long ES_LEFT
0x0001L const long ES_CENTER
0x0002L const long ES_RIGHT
0x0004L const long ES_MULTILINE
0x0008L const long ES_UPPERCASE
0x0010L const long ES_LOWERCASE
0x0020L const long ES_PASSWORD
0x0040L const long ES_AUTOVSCROLL
0x0080L const long ES_AUTOHSCROLL
0x0100L const long ES_NOHIDESEL
0x0400L const long ES_OEMCONVERT
0x0800L const long ES_READONLY
0x1000L const long ES_WANTRETURN
0x2000L const long ES_NUMBER
0x0100 const long EN_SETFOCUS
0x0200 const long EN_KILLFOCUS
0x0300 const long EN_CHANGE
0x0400 const long EN_UPDATE
0x0500 const long EN_ERRSPACE
0x0501 const long EN_MAXTEXT
0x0601 const long EN_HSCROLL
0x0602 const long EN_VSCROLL
0x0001 const long EC_LEFTMARGIN
0x0002 const long EC_RIGHTMARGIN
0xffff const long EC_USEFONTINFO
0x0001 const long EMSIS_COMPOSITIONSTRING
0x0001 const long EIMES_GETCOMPSTRATONCE
0x0002 const long EIMES_CANCELCOMPSTRINFOCUS
0x0004 const long EIMES_COMPLETECOMPSTRKILLFOCUS
0x00B0 const long EM_GETSEL
0x00B1 const long EM_SETSEL
0x00B2 const long EM_GETRECT
0x00B3 const long EM_SETRECT
0x00B4 const long EM_SETRECTNP
0x00B5 const long EM_SCROLL
0x00B6 const long EM_LINESCROLL
0x00B7 const long EM_SCROLLCARET
0x00B8 const long EM_GETMODIFY
0x00B9 const long EM_SETMODIFY
0x00BA const long EM_GETLINECOUNT
0x00BB const long EM_LINEINDEX
0x00BC const long EM_SETHANDLE
0x00BD const long EM_GETHANDLE
0x00BE const long EM_GETTHUMB
0x00C1 const long EM_LINELENGTH
0x00C2 const long EM_REPLACESEL
0x00C4 const long EM_GETLINE
0x00C5 const long EM_LIMITTEXT
0x00C6 const long EM_CANUNDO
0x00C7 const long EM_UNDO
0x00C8 const long EM_FMTLINES
0x00C9 const long EM_LINEFROMCHAR
0x00CB const long EM_SETTABSTOPS
0x00CC const long EM_SETPASSWORDCHAR
0x00CD const long EM_EMPTYUNDOBUFFER
0x00CE const long EM_GETFIRSTVISIBLELINE
0x00CF const long EM_SETREADONLY
0x00D0 const long EM_SETWORDBREAKPROC
0x00D1 const long EM_GETWORDBREAKPROC
0x00D2 const long EM_GETPASSWORDCHAR
0x00D3 const long EM_SETMARGINS
0x00D4 const long EM_GETMARGINS
0x00C5 const long EM_SETLIMITTEXT
0x00D5 const long EM_GETLIMITTEXT
0x00D6 const long EM_POSFROMCHAR
0x00D7 const long EM_CHARFROMPOS
0x00D8 const long EM_SETIMESTATUS
0x00D9 const long EM_GETIMESTATUS
0x00000000L const long SS_LEFT
0x00000001L const long SS_CENTER
0x00000002L const long SS_RIGHT
0x00000003L const long SS_ICON
0x00000004L const long SS_BLACKRECT
0x00000005L const long SS_GRAYRECT
0x00000006L const long SS_WHITERECT
0x00000007L const long SS_BLACKFRAME
0x00000008L const long SS_GRAYFRAME
0x00000009L const long SS_WHITEFRAME
0x0000000AL const long SS_USERITEM
0x0000000BL const long SS_SIMPLE
0x0000000CL const long SS_LEFTNOWORDWRAP
0x0000000DL const long SS_OWNERDRAW
0x0000000EL const long SS_BITMAP
0x0000000FL const long SS_ENHMETAFILE
0x00000010L const long SS_ETCHEDHORZ
0x00000011L const long SS_ETCHEDVERT
0x00000012L const long SS_ETCHEDFRAME
0x0000001FL const long SS_TYPEMASK
0x00000080L const long SS_NOPREFIX
0x00000100L const long SS_NOTIFY
0x00000200L const long SS_CENTERIMAGE
0x00000400L const long SS_RIGHTJUST
0x00000800L const long SS_REALSIZEIMAGE
0x00001000L const long SS_SUNKEN
0x00004000L const long SS_ENDELLIPSIS
0x00008000L const long SS_PATHELLIPSIS
0x0000C000L const long SS_WORDELLIPSIS
0x0000C000L const long SS_ELLIPSISMASK
0x0170 const long STM_SETICON
0x0171 const long STM_GETICON
0x0172 const long STM_SETIMAGE
0x0173 const long STM_GETIMAGE
0 const long STN_CLICKED
1 const long STN_DBLCLK
2 const long STN_ENABLE
3 const long STN_DISABLE
0x0174 const long STM_MSGMAX
0 const long LB_OKAY
(-1) const long LB_ERR
(-2) const long LB_ERRSPACE
(-2) const long LBN_ERRSPACE
1 const long LBN_SELCHANGE
2 const long LBN_DBLCLK
3 const long LBN_SELCANCEL
4 const long LBN_SETFOCUS
5 const long LBN_KILLFOCUS
0x0180 const long LB_ADDSTRING
0x0181 const long LB_INSERTSTRING
0x0182 const long LB_DELETESTRING
0x0183 const long LB_SELITEMRANGEEX
0x0184 const long LB_RESETCONTENT
0x0185 const long LB_SETSEL
0x0186 const long LB_SETCURSEL
0x0187 const long LB_GETSEL
0x0188 const long LB_GETCURSEL
0x0189 const long LB_GETTEXT
0x018A const long LB_GETTEXTLEN
0x018B const long LB_GETCOUNT
0x018C const long LB_SELECTSTRING
0x018D const long LB_DIR
0x018E const long LB_GETTOPINDEX
0x018F const long LB_FINDSTRING
0x0190 const long LB_GETSELCOUNT
0x0191 const long LB_GETSELITEMS
0x0192 const long LB_SETTABSTOPS
0x0193 const long LB_GETHORIZONTALEXTENT
0x0194 const long LB_SETHORIZONTALEXTENT
0x0195 const long LB_SETCOLUMNWIDTH
0x0196 const long LB_ADDFILE
0x0197 const long LB_SETTOPINDEX
0x0198 const long LB_GETITEMRECT
0x0199 const long LB_GETITEMDATA
0x019A const long LB_SETITEMDATA
0x019B const long LB_SELITEMRANGE
0x019C const long LB_SETANCHORINDEX
0x019D const long LB_GETANCHORINDEX
0x019E const long LB_SETCARETINDEX
0x019F const long LB_GETCARETINDEX
0x01A0 const long LB_SETITEMHEIGHT
0x01A1 const long LB_GETITEMHEIGHT
0x01A2 const long LB_FINDSTRINGEXACT
0x01A5 const long LB_SETLOCALE
0x01A6 const long LB_GETLOCALE
0x01A7 const long LB_SETCOUNT
0x01A8 const long LB_INITSTORAGE
0x01A9 const long LB_ITEMFROMPOINT
0x01B0 const long LB_MSGMAX
0x0001L const long LBS_NOTIFY
0x0002L const long LBS_SORT
0x0004L const long LBS_NOREDRAW
0x0008L const long LBS_MULTIPLESEL
0x0010L const long LBS_OWNERDRAWFIXED
0x0020L const long LBS_OWNERDRAWVARIABLE
0x0040L const long LBS_HASSTRINGS
0x0080L const long LBS_USETABSTOPS
0x0100L const long LBS_NOINTEGRALHEIGHT
0x0200L const long LBS_MULTICOLUMN
0x0400L const long LBS_WANTKEYBOARDINPUT
0x0800L const long LBS_EXTENDEDSEL
0x1000L const long LBS_DISABLENOSCROLL
0x2000L const long LBS_NODATA
0x4000L const long LBS_NOSEL
(0x0001L|0x0002L|0x200000|0x800000) const long LBS_STANDARD
0 const long CB_OKAY
(-1) const long CB_ERR
(-2) const long CB_ERRSPACE
(-1) const long CBN_ERRSPACE
1 const long CBN_SELCHANGE
2 const long CBN_DBLCLK
3 const long CBN_SETFOCUS
4 const long CBN_KILLFOCUS
5 const long CBN_EDITCHANGE
6 const long CBN_EDITUPDATE
7 const long CBN_DROPDOWN
8 const long CBN_CLOSEUP
9 const long CBN_SELENDOK
10 const long CBN_SELENDCANCEL
0x0001L const long CBS_SIMPLE
0x0002L const long CBS_DROPDOWN
0x0003L const long CBS_DROPDOWNLIST
0x0010L const long CBS_OWNERDRAWFIXED
0x0020L const long CBS_OWNERDRAWVARIABLE
0x0040L const long CBS_AUTOHSCROLL
0x0080L const long CBS_OEMCONVERT
0x0100L const long CBS_SORT
0x0200L const long CBS_HASSTRINGS
0x0400L const long CBS_NOINTEGRALHEIGHT
0x0800L const long CBS_DISABLENOSCROLL
0x2000L const long CBS_UPPERCASE
0x4000L const long CBS_LOWERCASE
0x0140 const long CB_GETEDITSEL
0x0141 const long CB_LIMITTEXT
0x0142 const long CB_SETEDITSEL
0x0143 const long CB_ADDSTRING
0x0144 const long CB_DELETESTRING
0x0145 const long CB_DIR
0x0146 const long CB_GETCOUNT
0x0147 const long CB_GETCURSEL
0x0148 const long CB_GETLBTEXT
0x0149 const long CB_GETLBTEXTLEN
0x014A const long CB_INSERTSTRING
0x014B const long CB_RESETCONTENT
0x014C const long CB_FINDSTRING
0x014D const long CB_SELECTSTRING
0x014E const long CB_SETCURSEL
0x014F const long CB_SHOWDROPDOWN
0x0150 const long CB_GETITEMDATA
0x0151 const long CB_SETITEMDATA
0x0152 const long CB_GETDROPPEDCONTROLRECT
0x0153 const long CB_SETITEMHEIGHT
0x0154 const long CB_GETITEMHEIGHT
0x0155 const long CB_SETEXTENDEDUI
0x0156 const long CB_GETEXTENDEDUI
0x0157 const long CB_GETDROPPEDSTATE
0x0158 const long CB_FINDSTRINGEXACT
0x0159 const long CB_SETLOCALE
0x015A const long CB_GETLOCALE
0x015b const long CB_GETTOPINDEX
0x015c const long CB_SETTOPINDEX
0x015d const long CB_GETHORIZONTALEXTENT
0x015e const long CB_SETHORIZONTALEXTENT
0x015f const long CB_GETDROPPEDWIDTH
0x0160 const long CB_SETDROPPEDWIDTH
0x0161 const long CB_INITSTORAGE
0x0162 const long CB_MSGMAX
0x0000L const long SBS_HORZ
0x0001L const long SBS_VERT
0x0002L const long SBS_TOPALIGN
0x0002L const long SBS_LEFTALIGN
0x0004L const long SBS_BOTTOMALIGN
0x0004L const long SBS_RIGHTALIGN
0x0002L const long SBS_SIZEBOXTOPLEFTALIGN
0x0004L const long SBS_SIZEBOXBOTTOMRIGHTALIGN
0x0008L const long SBS_SIZEBOX
0x0010L const long SBS_SIZEGRIP
0x00E0 const long SBM_SETPOS
0x00E1 const long SBM_GETPOS
0x00E2 const long SBM_SETRANGE
0x00E6 const long SBM_SETRANGEREDRAW
0x00E3 const long SBM_GETRANGE
0x00E4 const long SBM_ENABLE_ARROWS
0x00E9 const long SBM_SETSCROLLINFO
0x00EA const long SBM_GETSCROLLINFO
0x0001 const long SIF_RANGE
0x0002 const long SIF_PAGE
0x0004 const long SIF_POS
0x0008 const long SIF_DISABLENOSCROLL
0x0010 const long SIF_TRACKPOS
(0x0001|0x0002|0x0004|0x0010) const long SIF_ALL
0xfffffffc const long GWL_WNDPROC
0x80000000 const long COL_SYS_MASK
0x0 const long PS_SOLID
0x0 const long SIZE_RESTORED
0x0 const long SW_HIDE
0x4 const long SW_SHOWNOACTIVATE
0x5 const long SW_SHOW
0x80 const long SWP_HIDEWINDOW
0x40 const long SWP_SHOWWINDOW
12 const long BITSPIXEL
0x1002 const long SPI_GETMENUANIMATION
0x1024 const long SPI_GETDROPSHADOW
0x1024 const long SPI_GETDROPSHADOW
0x1024 const long SPI_GETDROPSHADOW
AutoHotKey
1) simulate a close action
WinGet, window_id, ID, MSN Messenger ; as the title name
; 0×112 = WM_SYSCOMMAND, 0xF060 = SC_CLOSE
PostMessage, 0×112, 0xF060,,, ahk_id %window_id% ; approach to simulate a click on close button
the downside is that it will mimimize to trayicon, unless the program has no tray icon.
2) by process Exit
Process, Exist, msnmsgr.exe
the downside is that it will still have a dead trayicon there, unless you manually refresh the tray window
3) perfect approach
WM_CLOSE=0×10
WM_QUIT=0×12
DetectHiddenWindows, On
Process, Exist, msnmsgr.exe
pid:=errorlevel
Loop
{
IfWinExist, ahk_pid %pid%
{
;WinClose
;PostMessage, WM_CLOSE
PostMessage, WM_QUIT
}
else if A_Index>1
break
;else msgbox, No dice!
}
4) by send a WM_COMMAN exit command
PostMessage, 0×111, 32770,,,雅虎通
how to find 32770?
please refer http://www.autohotkey.com/docs/misc/SendMessage.ht…
Subversion
1)no undo-checkout
On Thu, 2005-01-27 at 23:43, David S. wrote:
> Some version control systems have the notion of undo check-out. In can
> see that with Subversion you can revert.
’svn revert’ is used to undo the changes you make. You can’t
undo a checkout with ’svn revert’.
Checkout in subversion means, you get a local copy of the repository,
or a portion of the repository. The server does not keep track of
working copies – If you need to get rid of a working copy, just
delete it.
> But what if you want to
> eliminate your view altogether? Do you just delete the directory?
>
> Thanks.
>
2) Commit failed: file has inconsistent newlines.
http://www.hanselman.com/blog/CategoryView.aspx?category=Subversion
3) can not show diff because of inconsistent newlines in file
cannot show diff because of inconsistent newlines in file的解决方法
cannot show diff because of inconsistent newlines in file
有时候比较两个文件时,因为存在不同的换行格式,导致上面这个错误。
错误原因应该是TortoiseSVN自带的比较工具TortoiseMerge目前无法处理不同的换行格式。
解决方法:使用WinMerge作为外部比较工具
步骤:
1、下载WinMerge 2.6.0(本站下载区)或http://winmerge.org/downloads.php
2、安装WinMerge,在“选择额外任务”对话框中,将“integrate with TortoiseSVN”选上,
安装后,TortoiseSVN中的外部比较工具变成
e:\Program Files\WinMerge\WinMergeU.exe -e -x -ub -dl %bname -dr %yname %base %mine
(假设你的WinMerge安装在e:\Program Files\WinMerge)
再进行比较时,就不会出现cannot show diff because of inconsistent newlines in file了
http://www.iusesvn.com/bbs/thread-413-1-1.html
October 22, 2006
ZT 风险投资公司在中国
风险投资公司大全
IDG技术创业投资基金
英特尔投资(中国)
联想投资有限公司
美商中经合集团
软银亚洲信息基础投资基金
智碁创投股份有限公司
集富创业投资(香港)有限公司
上海联创投资管理有限公司
上海华盈创业投资基金管理有限公司
华登太平洋创业投资管理有限公司
深圳市创新投资集团有限公司
凯雷投资集团
美国梧桐投资公司
华平创业投资有限公司
高盛亚洲
深圳清华力合创业投资有限公司
广州科技风险投资有限公司
软库中国创业投资有限公司
龙科创业投资管理有限公司
德丰杰全球创业投资基金
祥峰中国投资公司
Doll资金管理公司
晨兴科技投资公司
黑龙江辰能哈工大高科技风险投资有限公司
Jovan创业投资公司
招商局富鑫资产管理有限公司
信中利投资集团公司
Granite Global Ventures
维众投资公司
霸菱投资(香港)有限公司
橡子园创业投资管理(上海)有限公司
i (很难打开)
富达基金(香港)有限公司
西门子通信投资公司
联创策源(CEYUAN VENTURES)
汉鼎亚太公司
永威投资有限公司
美国老虎科技基金
香港新世界基建有限公司
武汉华工创业投资有限责任公司
深圳市达晨创业投资有限公司
汇丰直接投资(亚洲)有限公司
成为创业
中国创业投资有限公司
新加坡政府直接投资有限公司
美国高通公司投资部
上海实业控股有限公司
戈壁合伙人有限公司
北京鼎晖创业投资中心
上海张江高科技园区开发股份有限公司
深圳市高新技术投资担保有限公司
中科招商创业投资管理有限公司
广东省科技风险投资有限公司
中国国际金融有限公司
英联投资有限公司
摩根士丹利添惠亚洲投资有限公司
北京科技风险投资股份有限公司
亚洲战略投资管理公司
中国火炬高新技术产业投资公司
上海科技投资股份公司
上海盛基创业投资管理有限公司
深港产学研创业投资有限公司
光大控股创业投资管理(深圳)有限公司
上海实业联合集团股份有限公司
清华科技园创业投资有限公司
清华科技创业投资有限公司
重庆科技风险投资有限公司
北京市国有资产经营有限责任公司
美国国际集团
联和运通投资顾问有限公司
花旗金融组织亚太投资有限公司
渣打银行(香港)有限公司
北京电信投资有限公司
上海新鑫投资有限公司
Pacific Venture Partners
上海蝶龙商务咨询有限公司
上海市信息投资股份有限公司
汉能投资集团
联讯创业投资股份有限公司
融勤国际
国际金融公司
富达国际创业投资有限公司
日本亚洲投资(香港)有限公司
美国新桥投资
深圳市财富投资管理公司
深圳市百利宏科技投资有限公司
深圳市安鹏投资发展有限公司
深圳盛润创业投资管理有限公司
深圳科鼎创业投资管理公司
深圳华强科技创新有限公司
深圳北大港科招商创业有限公司
大鹏创业投资有限责任公司
北大招商创业投资管理有限公司
上海张江创业投资有限公司
上海信虹投资管理有限公司
上海湘财贯通投资管理有限公司
上海天强投资管理有限公司
上海浦东科创投资管理有限公司
上海浦东创业投资有限公司
上海民创投资管理有限公司
上海龙宇投资有限公司
武汉高新技术产业风险投资公司
武汉东湖创新科技投资公司
十堰世纪东方投资发展有限公司
光动力创业投资有限公司
上海交大创业投资有限公司
上海复旦量子创业投资管理有限公司
上海创业投资有限公司
上海博嵘创业投资管理有限公司
上海宝来投资管理有限公司
上海邦联投资有限公司
沪光国际(香港)上海发展投资有限公司
先锋投资集团陕西先锋投资有限公司
西安科技投资有限公司
西安高新技术产业风险投资有限责任公司
西安创新投资有限公司
西安保德信投资发展有限责任公司
陕西银河科技投资有限责任公司
陕西维思新技术孵化有限责任公司
陕西省高新技术创业投资公司
山西省科技基金发展总公司
山东泰山创业投资有限公司
山东省高新技术投资有限公司
青岛市科技风险投资公司
青岛创业投资有限公司
将军控股有限公司
济南科技风险投资有限公司
潍坊创业投资有限公司
沈阳科技风险投资有限公司
辽宁科技创业投资有限责任公司
辽宁东软创业投资有限公司
大连科技风险投资有限公司
大连成大科技投资有限公司
October 21, 2006
ZT: remap key in windows
我用的是 X20,深受 IBM 系列的本本都没有 Win 键之苦,少了很多快捷键,所以觉得有些不爽,都怪我平时用惯了 Win 键的相关快捷操作。有人说使用 Ctrl+Esc 就行了,其实 Ctel+Esc 无法完全代替 WIN 键,以为它无法使用 Win 键的所有功能,只能弹出开始菜单而已。详细的 Win 键功能如下:
Win:弹出开始菜单
Win+D:将所有窗体最小化或恢复原来大小
Win+E:启动资源管理器
Win+F:启动文件搜索引擎
Win+Ctrl+F:启动计算机搜索引擎
Win+F1:启动帮助和支持中心
Win+R:显示运行对话框
Win+Break:显示系统属性对话框
Win+Shift+M:撤消对所有窗体执行的最小化操作
Win+U:打开辅助工具管理器
所以开始查找有关的解决方式,终于得到了圆满的解决。
一、Win 键修改大法第一重:hotkey tool
首先想到的是可以用驻留内存的软件来拦截键盘操作。。找到了这样的一个软件 TPKey to WinKey
http://netcity2.web.hinet.net/UserD…default-old.htm
这个软件可以利用 ThinkPad 键启动各种 WinKey 组合热键 与 其它特殊功能。。。呵呵。。是专门针对 IBM 机型开发的耶!
但是这个是要驻留内存的。。白白消耗了系统资源。。不爽!所以继续查找 。
二、Win 键修改大法第二重:修改注册表
呵呵。。找到了一个通过修改注册表来实现的方式,可以把 Alt 或 Ctrl 键来模拟 Win 键,这个方式可是实现了系统资源的零消耗。。哈哈。。
有位日本人写了很好的一个网页,免费的:
http://www.flowering.ne.jp/~chonan/tech/w2k_key.html
(请将 IE 的「编码方式」改为「日文(自动选择)」即可读取。
在该页,选择看是 Win 2000 or Win NT,然后设定 remap 的机制,再将「入替有效」打勾即可。最多可以同时 remap 四个键。我是将右边的 Alt remap 成左边的 windows key。然后将产生的码存起来,存成 remap.reg,执行该档即可更新你的 keyboard 的 mapping。
如果有人也想将右边的 Alt 键变成 Windows key, 可以直接将这段 code 存成 remap.reg,执行即可:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlKeyboard Layout]
“Scancode Map”=hex:00,00,00,00,00,00,00,00,
02,00,00,00,
5b,e0,38,e0,
00,00,00,00
但是这个方式只能在 2000/Nt 系统下有效。。如果用的是 95/98 怎么办呢?
想来想去,好像以前在微软的 PowerToys 中看到有自定义键盘的东西,马上转向微软的网站。。一番搜索。。终于。。
三、Win 键修改大法第三重: RemapKey
谢谢您能看到这里,说明您和我一样,真的需要 Win 键了。。所以下面推出 终极完美方案:
RemapKey !!!微软工具,而且是直接修改注册表,也是零消耗的耶。。
1. Windows 95/98: 到 http://www.microsoft.com/Windows95/…Toy/Default.asp
下载 Windows 95 Kernel Toys Set 执行 Keyboard Remap
2. Windows 2000: 需要 Windows 2000 Resource Kit 里的 RemapKey,可到
http://www.dynawell.com/support/ResKit/win2k.asp 下载
注意:For Windows 2000 的这个 RemapKey 是笔者看到过得功能最强大的键盘 Remap 工具,竟然可以复位义键盘上的每一个按钮功能。。。爽!!!
October 20, 2006
Firefox memory usage
free memory
http://tech.cybernetnews.com/2006/03/26/this-may-h…
memory leak
http://www.lifehacker.com/software/optimization/po…
IE7 vs FF
http://www.lifehacker.com/software/ie7/ie7-vs-fire…
Make Firefox Faster
ZT: how to avoid a traffic ticket
http://www.lifehacker.com/software/cars/how-to-bea…
I’ve gotten about thirty speeding tickets in my short life, but I have zero tickets on my record. That’s because no matter how formal the processes may seem, when it comes to law enforcement, you are still dealing with human beings with hearts and minds just like yours. Appeal to them as such, and you will be amazed by the results.
Although I am a law student, I employed this advice before I ever went to law school, and my education has only reinforced these theories. My approach isn’t foolproof legal advice – it’s simply my experienced opinions with a little law mixed in. That said, here are my secrets to getting out of a speeding ticket ordered chronologically, from the point of being pulled over to your final options in the courtroom.
Note: All of this advice assumes that you are merely breaking traffic laws. If you’re trafficking a kilo of crystal meth… well, if you traffic meth, you’re probably not reading Lifehacker. So read on, non-meth-heads.
Blue lights… you’re getting pulled over
1. Get your attitude right.
Fighting with the police officer never increases your chances of leniency. You want him to like you. Prepare to achieve this goal.
2. Turn your car off, and turn the interior lights of your car on.
Place your hands at 10 and 2 on the steering wheel and remove your sunglasses or hat. Some people even advise you to place your keys on the roof of your car as a sign of total submission. Never, ever get out of the car.
The whole point of this is to take any unnecessary tension out of the encounter. You want the officer to be comfortable. Imagine the types of people and the dangers that most officers have had to deal with. Be just the opposite.
3. Be very polite and do exactly what the nice cop with the big gun says.
Save your pleas until after the basics are finished. Many officers will never speak to you until after they’ve done the basics. It’s almost a litmus test for jerk drivers.
4. Once the officer has gotten your information, ask him politely if you may speak to him about your violation.
If you know you broke the law, admit it vehemently and tell the officer that he was completely right for pulling you over. Honest officers will admit that there is a lot of pride in police work, and, if you can sufficiently satisfy the pride factor, sometimes officers don’t feel it necessary to punish you any further. The better you make the officer feel; the more likely he’s going to like you enough to let you go.
5. Ask to see the radar then ask a few questions.
Many jurisdictions require that the officer allow you to see the radar. Don’t press it if the officer says no because that’s what a courtroom is for. But, at least ask, then ask a few more questions to show that you are watching.
You might ask, “When was the last time your radar gun was calibrated?” or “Where were you when you clocked my speed?” or “Were you moving when you clocked my speed?”
Do not ask these in an argumentative tone or sarcastic, know-it-all way. All that will do is make the pride in the officer fight you harder.
6. Plead your case.
Once you’ve gone over some basics with the officer and developed a temporary rapport, ask for mercy. Make it sincere and let the officer know that it’s a big deal to you. Resist all urges to fight and get angry and simply beg as much as your dignity will allow. But, there is no reason to grovel.
7. Leave the scene as a non-memorable, nice person.
If the officer didn’t let you go on the scene, then you want him to never remember you. Your next steps are in a more legal setting, and the less the officer remembers you, the better. Usually, officers only remember you if they want to remember to show you no mercy.
You’ve gotten a ticket, but you still want out
8. Call the officer at work.
Ask politely if you can arrange a time to meet with the officer to talk to him or her about a ticket you got recently. Usually, officers will readily meet with you, the taxpayer, and this meeting has gotten me out of many tickets.
But, don’t go to the meeting and just say, “Will you let me out of this ticket?” You better have a story or some reason to motivate the officer to let you out. That’s just up to you, but just be really nice and try to bridge that officer-civilian gap with a personal story and plead for mercy. The more the officer can identify with you, the more likely he is to want to show you mercy.
Remember always, the officer has full authority to drop your ticket, so remember how important he is in this process. Treat him and pursue him as the gatekeeper to your freedom. Don’t be scared, though. You have a right to try to talk to the officer. You pay his salary.
9. Write a letter to the officer.
Even if you met with the officer, it can’t hurt to write him a letter pleading your case to him. Write it professionally, succinctly, and include complete contact information. I’ve even gone so far as to offer alternative punishment. Although that alternative wasn’t accepted, the officer was pretty surprised at my tenacity, and it motivated him to let me off the hook. He could tell that I really did care about this one ticket.
Make the ticket a bigger deal to you than to him, but you have to carefully do this in a professional, civil way. Anything else, and you’re playing with fire.
10. Repeat calls and letters to the judge and/or the prosecutor.
If the officer won’t listen to you, feel free to contact the judge that will preside over your case. Also, find out who the prosecuting attorney will be and call him at his office. They are just people, and the worst they can say is “no.” You have nothing to lose at this point. Plead your case to either of them, but do not be a pest and be consistently apologetic for the lengths to which you are going to get out of your ticket. You must be sincere, or don’t bother going at all.
In steps 8-10, you stand the risk of being labeled a nuisance or a troublemaker. If you get this impression too much, then bail out with apologies. But, do not be afraid to at least try to talk to the officials face-to-face. They are, after all, public servants, and you are that public.
The court is your friend
11. Follow all court guidelines.
Make the court clerk your best friend. Call the clerk often, and address him or her by first name. You want to make all court employees’ jobs as easy as possible. Also, you do not want to miss any deadlines.
12. Delay.
Once you’ve gotten to know the clerk, ask for as many continuances (delays of your trial) as you can honestly ask for. Do not lie, but do plead for continuances to delay your trial date as long as possible. The farther you are out of the officer’s memory, the better. I have heard of one case where the case was continued so long that the ticketing officer had transferred… case dismissed automatically.
13. Ask for alternative punishment.
Usually, your primary concern is keeping your ticket off your insurance. Many times, court clerks have the authority to let you go to driving school and keep the ticket off your record. Sometimes you have to pay court costs and the ticket, but at least your insurance premiums aren’t going up. This completely depends on the court.
You can’t handle the truth!
14. Understand your trial and your rights.
If you got a ticket, you have been accused of a crime. The ticketing officer signed a sheet of paper swearing that you broke a certain traffic law, and he saw you do it. That sworn statement is called an affidavit, and most tickets say that at the top. Don’t get nervous, though; it’s just a misdemeanor.
First, you’ll have a hearing where you plead guilty, not guilty, or some other plea. Then, you’ll have your trial where you plead your case. Then the judge decides your fate. It’s really not scary at all, and you have every right to participate fully in this process no matter how much you are intimidated.
15. Show up to your first court date and plead anything but guilty.
Whatever you do, show up to your first hearing on time and dressed decently. It’s probably not a good idea to wear a suit, though. In most traffic courts, you’ll look silly. If you really want to know, go scope out the court ahead of time to see what to wear to blend in best.
You’ll then be asked “what you plead.” Pleading not guilty is a safe bet, although there are other pleas (e.g. nolo contendre) that have strange consequences in some courts. In some courts, a plea of nolo contendre has the strange effect of making your ticket just disappear to the court’s files. You’d want to talk to a local lawyer about that one, though.
Most of the time, just politely say, “I plead not guilty, your honor.” You’ll be assigned a court date, and spend the next few weeks repeating steps 8-13. This is your second chance before the big day.
16. Go to court and duke it out.
If all else has failed, you should then go to your trial. Do not miss this out of fear, or you will definitely be found guilty. For instance, if the officer doesn’t show up, for any reason, you’re automatically out of the ticket. This is not unheard of.
Also, you may be able to talk to the officer or prosecutor before trial and cut a deal, just like the real convicts do on TV. If the officer is nervous about his case against you, he might let you off. This just depends on your case, but at least ask.
The trial is pretty simple. The prosecution will present their case against you. You get to respond and call witnesses if you want, and then the prosecution rebuts you. You cannot screw this up. At the very worst, you’re found guilty, and you’ve lost nothing. Do not be scared to do this. It is your right, and you should claim it.
17. Suck it up, or fight on.
The judge will rule on you… guilty, not guilty, or some other punishment. You either take it or appeal it to the court of appeals. Rarely would it be financially wise to appeal a traffic decision, but that is up to you. And you do have the right.
Chances are, you let it die here. Try to make friends with the officer and prosecutor for next time, though.
18. Suck up… err, I mean write more letters.
It can’t hurt to write the officer and prosecutor a letter telling them how nice they were and easy to deal with. Also, copy this letter to the mayor and the chief of police, and make sure you show the cc: at the bottom of the letter. That’s your investment in next time.
Rage against the machine (without all the rage)
This stuff isn’t rocket science. You’re just dealing with people and trying to get them to see things your way. You have very little to lose, and it’s a fun way to get to participate in the very government under which you live. I encourage all of you to employ all these steps in a friendly, civil way. Forget everything you’ve learned about courtrooms and lawyers and cops, and just go in there as a human being. It’s your right, and it can really be fun and exciting. Think of it as your own personal crusade, and, if you push on, you will be amazed at how easy it is to find justice.
Slow it down there, speedy. This is not legal advice. I am not a lawyer, but I am a law student. These are generalized discussions of life experiences, and any legal statements are simply journalistic opinion and fact. If you’ve got real problems, remember everything you’ve learned about lawyers, and go hire one.
Stewart Rutledge is in his final year of law school at the University of Mississippi.
I have some issues with this post.
NEVER talk to the officer about his radar gun until trial. The only things you should say to the officer is “Here my license, registration, and insurance, sir” and “Thank you”.
After the ticket has been issued, write to the police department and Request Discovery concerning any notes the officer wrote or recorded about the incident. You can also ask for any details about the radar gun at this time and they should provide them in the discovery. Use certified mail, return receipt, to make your request. There are many books in your library that can show you how to write this letter.
When you make your initial appearance, ask for a jury trial. Some states allow them for traffic offenses such as speeding tickets. It’s usually a six person jury. This is a big hassle for the courts. They won’t tell you it’s available. You have to request it.
If you can get a jury trial, call the prosecutor’s office a week or two after your initial appearance and ask if they want to cut a deal.
Write out all your questions to the officer before trial. Refine them. Never ask a question that you don’t know the answer to.
If the officer fails to show up, Request For Discovery is ignored, or any other weird thing happens, ask the judge for dismissal of charges.
I would never call or write the officer. Once they write the ticket, it is almost out of their hands. It’s up to the local prosecutor and, eventually, a judge, to agree to dismiss charges.
Following up scoobydoo’s comment, I read a long time ago that the best strategy is to not admit it, but to simply say you just don’t know and were occupied by something else (nothing that makes it sound like you were driving unsafely).
I’ve only been pulled over once since reading that advice and it worked like a charm. I told the cop I was very sorry if I was going that fast. I was talking to the passenger in the car and hadn’t noticed. He let me off with a warning.
Moreover, I think admitting it “vehemently” is contrary to being not very memorable. I mean, how many people do you think admit to the cop that he’s right?
Another tip: if you’ve already been ticketed, you automatically have a court date and a lawyer. If it’s your first offense, call your lawyer, and tell them that you have never had a ticket, and that you are (clearly) an obedient driver. Then, ask for a “stay of judification” — wherein if you don’t get another ticket for 6 or 9 months, the ticket will not go on your record (but you will still have to pay the fine). I did this, and it worked for me – never had to go to court, and 6 months later, the ticket is gone (insurance never sees it).
I am a police dispatcher, and I agree with everything in this post. A lot of people don’t realize exactly what is going on during a traffic stop, so I’ll try and give you some insight.
First and foremost, you have to realize that a traffic stop is one of the most dangerous calls an officer can take. More officers have been killed in routine traffic stops than any other situation. Needless to say, officers are always cautious, if not overly cautious.
After the officer first pulls you over, the pause that seems to take hours is actually the officer running a clearance on your license plate to get registration information, as well as whether the plate/vehicle is stolen. During this, don’t do anything. The officer can see you moving in your car, and you reaching into your glovebox for your insurance may look to him (or her) like you getting your gun out.
Once the officer approaches, he’ll look first for your hands on the wheels, and he’ll want to see them the whole time. Once he comes up and asks for your information, tell him where you’re going to reach, and what you’re grabbing. Make your movements slow, don’t jump. He’ll go back to his car, and then you’ve got another long pause while he compares the information you gave him with the computer. He will also run your name for clearance, making sure you don’t have any outstanding warrants. Depending on how common your last name is or how busy the system is, this can take a little while.
The most helpful thing you can do, in my opinion, is be respectful. The officer didn’t pull you over because they felt like it – they’re just doing their job.
And no, working for the police doesn’t always get you out of speeding ticket – trust me
here’s some good comments… here’s mine:
Don’t delay. There’s a system in place – use it to your advantage. Immediately file for discovery. Ask for everything including the kitchen sink – well, maybe not that. But ask for duty logs, radar gun certification, officer’s training record (has he been trained in the use of that model of radar gun, etc, etc).
Make sure you send all discovery requests to the clerk of the court AND the prosecutor. They probably won’t satisfy your request. That’s #1 in your favour.
When you get your day in court make sure that your discovery motion was satisfied. If not tell the judge. They cannot (to my knowledge – but I’m not a lawyer) deny your discovery.
Do not under any circumstances waive your right to a speady trial.
Finally, if you do get to court and you get you discovery satisfied… you still have a good chance.
In many cases the police officer will be there. The judge will be there. But the DA/prosecutor might not (they’re too busy for traffic court). If there’s no prosecution there, then there’s noone to call witnesses for the prosecution. The judge is an impartial (ya, right) adjudicator. He does not act for either the defense or the prosecution…
Not sure how this varies from other states but in New York, the accused has the right to ask for a “Supporting Deposition.” Basically this is a statement from the officer supporting that what was written on the ticket was true. (I think the ticket is actually an abbreviation of what the charge document should be for convenience sake, you are just asking for the fomal charging document. I think that is so but don’t quote me.) You have a timeframe in which you can ask for it and the officer has a timeframe in which he/she HAS to provide it. If they don’t, the case can be dropped, just like if the cop doesn’t show up for trial.
I had one ticket where they didn’t do it at all so as soon as I showed my letter asking for the supporting deposition, the judge dropped both tickets before I even had to plea. In the second, they handed it to me when I got there. I has printed out the law on it and showed the judge that they did not deliver it in the timeframe and he agreed and threw the case out. Finally, I received another ticket while visiting friends in a small town and went into the courthouse to request it in person. The clerk asked me why I wanted it, told me I didn’t need it (boarderline unethical) but finally asked to look at my ticket. She said hang on, left and came back with the cop who wrote me the ticket. He was in the back doing paperwork and I waited while he wrote it out. Luckily that one was a violation with a smaller fine.
I have several friends who have also gotten out of tickets this way, I think the tally is something like 12 to 2 in favor of getting the charges dropped because of what I taught them about it. I never had trouble getting friends help me move when I was just out of college, they all owed me in their eyes.
This is full of legalize, but here is a case that supports this. If you get a ticket in NY, know the Supporting Deposition laws and ALWAYS request one. If you are not in NY, talk to a lawyer friend to see if your state has something similar
http://www.newyorknylawfirm.com/newyorklawfirm3.html
ZT: Timemanagement for managers
http://management.monster.com/featuredreports/new-…
Time Management for Managers
by Matt Krumrie
Monster Contributing Writer
It’s 8 p.m., and Mary is still at the office. Sighing as she answers her final email for the night, she thinks back over the day.
“This isn’t the job I was hired to do,” she grumbles. “Instead of the project and people management I love, all I’m doing is babysitting and dealing with one crisis after another.”
If you’re a manager, you may have been in this situation. Sometimes there just doesn’t seem to be enough time to get things done. But other people do it, and so can you.
“Have you ever wondered how some extremely successful people not only get it all done, but also have time for vacations, trips and golf?” says Kathy Gillen, president of executive coaching company The Gillen Group in Elk River, Minnesota. “It’s because they have managed a way to figure out how to manage their time.”
Let’s face it: There isn’t a day that goes as planned for most busy managers. That’s what management is — juggling tasks to achieve a common goal and ultimately better the whole organization.
“When’s the last day you didn’t have a high-priority phone call, an urgent email or a stressed-out colleague begging for attention?” says Tom Gegax, founder of Gegax Management Systems in Minneapolis and author of By the Seat of Your Pants: The No-Nonsense Business Management Guide. “Getting pulled off-course is in every leader’s job description. That’s why enlightened managers must have a strategy for dealing with daily interruptions.”
The Six D’s
Gegax bases his time-management principles on the “six D’s”: don’t do it, delay it, deflect it, delegate it, do it imperfectly and do it.
“When something pops ups, rather than robotically just doing it, I start with the first option,” Gegax says. “If that doesn’t apply, I move on to the second. I keep cruising down the list until I reach the appropriate action.”
For instance, many seemingly urgent tasks disappear if you don’t do them or delay them, he says, leaving you more time and energy to focus on the tasks that matter.
And while some flare-ups need immediate attention, your involvement isn’t always required. Carefully consider whether to deflect the situation to another department or delegate it to a subordinate, Gegax advises.
If you do opt to tackle the problem yourself, Gegax cautions against automatically shifting into “perfectionist mode.”
“A large number of my projects could hardly be described as perfect, yet were successful nevertheless,” he says.
Of course, reserve the final “D” — do it — for the tasks you’ve determined will keep you moving toward your goals.
The Multitasking Trap
Multitasking may seem like a way to productively “juggle” numerous tasks, but it actually prevents you from getting things accomplished, says Laura Stack, president of Denver-based consultancy The Productivity Pro and author of Leave the Office Earlier. She offers these tips on how to better manage your time and stay focused:
- Batch: Email kills your concentration. Turn off the notification function on your email program. Set aside a specific number of times per day to check and deal with your email.
- Prioritize: Don’t get sidelined by interruptions. If you’re working on the last-minute details of a report for a meeting that starts in 30 minutes, don’t accept a drop-in visitor’s request to “ask you something really quick.”
- Control Self-Interruption: Many times you interrupt yourself. You’re sitting at your desk when all of a sudden, your brain starts talking to you. “Oh, I need to tell Chris this,” it says, and you pick up the phone or dash off an email to “blurt” out whatever you were thinking about before you forget. Instead, get yourself a three-ring binder, some loose-leaf paper and A-Z tabs. Create a sheet of paper for each person with whom you communicate frequently. When your brain reminds you of something, simply turn to that person’s communication log. Jot down the thought or idea, and then go back to what you were doing. When that person’s log has several thoughts saved up, call the person and set up a meeting or phone conference.


