This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param( | |
$itemNum = 5 | |
) | |
# SeleniumVBAを用いてChromeを操作 _______________________________ | |
# _______________________________________________________________ | |
$driver = New-Object -ComObject SeleniumWrapper.WebDriver | |
$driver.start("chrome", "http://www.google.com") | |
$driver.open("/") | |
$driver.findElementByName("q",1000).SendKeys("メタ構文") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Sub CreateMail(mailAddress as String) | |
Dim subject As String: subject = "案内状" | |
Dim sig As String: sig = ReadAllText("C:\Users\yamakawa\AppData\Roaming\Microsoft\Signatures\通常.txt") | |
Dim StrBody As String: StrBody = "ほげほげ株式会社" & vbCrLf & _ | |
"ふがふが様" & vbCrLf & _ | |
vbCrLf & _ | |
"中略。以上。" & vbCrLf & _ | |
vbCrLf & _ | |
sig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ptでgrep検索するマクロ (β) | |
実行結果は「アウトプット枠」へ書き出します。 | |
【特徴】 | |
ptでのgrep結果を即座に確認できます。 | |
【動作環境】 | |
秀丸エディタ ver8.01 で動作を確認。(ver8 以降なら動くはず。) | |
【インストール】 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub StartFirefox() | |
Dim driver As New SeleniumWrapper.WebDriver | |
Call driver.start("firefox", "http://www.google.com/") | |
End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) | |
'1.添付ファイルを添付し忘れていないか確認 | |
Call CheckAttachment(Item, Cancel) | |
'2.BCCに指定したアドレス(自分のアドレス)を追加 | |
Call SetBCC("[email protected]", Item, Cancel) | |
'3. メール送信時に、開封確認を要求するか設定 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub CreateMailByOutlook(address As String, _ | |
subject As String, body As String) | |
Dim OL: Set OL = CreateObject("Outlook.Application") | |
Dim ML: Set ML = OL.CreateItem(olMailItem) | |
ML.To = address | |
ML.subject = subject | |
ML.Body = body | |
'ML.Save |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub CreateMailByThunderbird(address As String, _ | |
subject As String, body As String) | |
Dim sPath, encodedSubject | |
With CreateObject("ScriptControl") | |
.Language = "JScript" | |
encodedSubject = .CodeObject.encodeURI(subject) | |
End With | |
sPath = "D:\Hogehoge\Thunderbird.exe -osint -compose " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Sub SearchByGoogle() | |
Dim driver As New SeleniumWrapper.WebDriver | |
driver.Start "firefox", "https://www.google.co.jp/" | |
driver.get ("/") | |
driver.findElementById("lst-ib").SendKeys "Selenium" | |
driver.findElementByName("btnK").Click | |
End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private driver As SeleniumWrapper.WebDriver | |
Private Sub InitializeWebDriver() | |
Set driver = New SeleniumWrapper.WebDriver | |
Call driver.Start("firefox", "http://192.168.1.1/") | |
End sub | |
Private Sub Login() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private xItems As Variant | |
Private xLength As Long | |
Private xIndex As Long | |
Private Sub Class_Initialize() | |
xIndex = -1 | |
xLength = 32 | |
ReDim xItems(xLength - 1) | |
End Sub |