Explore / Human–AI dialogue Add-Type -AssemblyName System.Windows.Forms Add-Type -AssemblyName System.Drawing Create… Save Share Download ▾ ReportAdd-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
Create the main form window
f o r m = N e w − O b j e c t S y s t e m . W i n d o w s . F o r m s . F o r m form = New-Object System.Windows.Forms.Form
f or m = N e w − O bj ec tS y s t e m . W in d form.Text = 'Merge Images to PDF'
form.StartPosition = 'CenterScreen'
Show full message · 169 lines AssistantCopy response Copy first prompt
Other models, same or similar prompt Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Details Provider mistral
Model provenance As recorded by source dataset
Turns 1 (2 messages)
Language en
Added to archive Nov 23, 2026
ID 01m850pt4nn9k3hrfkf6dn7cwrSource & license Imported from LMArena Human Preference 100K (source ). Imported records earn no Research Points.
Upstream record: 50854d68d83a4d7b9311a5ebd4cf6a38:a
lmarena-ai/arena-human-preference-100k, revision 72e85b3ddc9c81bf7b659d6b03d4126dfd8fb34a. Real LMArena battles (2024): each user prompt answered by two anonymous models; each side imported as its own conversation. Fills 2024 model gaps (Claude 3/3.5, Gemini 1.5, Llama 3/3.1, GPT-4 Turbo). Exact duplicates of the archive's existing Arena datasets are skipped. Dialogue normalized; system instructions, tools and private metadata omitted.
License: Prompts CC-BY-4.0; outputs governed by provider terms
o
w
s
.
F
or
m
s
.
F
or
m
f o r m . S i z e = N e w − O b j e c t S y s t e m . D r a w i n g . S i z e ( 900 , 500 ) form.Size = New-Object System.Drawing.Size(900,500)
f or m . S i z e = N e w − O bj ec tS y s t e m . D r a w in g . S i z e ( 900 , 500 )
Label for the folder selection prompt l a b e l = N e w − O b j e c t S y s t e m . W i n d o w s . F o r m s . L a b e l label = New-Object System.Windows.Forms.Label
l ab e l = N e w − O bj ec tS y s t e m . W in d o w s . F or m s . L ab e l label.Location = New-Object System.Drawing.Point(10,20)
l a b e l . S i z e = N e w − O b j e c t S y s t e m . D r a w i n g . S i z e ( 380 , 20 ) label.Size = New-Object System.Drawing.Size(380,20)
l ab e l . S i z e = N e w − O bj ec tS y s t e m label.Text = 'Select the folder containing images:'
f o r m . C o n t r o l s . A d d ( form.Controls.Add( f or m . C o n t r o l s . A dd ( label)
TextBox for displaying the selected folder path t e x t B o x = N e w − O b j e c t S y s t e m . W i n d o w s . F o r m s . T e x t B o x textBox = New-Object System.Windows.Forms.TextBox
t e x tB o x = N e w − O bj ec tS y s t e m . W in d o w s . F or m s . T e x tB o x textBox.Location = New-Object System.Drawing.Point(10,40)
t e x t B o x . S i z e = N e w − O b j e c t S y s t e m . D r a w i n g . S i z e ( 260 , 20 ) textBox.Size = New-Object System.Drawing.Size(260,20)
t e x tB o x . S i z e = N e w − O bj ec tS y s form.Controls.Add($textBox)
Button for browsing the folder b u t t o n = N e w − O b j e c t S y s t e m . W i n d o w s . F o r m s . B u t t o n button = New-Object System.Windows.Forms.Button
b u tt o n = N e w − O bj ec tS y s t e m . W in d o w s . F or m s . B u tt o n button.Location = New-Object System.Drawing.Point(280,38)
b u t t o n . S i z e = N e w − O b j e c t S y s t e m . D r a w i n g . S i z e ( 100 , 25 ) button.Size = New-Object System.Drawing.Size(100,25)
b u tt o n . S i z e = N e w − O bj ec tS y s t e button.Text = 'Browse'
button.Add_Click({
folderBrowser = New-Object System.Windows.Forms.FolderBrowserDialog
if (folderBrowser.ShowDialog() -eq 'OK') {
textBox.Text = f o l d e r B r o w s e r . S e l e c t e d P a t h U p d a t e − L i s t V i e w folderBrowser.SelectedPath
Update-ListView f o l d er B r o w ser . S e l ec t e d P a t h U p d a t e − textBox.Text
}
})
f o r m . C o n t r o l s . A d d ( form.Controls.Add( f or m . C o n t r o l s . A dd ( button)
"Select All" button s e l e c t A l l B u t t o n = N e w − O b j e c t S y s t e m . W i n d o w s . F o r m s . B u t t o n selectAllButton = New-Object System.Windows.Forms.Button
se l ec t A l l B u tt o n = N e w − O bj ec tS y s t e m . W in d o w s . F or m s . B u tt o n selectAllButton.Location = New-Object System.Drawing.Point(10, 410)
s e l e c t A l l B u t t o n . S i z e = N e w − O b j e c t S y s t e m . D r a w i n g . S i z e ( 75 , 23 ) selectAllButton.Size = New-Object System.Drawing.Size(75,23)
se l ec t A l l B u tt o n . S i z e = N e w selectAllButton.Text = 'Select All'
selectAllButton.Add_Click({
foreach ( item in listView.Items) {
item.Checked = true
}
})
form.Controls.Add($selectAllButton)
"Deselect All" button d e s e l e c t A l l B u t t o n = N e w − O b j e c t S y s t e m . W i n d o w s . F o r m s . B u t t o n deselectAllButton = New-Object System.Windows.Forms.Button
d ese l ec t A l l B u tt o n = N e w − O bj ec tS y s t e m . W in d o w s . F or m s . B u tt o n deselectAllButton.Location = New-Object System.Drawing.Point(100, 410)
d e s e l e c t A l l B u t t o n . S i z e = N e w − O b j e c t S y s t e m . D r a w i n g . S i z e ( 85 , 23 ) deselectAllButton.Size = New-Object System.Drawing.Size(85,23)
d ese l ec t A l l B u tt o n . S i z e = N e w deselectAllButton.Text = 'Deselect All'
deselectAllButton.Add_Click({
foreach ( item in listView.Items) {
item.Checked = false
}
})
form.Controls.Add($deselectAllButton)
ListView for displaying the image files l i s t V i e w = N e w − O b j e c t S y s t e m . W i n d o w s . F o r m s . L i s t V i e w listView = New-Object System.Windows.Forms.ListView
l i s t V i e w = N e w − O bj ec tS y s t e m . W in d o w s . F or m s . L i s t V i e w listView.Location = New-Object System.Drawing.Point(10,70)
l i s t V i e w . S i z e = N e w − O b j e c t S y s t e m . D r a w i n g . S i z e ( 870 , 300 ) listView.Size = New-Object System.Drawing.Size(870,300)
l i s t V i e w . S i z e = N e w − O bj ec listView.View = [System.Windows.Forms.View]::Details
l i s t V i e w . C h e c k B o x e s = listView.CheckBoxes = l i s t V i e w . C h ec k B o x es = true
l i s t V i e w . F u l l R o w S e l e c t = listView.FullRowSelect = l i s t V i e w . F u l l R o w S e l ec t = true
l i s t V i e w . C o l u m n s . A d d ( ′ I m a g e F i l e s ′ , − 2 , [ S y s t e m . W i n d o w s . F o r m s . H o r i z o n t a l A l i g n m e n t ] : : L e f t ) listView.Columns.Add('Image Files', -2, [System.Windows.Forms.HorizontalAlignment]::Left)
l i s t V i e w . C form.Controls.Add($listView)
"Merge" button o k B u t t o n = N e w − O b j e c t S y s t e m . W i n d o w s . F o r m s . B u t t o n okButton = New-Object System.Windows.Forms.Button
o k B u tt o n = N e w − O bj ec tS y s t e m . W in d o w s . F or m s . B u tt o n okButton.Location = New-Object System.Drawing.Point(10,380)
o k B u t t o n . S i z e = N e w − O b j e c t S y s t e m . D r a w i n g . S i z e ( 75 , 23 ) okButton.Size = New-Object System.Drawing.Size(75,23)
o k B u tt o n . S i z e = N e w − O bj ec tS y okButton.Text = 'Merge'
okButton.Add_Click({
selectedFiles = listView.Items | Where-Object { _.Checked } | ForEach-Object { _.Tag }
if ( selectedFiles.Count -eq 0) {
[System.Windows.Forms.MessageBox]::Show("No files selected.", "No Selection", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Warning)
return
}
Merge-ImageToPDF -ImagePaths s e l e c t e d F i l e s − O u t p u t P a t h " selectedFiles -OutputPath " se l ec t e d F i l es − O u tp u tP a t h " (t e x t B o x . T e x t ) \MergedImages . p d f " − S h o w − R e s i z e T o F i t A 4 textBox.Text)\MergedImages.pdf" -Show -ResizeToFitA4
t e x tB o x . T e x t ) \MergedImages . p df " − S h o w − R es i form.Close()
})
f o r m . C o n t r o l s . A d d ( form.Controls.Add( f or m . C o n t r o l s . A dd ( okButton)
ComboBox for selecting the sort order c o m b o B o x = N e w − O b j e c t S y s t e m . W i n d o w s . F o r m s . C o m b o B o x comboBox = New-Object System.Windows.Forms.ComboBox
co mb o B o x = N e w − O bj ec tS y s t e m . W in d o w s . F or m s . C o mb o B o x comboBox.Location = New-Object System.Drawing.Point(390, 40)
c o m b o B o x . S i z e = N e w − O b j e c t S y s t e m . D r a w i n g . S i z e ( 120 , 20 ) comboBox.Size = New-Object System.Drawing.Size(120, 20)
co mb o B o x . S i z e = N e w − O bj ec tS y comboBox.DropDownStyle = [System.Windows.Forms.ComboBoxStyle]::DropDownList
c o m b o B o x . I t e m s . A d d ( ′ N a m e ′ ) comboBox.Items.Add('Name')
co mb o B o x . I t e m s . A dd ( ′ N am e ′ ) comboBox.Items.Add('Date Modified')
c o m b o B o x . I t e m s . A d d ( ′ S i z e ′ ) comboBox.Items.Add('Size')
co mb o B o x . I t e m s . A dd ( ′ S i z e ′ ) comboBox.SelectedIndex = 0
f o r m . C o n t r o l s . A d d ( form.Controls.Add( f or m . C o n t r o l s . A dd ( comboBox)
Add an event handler to the ComboBox to refresh the ListView on selection change comboBox.add_SelectedIndexChanged({
if ( textBox.Text -ne "") { # Only refresh if a folder is already selected
Update-ListView $textBox.Text
}
})
"Move Up" button m o v e U p B u t t o n = N e w − O b j e c t S y s t e m . W i n d o w s . F o r m s . B u t t o n moveUpButton = New-Object System.Windows.Forms.Button
m o v e U pB u tt o n = N e w − O bj ec tS y s t e m . W in d o w s . F or m s . B u tt o n moveUpButton.Location = New-Object System.Drawing.Point(200, 410)
m o v e U p B u t t o n . S i z e = N e w − O b j e c t S y s t e m . D r a w i n g . S i z e ( 75 , 23 ) moveUpButton.Size = New-Object System.Drawing.Size(75,23)
m o v e U pB u tt o n . S i z e = N e w − moveUpButton.Text = 'Move Up'
moveUpButton.Add_Click({
selectedItems = l i s t V i e w . S e l e c t e d I t e m s i f ( listView.SelectedItems
if ( l i s t V i e w . S e l ec t e d I t e m s i f ( selectedItems.Count -eq 1) {
s e l e c t e d I t e m = selectedItem = se l ec t e d I t e m = selectedItems[0]
i n d e x = index = in d e x = selectedItem.Index
if (index -gt 0) {
listView.Items.RemoveAt(i n d e x ) index)
in d e x ) listView.Items.Insert(i n d e x − 1 , index - 1, in d e x − 1 , selectedItem)
s e l e c t e d I t e m . S e l e c t e d = selectedItem.Selected = se l ec t e d I t e m . S e l ec t e d = true
s e l e c t e d I t e m . F o c u s e d = selectedItem.Focused = se l ec t e d I t e m . F oc u se d = true
}
}
})
f o r m . C o n t r o l s . A d d ( form.Controls.Add( f or m . C o n t r o l s . A dd ( moveUpButton)
"Move Down" button m o v e D o w n B u t t o n = N e w − O b j e c t S y s t e m . W i n d o w s . F o r m s . B u t t o n moveDownButton = New-Object System.Windows.Forms.Button
m o v eD o w n B u tt o n = N e w − O bj ec tS y s t e m . W in d o w s . F or m s . B u tt o n moveDownButton.Location = New-Object System.Drawing.Point(290, 410)
m o v e D o w n B u t t o n . S i z e = N e w − O b j e c t S y s t e m . D r a w i n g . S i z e ( 75 , 23 ) moveDownButton.Size = New-Object System.Drawing.Size(75,23)
m o v eD o w n B u tt o n . S i z e = N e w − moveDownButton.Text = 'Move Down'
moveDownButton.Add_Click({
selectedItems = l i s t V i e w . S e l e c t e d I t e m s i f ( listView.SelectedItems
if ( l i s t V i e w . S e l ec t e d I t e m s i f ( selectedItems.Count -eq 1) {
s e l e c t e d I t e m = selectedItem = se l ec t e d I t e m = selectedItems[0]
i n d e x = index = in d e x = selectedItem.Index
if (i n d e x − l t index -lt in d e x − l t listView.Items.Count - 1) {
l i s t V i e w . I t e m s . R e m o v e A t ( listView.Items.RemoveAt( l i s t V i e w . I t e m s . R e m o v e A t ( index)
l i s t V i e w . I t e m s . I n s e r t ( listView.Items.Insert( l i s t V i e w . I t e m s . I n ser t ( index + 1, s e l e c t e d I t e m ) selectedItem)
se l ec t e d I t e m ) selectedItem.Selected = t r u e true
t r u e selectedItem.Focused = true
}
}
})
form.Controls.Add($moveDownButton)
Function to update the ListView with image files function Update-ListView {
param ([string]p a t h ) path)
p a t h ) listView.Items.Clear()
f i l e s = G e t − C h i l d I t e m − P a t h files = Get-ChildItem -Path f i l es = G e t − C hi l d I t e m − P a t h path -File | Where-Object { $_.Extension -in @(".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff") }
code Copy code
# Sort the files based on ComboBox selection
switch ($comboBox.SelectedItem) {
'Name' { $files = $files | Sort-Object -Property Name }
'Date Modified' { $files = $files | Sort-Object -Property LastWriteTime }
'Size' { $files = $files | Sort-Object -Property Length }
}
if ($files.Count -eq 0) {
[System.Windows.Forms.MessageBox]::Show("No image files found.", "No Files Found", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Information)
}
foreach ($file in $files) {
$item = New-Object System.Windows.Forms.ListViewItem($file.Name)
$item.Tag = $file.FullName
$listView.Items.Add($item)
}
Show the form $form.ShowDialog() # add option for user to customize merged file name, default name is displayed
To add an option for the user to customize the merged file name, you can include a TextBox where the user can input the desired file name. Additionally, you can set a default file name that can be edited by the user. Here is the modified code with this functionality:
powershell Copy code
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
# Create the main form window
$form = New-Object System.Windows.Forms.Form
$form.Text = 'Merge Images to PDF'
$form.Size = New-Object System.Drawing.Size(900,500)
$form.StartPosition = 'CenterScreen'
# Label for the folder selection prompt
$label = New-Object System.Windows.Forms.Label
$label.Location = New-Object System.Drawing.Point(10,20)
$label.Size = New-Object System.Drawing.Size(380,20)
$label.Text = 'Select the folder containing images:'
$form.Controls.Add($label)
# TextBox for displaying the selected folder path
$textBox = New-Object System.Windows.Forms.TextBox
$textBox.Location = New-Object System.Drawing.Point(10,40)
$textBox.Size = New-Object System.Drawing.Size(260,20)
$form.Controls.Add($textBox)
# Button for browsing the folder
$button = New-Object System.Windows.Forms.Button
$button.Location = New-Object System.Drawing.Point(280,38)
$button.Size = New-Object System.Drawing.Size(100,25)
$button.Text = 'Browse'
$button.Add_Click({
$folderBrowser = New-Object System.Windows.Forms.FolderBrowserDialog
if ($folderBrowser.ShowDialog() -eq 'OK') {
$textBox.Text = $folderBrowser.SelectedPath
Update-ListView $textBox.Text
}
})
$form.Controls.Add($button)
# "Select All" button
$selectAllButton = New-Object System.Windows.Forms.Button
$selectAllButton.Location = New-Object System.Drawing.Point(10, 410)
$selectAllButton.Size = New-Object System.Drawing.Size(75,23)
$selectAllButton.Text = 'Select All'
$selectAllButton.Add_Click({
foreach ($item in $listView.Items) {
$item.Checked = $true
}
})
$form.Controls.Add($selectAllButton)
# "Deselect All" button
$deselectAllButton = New-Object System.Windows.Forms.Button
$deselectAllButton.Location = New-Object System.Drawing.Point(100, 410)
$deselectAllButton.Size = New-Object System.Drawing.Size(85,23)
$deselectAllButton.Text = 'Deselect All'
$deselectAllButton.Add_Click({
foreach ($item in $listView.Items) {
$item.Checked = $false
}
})
$form.Controls.Add($deselectAllButton)
# ListView for displaying the image files
$listView = New-Object System.Windows.Forms.ListView
$listView.Location = New-Object System.Drawing.Point(10,70)
$listView.Size = New-Object System.Drawing.Size(870,300)
$listView.View = [System.Windows.Forms.View]::Details
$listView.CheckBoxes = $true
$listView.FullRowSelect = $true
$listView.Columns.Add('Image Files', -2, [System.Windows.Forms.HorizontalAlignment]::Left)
$form.Controls.Add($listView)
# "Merge" button
$okButton = New-Object System.Windows.Forms.Button
$okButton.Location = New-Object System.Drawing.Point(10,380)
$okButton.Size = New-Object System.Drawing.Size(75,23)
$okButton.Text = 'Merge'
$okButton.Add_Click({
$selectedFiles = $listView.Items | Where-Object { $_.Checked } | ForEach-Object { $_.Tag }
if ($selectedFiles.Count -eq 0) {
[System.Windows.Forms.MessageBox]::Show("No files selected.", "No Selection", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Warning)
return
}
$outputPath = $outputTextBox.Text
if (-not $outputPath) {
$outputPath = "MergedImages.pdf"
}
if (-not [System.IO.Path]::HasExtension($outputPath)) {
$outputPath = "$outputPath.pdf"
}
$outputPath = [System.IO.Path]::Combine($textBox.Text, $outputPath)
Merge-ImageToPDF -ImagePaths $selectedFiles -OutputPath $outputPath -Show -ResizeToFitA4
$form.Close()
})
$form.Controls.Add($okButton)
# ComboBox for selecting the sort order
$comboBox = New-Object System.Windows.Forms.ComboBox
$comboBox.Location = New-Object System.Drawing.Point(390, 40)
$comboBox.Size = New-Object System.Drawing.Size(120, 20)
$comboBox.DropDownStyle = [System.Windows.Forms.ComboBoxStyle]::DropDownList
$comboBox.Items.Add('Name')
$comboBox.Items.Add('Date Modified')
$comboBox.Items.Add('Size')
$comboBox.SelectedIndex = 0
$form.Controls.Add($comboBox)
# Add an event handler to the ComboBox to refresh the ListView on selection change
$comboBox.add_SelectedIndexChanged({
if ($textBox.Text -ne "") { # Only refresh if a folder is already selected
Update-ListView $textBox.Text
}
})
# "Move Up" button
$moveUpButton = New-Object System.Windows.Forms.Button
$moveUpButton.Location = New-Object System.Drawing.Point(200, 410)
$moveUpButton.Size = New-Object System.Drawing.Size(75,23)
$moveUpButton.Text = 'Move Up'
$moveUpButton.Add_Click({
$selectedItems = $listView.SelectedItems
if ($selectedItems.Count -eq 1) {
$selectedItem = $selectedItems[0]
$index = $selectedItem.Index
if ($index -gt 0) {
$listView.Items.RemoveAt($index)
$listView.Items.Insert($index - 1, $selectedItem)
$selectedItem.Selected = $true
$selectedItem.Focused = $true
}
}
})
$form.Controls.Add($moveUpButton)
# "Move Down" button
$moveDownButton = New-Object System.Windows.Forms.Button
$moveDownButton.Location = New-Object System.Drawing.Point(290, 410)
$moveDownButton.Size = New-Object System.Drawing.Size(75,23)
$moveDownButton.Text = 'Move Down'
$moveDownButton.Add
Copy first response
Not yet included in a published release.
.
D
r
a
w
in
g
.
S
i
z
e
(
380
,
20
)
t
e
m
.
D
r
a
w
in
g
.
S
i
z
e
(
260
,
20
)
m
.
D
r
a
w
in
g
.
S
i
z
e
(
100
,
25
)
L
i
s
t
V
i
e
w
−
O bj ec tS y s t e m . D r a w in g . S i z e ( 75 , 23 )
−
O bj ec tS y s t e m . D r a w in g . S i z e ( 85 , 23 )
tS
y
s
t
e
m
.
D
r
a
w
in
g
.
S
i
z
e
(
870
,
300
)
o
l
u
mn
s
.
A
dd
( ′
I
ma
g
e
F
i
l
e
s ′
,
−
2
,
[
S
y
s
t
e
m
.
W
in
d
o
w
s
.
F
or
m
s
.
H
or
i
z
o
n
t
a
l
A
l
i
g
nm
e
n
t
]
::
L e f t )
s
t
e
m
.
D
r
a
w
in
g
.
S
i
z
e
(
75
,
23
)
z
e
T
o
F
i
t
A
4
s
t
e
m
.
D
r
a
w
in
g
.
S
i
z
e
(
120
,
20
)
O
bj
ec
tS
y
s
t
e
m
.
D
r
a
w
in
g
.
S
i
z
e
(
75
,
23
)
O bj ec tS y s t e m . D r a w in g . S i z e ( 75 , 23 )