3.0.0.8

Andy
2022-04-19 14:38:10 +03:00
parent cca5f363e7
commit 4cc19d11b2

@@ -22,7 +22,7 @@
- ```Fast profiles loading``` - fast loading profiles in the main window. **Be careful with this setting. Fast loading leads to the highest CPU usage.**
- ```Folder cmd``` - the [command](#folder-command) to open a folder
- ```Delete data to recycle bin``` - delete data to recycle bin or permanent
- ```Script``` - script to be executed after the user download is complete. If the checkbox is checked, new users will be created with the ```Use script``` option.
- ```Script``` - [script](#how-to-use-the-script) to be executed after the user download is complete. If the checkbox is checked, new users will be created with the ```Use script``` option.
![Basis settings](https://github.com/AAndyProgram/SCrawler/blob/main/ProgramScreenshots/SettingsBasis.png)
@@ -162,3 +162,49 @@ This command can be a batch command or any script file (bat, ps1 or whatever you
1. Go to ```Network```
1. In the list on the left, find a query that contains ```client_id``` and click on it
1. Copy the client id from the ```Request URL```
# How to use the script
You can use a script that will be executed when the user download is complete. When the user download is complete, your script will be executed on the command line with user's path argument (without the trailing slash).
In the settings form, the checkbox indicates how new users will be created: with or without a script mode. If the user is created with script mode, the script will be executed after the download is complete. In the textbox you can set the default script.
In the user creation form, the checkbox specifies whether the script will run or not after the user has finished downloading. You can specify a custom script for this user account in the textbox. If the textbox is empty, the script specified in the settings form will be used.
**The script is only executed when any data has been downloaded. If the data is not downloaded, the script will not be executed.**
## Script examples
Batch:
```Batch
powershell D:\MyPrograms\SocialCrawler\Script.ps1 %1
```
PowerShell:
```PowerShell
$p="$args"
#$p=$args[0], if you use SCrawler PowerShell command
#This is an example of a string sent from SCrawler
#"D:\MyPrograms\SocialCrawler\Data\Reddit\UserName"
#User path is sent without trailing slash!
#Don't forget to quote this argument if it contains spaces.
New-Item -Path "$p\TestDir" -ItemType Directory
```
## SCrawler script text examples
SCrawler Batch command:
```
D:\MyPrograms\SocialCrawler\Script.ps1 "{0}"
```
SCrawler Batch command 2:
```
D:\MyPrograms\SocialCrawler\Script.ps1
```
SCrawler PowerShell command:
```
powershell D:\MyPrograms\SocialCrawler\Script.ps1 "{0}"
```
SCrawler PowerShell command 2:
```
powershell D:\MyPrograms\SocialCrawler\Script.ps1
```