object snapshot / снимок обьекта - Forum

Forum Navigation
You need to log in to create posts and topics.

object snapshot / снимок обьекта

I can't figure out how can I take a snapshot of an object in my program and save it to a file?
Я не могу понять, как я могу сделать снимок объекта в своей программе и сохранить его в файл?

@lolo

You can use special programs to search for commands, mine is called NeoCommands (https://distant.orgpsiholog.ru/mod/url/view.php?id=362), mishem's is called PluginInfo (https://visualneo.com/forum/topic/plugininfo). Choose the one that is more convenient for you. An example of a search from my program, using the word "screenshot":

 

 

Uploaded files:
  • You need to login to have access to uploads.
luishp has reacted to this post.
luishp

@vadim
i know about NeoCommands and PluginInfo i already tried to use ksShotObject but i get error
я знаю про NeoCommands и PluginInfo, я уже пытался использовать ksShotObject, но я получаю ошибку

Uploaded files:
  • You need to login to have access to uploads.

@lolo

Attach an isolated demo example of the problem so that we can reproduce it in our own place.

Приложите изолированный демо-пример с проблемой, чтобы мы могли воспроизвести её у себя.

@vadim
функция ksShotObject работает с переменными (ksShotObject "[WinHandle]" "C:\Users\Vladimir\Desktop\yui.bmp"), но объект (conteiner) не имеет переменной..

@lolo

Here's an example of how you can take a screenshot of a container with this command.

Uploaded files:
  • You need to login to have access to uploads.

@vadim
аа )) Вот я балбес, я же знаю про (GetObjectHandle)
СПАСИБО!!

Vadim has reacted to this post.
Vadim

You could use PowerShell script using this code:

Remember you need get the coordinates of the object (or the screen), recreate a PS1 file and run this script file for any way like NeoPowerShell plugin

 

# coordintates based on the VNW / NeoBook action like:
 
# GetObjectInfo "object" "Left" "[left]"
# GetObjectInfo "object" "Top" "[top]"
# GetObjectInfo "object" "Width" "[width]"
# GetObjectInfo "object" "Height" "[height]"

# Remember you must FileWrite the PS1 file with this values in order to run the script

$top    = [top]
$left   = [left]
$width  = [width]
$height = [height]

$bounds   = [Drawing.Rectangle]::FromLTRB($left, $top, $width, $height)
$bmp      = New-Object System.Drawing.Bitmap ([int]$bounds.width), ([int]$bounds.height)
$graphics = [Drawing.Graphics]::FromImage($bmp)

$graphics.CopyFromScreen($bounds.Location, [Drawing.Point]::Empty, $bounds.size)

$bmp.Save("$env:USERPROFILE\test.png")   # change as you need

$graphics.Dispose()
$bmp.Dispose()

 

luishp, Vadim and danito have reacted to this post.
luishpVadimdanito