shortcut to stop robotask

Post comments and suggestions for RoboTask here
Post Reply
rgonzalez
Posts: 41
Joined: Fri Nov 26, 2010 10:19 am

shortcut to stop robotask

Post by rgonzalez »

Would be nice if you could stop all robotask tasks using a key combination or something. When you are are executing a task sometimes you have a lot of instruction that goes to an specified window. When you are testing your task, it becames really annoying trying to stop robotask while you are fighting with the fixed window protection.
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

shortcut to stop robotask

Post by Oleg »

There is Stop button for this purpose:


It stops selected task. The second click causes unconditional termination of the task.
rgonzalez
Posts: 41
Joined: Fri Nov 26, 2010 10:19 am

shortcut to stop robotask

Post by rgonzalez »

yes, but when the task is running and you have something like send keystrokes to a windows with fixed window (protect against casual window switching) you wont be able to open robotask window.
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

shortcut to stop robotask

Post by Oleg »

Ok, I wrote this into our ToDo. Probably we'll devise
something.

One advise right now:
You can make the task which stops your main task and attach
Hot-Key trigger for it.
Hallstead
Posts: 1
Joined: Thu Jul 16, 2020 10:54 pm

Re: shortcut to stop robotask

Post by Hallstead »

I have a task dedicated for stopping all running tasks. It uses the following vb script:

Code: Select all

cnt = RoboTaskApp.TaskCount
for i=0 to cnt-1 step 1
  nam = RoboTaskApp.TaskInfoExtname(i)
  if nam <> "Task3" Then
    logmessage("Stop task " + nam)
    RoboTaskApp.StopTask(nam)
  end if
next
Task3 is the external name of the task. It loops through all your tasks and stops them all except for this task.
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: shortcut to stop robotask

Post by Oleg »

I modified the script
See below. It is universal

Code: Select all

cnt = RoboTaskApp.TaskCount
SelfName = RoboTaskApp.ExpandText("{TaskExtName}")
for i=0 to cnt-1 step 1
  nam = RoboTaskApp.TaskInfoExtname(i)
  if nam <> SelfName Then
    logmessage("Stop task " + nam)
    RoboTaskApp.StopTask(nam)
  end if
next
Oleg Yershov
Rukbunker
Posts: 192
Joined: Mon Feb 22, 2016 4:06 pm
Location: Netherlands

Re: shortcut to stop robotask

Post by Rukbunker »

Got this already for some years and it proofed itself many times. In our case: Control+F12 is the kill switch :D
Screenshot
Screenshot
Capture.PNG (18.69 KiB) Viewed 8142 times
Post Reply