action GetHandleText@( 0 ) {
//【説明】
//プロパティ『C_WinClass』に設定されたクラス文字列から、
//ハンドルおよびウィンドウの文字列を取得します。
//【使い方】
//プロパティ『C_WinClass』にクラス文字列を設定し、
//この関数をCallしてください。
//プロパティ『C_WindowHandle』にハンドル、『C_WindowText』に
//ウインドウの文字列を返します。
//ウィンドウクラスからハンドルを取得
PutProperty( "C_WindowHandle", GetProperty("FindWindow://" + GetProperty("C_WinClass")) );
//ハンドルからウィンドウクラスに設定されている文字列を取得
PutProperty( "C_WindowText", GetProperty("WindowText://" + GetProperty("C_WindowHandle") ) );
}
action GetHandle_test@( 0 ) {
//Word
PutProperty( "C_WinClass", "OpusApp" );
Call( GetHandleText );
Talk( GetProperty("C_WindowHandle") + " " + GetProperty("C_WindowText") +"\n" );
//秀丸
PutProperty( "C_WinClass", "Hidemaru32Class" );
Call( GetHandleText );
Talk( GetProperty("C_WindowHandle") + " " + GetProperty("C_WindowText") +"\n" );
//Outlook Express 5.0
PutProperty( "C_WinClass", "C_WindowHandle" );
Call( GetHandleText );
Talk( GetProperty("C_WindowHandle") + " " + GetProperty("C_WindowText") +"\n" );
//Internet Explorer 5.0
PutProperty( "C_WinClass", "IEFrame" );
Call( GetHandleText );
Talk( GetProperty("C_WindowHandle") + " " + GetProperty("C_WindowText") +"\n" );
//ViewDic
PutProperty( "C_WinClass", "ViewDicClassName" );
Call( GetHandleText );
Talk( GetProperty("C_WindowHandle") + " " + GetProperty("C_WindowText") +"\n" );
//WWWC 0.9.3
PutProperty( "C_WinClass", "WWWCMainWindowClass" );
Call( GetHandleText );
Talk( GetProperty("C_WindowHandle") + " " + GetProperty("C_WindowText") +"\n" );
//メモ帳 5.0
PutProperty( "C_WinClass", "Notepad" );
Call( GetHandleText );
Talk( GetProperty("C_WindowHandle") + " " + GetProperty("C_WindowText") +"\n" );
//電卓 5.0
PutProperty( "C_WinClass", "SciCalc" );
Call( GetHandleText );
Talk( GetProperty("C_WindowHandle") + " " + GetProperty("C_WindowText") +"\n" );
//NC4.5
PutProperty( "C_WinClass", "Afx:400000:b:10011:6:f095d" );
Call( GetHandleText );
// Afx:400000:b:10011:6:24502a5
Talk( GetProperty("C_WindowHandle") + " " + GetProperty("C_WindowText") +"\n" );
//Microsoft Access
PutProperty( "C_WinClass", "OMain" );
Call( GetHandleText );
Talk( GetProperty("C_WindowHandle") + " " + GetProperty("C_WindowText") +"\n" );
//Visual Basic Ver.5.0
PutProperty( "C_WinClass", "wndclass_desked_gsk" );
Call( GetHandleText );
Talk( GetProperty("C_WindowHandle") + " " + GetProperty("C_WindowText") +"\n" );
//Photoshop
PutProperty( "C_WinClass", "Photoshop" );
Call( GetHandleText );
Talk( GetProperty("C_WindowHandle") + " " + GetProperty("C_WindowText") +"\n" );
//RealPlayer
PutProperty( "C_WinClass", "Progressive Networks RVPlayer" );
Call( GetHandleText );
Talk( GetProperty("C_WindowHandle") + " " + GetProperty("C_WindowText") +"\n" );
//Internet Explorer 4.0
PutProperty( "C_WinClass", "CabinetWClass" );
Call( GetHandleText );
Talk( GetProperty("C_WindowHandle") + " " + GetProperty("C_WindowText") +"\n" );
}
|