Skip to content

Commit

Permalink
Added Python program to take screen capture using scroll bar so manua…
Browse files Browse the repository at this point in the history
…l work can be reduce
  • Loading branch information
Viddesh1 committed Jun 6, 2023
1 parent 93ac2fe commit aa7ec5f
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions Scripts/Scroll_Screen_Capture.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# pip install PyAutoGUI==0.9.53\n",
"import pyautogui\n",
"\n",
"# To get the current position of the scrollbar drag the mouse pointer to respective scrollbar.\n",
"current_position = pyautogui.position()\n",
"\n",
"for i in range(1, 1000):\n",
" print(current_position.x, current_position.y) # Prints the pointer location in x - y position."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import pyautogui\n",
"\n",
"\n",
"for i in range(0, 4): \n",
" image = pyautogui.screenshot()\n",
" image.save(\"image_\" + str(i) + \".png\")\n",
" # pyautogui.click()\n",
" pyautogui.moveTo(1361, 352) # Replace pyautogui.moveTo(X, Y) with your scrollbar co-ordinates\n",
" pyautogui.scroll(-1000)"
]
}
],
"metadata": {
"language_info": {
"name": "python"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}

0 comments on commit aa7ec5f

Please sign in to comment.