Snapshot failure

Discuss RoboTask here
Post Reply
Helix78
Posts: 11
Joined: Tue May 27, 2014 9:17 am

Snapshot failure

Post by Helix78 »

I guess since 6.4 the window snapshot feature or plugin does not work anymore in my Robotask
Before it worked perfectly. The window nade has not changes. I tried to identify the window again. No solution.

>access denied (translated from german)
>WindowSnap failure

Thank you
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Snapshot failure

Post by Oleg »

What window do you want to capture? Could you show your task?
You can get such error when you try to capture window of application that require rights elevation. For example REGEDIT.EXE.
This problem can be solved if you run RoboTask "As Administrator" (with rights elevation)
Oleg Yershov
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Snapshot failure

Post by Oleg »

You can use Screenshot action.

1. Focus necessary window
2. Take a screenshot

it works, I have tried this.
See my example below:

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|317955339
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task1166"
Hide=INTEGER|0
ID=INTEGER|19633302
LogOnAsUser=INTEGER|1
Name=STRING|"snapshot of RegEdit window"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER

[Actions\Action1]
ActionID=STRING|"A_WINDOW_COMMAND"
Enabled=INTEGER|-1
Name=STRING|"Focus window ""Registry Editor"""
Params=FOLDER

[Actions\Action1\Params]
action=STRING|"0"
caption=STRING|"1"
child=STRING|"0"
class=STRING|"0"
classexact=STRING|"0"
exact=STRING|"0"
findmode=STRING|"0"
hidden=STRING|"0"
processall=STRING|"0"
wincaption=STRING|"Registry Editor"

[Actions\Action2]
ActionID=STRING|"A_GENERAL_PAUSE"
Enabled=INTEGER|-1
Name=STRING|"Delay 200 ms"
Params=FOLDER

[Actions\Action2\Params]
delay=STRING|"200"
dimension=STRING|"0"

[Actions\Action3]
ActionID=STRING|"A_SCR_SCREEN"
Enabled=INTEGER|-1
Name=STRING|"Screenshot"
Params=FOLDER

[Actions\Action3\Params]
captureregion=STRING|"0"
filename=STRING|"{TempDir}\tmp.jpg"
format=STRING|"1"

[Actions\Action4]
ActionID=STRING|"A_GENERAL_RUN_PROG"
Enabled=INTEGER|-1
Name=STRING|"Run ""tmp.jpg """
Params=FOLDER

[Actions\Action4\Params]
ifnonzero=STRING|"0"
program=STRING|"{TempDir}\tmp.jpg"
runas=STRING|"0"
wait=STRING|"0"
Oleg Yershov
Helix78
Posts: 11
Joined: Tue May 27, 2014 9:17 am

Re: Snapshot failure

Post by Helix78 »

Thank you.
I had to start Robotask as Administrator. This seems to be necessary since 6.4
I can do that but when Robotask starts automatically with windows I have to look how to start it as Adminstrator.
fyi: The main user already has the Administrator role on Windows Server 2012
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Snapshot failure

Post by Oleg »

Starting with Windows Vista the system always reduces the user rights, even the user have administrative rights.
This is new feature of Windows - UAC (User Access Control)
You can turn off it at all (if you need) in control panel. Of course you can start RoboTask "As administrator" mode.

BTW: you can start RoboTask with command line
RoboTask.exe /ADMIN

See mere here about command line options.
Oleg Yershov
Post Reply