Skip to content

Commit 134b958

Browse files
committed
Added powershell screenshot
1 parent 9669c2a commit 134b958

File tree

7 files changed

+41
-25
lines changed

7 files changed

+41
-25
lines changed

bash/build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33

44
cd javascript/web;
5-
gvfs-trash "dist"
6-
gvfs-trash "dist_electron"
5+
# gvfs-trash "dist"
6+
# gvfs-trash "dist_electron"
77

88
pwd
99
npm run electron:build

docker/build.dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM node

docker/html.Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM node

javascript/web/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"build:demo": "VUE_APP_TARGET=DEMO vue-cli-service build",
99
"serve:demo": "VUE_APP_TARGET=DEMO vue-cli-service serve",
1010
"build-electron": "VUE_APP_TARGET=ELECTRON bash scripts/build.sh",
11-
"electron:build": "VUE_APP_TARGET=ELECTRON vue-cli-service electron:build",
11+
"electron:build": "VUE_APP_TARGET=ELECTRON vue-cli-service electron:build -p always",
1212
"electron:all": "npm run electron:build -- --linux deb --win nsis",
1313
"electron:serve": "VUE_APP_TARGET=ELECTRON vue-cli-service electron:serve",
1414
"postinstall": "VUE_APP_TARGET=ELECTRON electron-builder install-app-deps",

javascript/web/src/build-windows.js

-22
This file was deleted.

javascript/web/vue.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module.exports = {
1717
}
1818
},
1919
nodeModulesPath: [ './node_modules' ],
20+
// mainProcessFile: 'dist_electron/bundled/background.js',
2021
nodeIntegration: true,
2122
preload: 'src/preload.js',
2223
}

powershell/screenshot.ps1

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# ScreenShot Desktop using PowerShell (PS)
2+
# Version v1
3+
# Written by: Othmane Moutaouakkil [ WHOAMI2507 ] (You don't become a coder by just changing the credits)
4+
# Github: https://github.com/whoami2507
5+
6+
7+
# [ Takes snapshot of your screen and saves to a file ]
8+
9+
$outputFile = "C:\Users\Othmane Moutaouakkil\Desktop\ScreenShot.png"
10+
11+
Add-Type -AssemblyName System.Windows.Forms
12+
Add-type -AssemblyName System.Drawing
13+
14+
# Return resolution
15+
$Screen = [System.Windows.Forms.SystemInformation]::VirtualScreen
16+
$Width = $Screen.Width
17+
$Height = $Screen.Height
18+
$Left = $Screen.Left
19+
$Top = $Screen.Top
20+
21+
# Create graphic
22+
$screenshotImage = New-Object System.Drawing.Bitmap $Width, $Height
23+
24+
# Create graphic object
25+
$graphicObject = [System.Drawing.Graphics]::FromImage($screenshotImage)
26+
27+
# Capture screen
28+
$graphicObject.CopyFromScreen($Left, $Top, 0, 0, $screenshotImage.Size)
29+
30+
# Save to file - Saves to your path
31+
$screenshotImage.Save($outputFile)
32+
33+
Write-Output "Saved to:"
34+
Write-Output $outputFile
35+
Start-Sleep -s 5

0 commit comments

Comments
 (0)