Skip to content

Instantly share code, notes, and snippets.

@kumatti1
kumatti1 / Module1.bas
Last active November 16, 2020 02:28
InternetExplorerManager
Private WithEvents ie As SHDocVw.InternetExplorer
Sub test()
Dim pUnk As hoge.InternetExplorerManager
Set pUnk = New InternetExplorerManager
Dim hr As Long
Dim u As UUID
hr = hoge.IIDFromString(hoge.IID_IWebBrowser2, u)
@kumatti1
kumatti1 / ie_yahoo.cpp
Last active December 29, 2015 01:49
C++でInternet Explorer Manager
#import "ieframe.dll"
#import "mshtml.tlb"
#import "Ieautomation.tlb"
#include <Windows.h>
#define URI L"https://login.yahoo.co.jp/config/login_verify2?.src=ym"
HRESULT GetSub()
{
@kumatti1
kumatti1 / UserForm1.frm
Last active December 29, 2015 01:58
ATL の ActiveX コンテナ
Private Declare Function WindowFromAccessibleObject Lib "oleacc.dll" ( _
ByVal IAcessible As Object, _
ByRef hwnd As LongPtr _
) As Long
#If Win64 Then
Private Declare _
Function SetWindowLongPtrW Lib "user32.dll" ( _
ByVal hwnd As LongPtr, _
ByVal nIndex As Long, _
@kumatti1
kumatti1 / UserForm1.frm
Last active December 29, 2015 03:48
MSHTML.IHTMLWindow2
Option Explicit
'要参照設定
'Microsoft HTML Object Library
Private WithEvents m_Doc As MSHTML.HTMLDocument
Private p As MSHTML.IHTMLWindow2
Private flg As Boolean
Private Sub UserForm_Initialize()
@kumatti1
kumatti1 / Ponta.vbs
Created December 3, 2013 02:27
ポンタにログイン
Dim ie
Const url = "https://www.ponta.jp/u/LWAS900/SLWAS900010.htm"
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.Navigate url
While ie.busy Or ie.ReadyState <> 4
WScript.Sleep (100)
Wend
@kumatti1
kumatti1 / Module1.bas
Last active June 22, 2019 08:56
マウスカーソル直下の要素を取得
'目的の要素を選択
Sub Main()
Application.OnTime Now + TimeSerial(0, 0, 2), "GetSub"
End Sub
@kumatti1
kumatti1 / waon.vbs
Created December 8, 2013 04:12
WAONにログイン
Dim ie
Const url = "https://www.waon.com/wmUseHistoryInq/init.do"
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.Navigate url
While ie.busy Or ie.ReadyState <> 4
WScript.Sleep (100)
Wend
@kumatti1
kumatti1 / Class1.cls
Last active January 31, 2023 22:07
IE通知バー制御
Option Explicit
Implements IUIAutomationEventHandler
Private Sub IUIAutomationEventHandler_HandleAutomationEvent(ByVal sender As UIAutomationClient.IUIAutomationElement, ByVal eventId As Long)
Dim iElemFound As IUIAutomationElement
Set iElemFound = GetElement(o, sender, "はい(Y)", 0)
If iElemFound Is Nothing Then Exit Sub
If iElemFound.CurrentName = "はい(Y)" Then
Dim InvokePattern As IUIAutomationInvokePattern
@kumatti1
kumatti1 / Module1.bas
Created December 31, 2013 01:01
VBAでのTaskDialogIndirect
Option Explicit
Enum ICONS
TD_WARNING_ICON = 65535
TD_ERROR_ICON = 65534
TD_INFORMATION_ICON = 65533
TD_SHIELD_ICON = 65532
End Enum