Blockinput...but not all....
Moderators: Dorian (MJT support), JRL
-
- Junior Coder
- Posts: 24
- Joined: Sun Jun 11, 2006 9:50 am
Blockinput...but not all....
Using the latest version btw...
I have a load of Macros that run quite happily and are pretty stable... thanks to blocking the input of my less informed colleagues.
The problem is that when blockinput is running SHIFT-ESC won't run and as a result if there is a problem for whatever reason the only way out is CTRL-ALT-Del...
But have you every tried killing a process while the macro is tabbing about and pressing enter ?!
I thought about adding IfWindowOpen 's throught out the script looking for task manager but I don't know if that will work, and it sounds messy...
Is it possible to blockinput to everything except a certain key ?
Has anyone else thought of a way around this ?
Thanks guys.
I have a load of Macros that run quite happily and are pretty stable... thanks to blocking the input of my less informed colleagues.
The problem is that when blockinput is running SHIFT-ESC won't run and as a result if there is a problem for whatever reason the only way out is CTRL-ALT-Del...
But have you every tried killing a process while the macro is tabbing about and pressing enter ?!
I thought about adding IfWindowOpen 's throught out the script looking for task manager but I don't know if that will work, and it sounds messy...
Is it possible to blockinput to everything except a certain key ?
Has anyone else thought of a way around this ?
Thanks guys.
-
- Junior Coder
- Posts: 24
- Joined: Sun Jun 11, 2006 9:50 am
Thanks for the reply SkunkWorks however even that seems to fail....
Here is a test script I am using :
Label>start
Blockinput>1
//Do stuff when ALT+SPACE are pressed
OnEvent>KEY_DOWN,VK32,3,keypress
Message>the macro is running, try and kill it.
SRT>keypress
Message>It only went and worked !!!!!
blockinput>0
Goto>END
END>keypress
wait>10
Message>The macro failed to be killed.
Blockinput>0
Label>END
I have tried putting the OnEvent line before the Blockinput>1 that didn't make any difference.
I am assuming that the Blockinput>1 disregards any other commands and does what is says on the tin.
Anyone else come up with any novel ideas regarding blocking all keys bar a "kill switch" ?
Thanks again SkunkWorks.
Here is a test script I am using :
Label>start
Blockinput>1
//Do stuff when ALT+SPACE are pressed
OnEvent>KEY_DOWN,VK32,3,keypress
Message>the macro is running, try and kill it.
SRT>keypress
Message>It only went and worked !!!!!
blockinput>0
Goto>END
END>keypress
wait>10
Message>The macro failed to be killed.
Blockinput>0
Label>END
I have tried putting the OnEvent line before the Blockinput>1 that didn't make any difference.
I am assuming that the Blockinput>1 disregards any other commands and does what is says on the tin.
Anyone else come up with any novel ideas regarding blocking all keys bar a "kill switch" ?
Thanks again SkunkWorks.
don't be a chicken little
I use another method to kill macros which does not even require ON_EVENT.
Place a line in the macro which checks for the existence of a file. If the file is found, then stop the macro.
...do something
Iffileexists>KillMe.txt
goto>EndOfProgram
else>
keep working....
endif>
There are many many ways to stop a macro by means of "outside intervention".....
Place a line in the macro which checks for the existence of a file. If the file is found, then stop the macro.
...do something
Iffileexists>KillMe.txt
goto>EndOfProgram
else>
keep working....
endif>
There are many many ways to stop a macro by means of "outside intervention".....
-
- Junior Coder
- Posts: 24
- Joined: Sun Jun 11, 2006 9:50 am
been away, still have the problem...
The problem with using a file to stop a macro from tabbing around an application is that you need the macro to stop while you create one... it isn't possible to do that.
I have looked into and the only solution appears to be a total block (blockinput) followed by an unblock of a key or combo of keys.
I want to be able to run the macro without users messing it up. But want them to be able to still press SHIFT -ESC or other key / combo to stop the macro should an unexpected event take place.
How come CTRL-ALT-DELETE still works dispite blockinput is pressed ? Can't another key combo be added to the exception to this command ?
I have looked into and the only solution appears to be a total block (blockinput) followed by an unblock of a key or combo of keys.
I want to be able to run the macro without users messing it up. But want them to be able to still press SHIFT -ESC or other key / combo to stop the macro should an unexpected event take place.
How come CTRL-ALT-DELETE still works dispite blockinput is pressed ? Can't another key combo be added to the exception to this command ?
don't be a chicken little
I've never used Blockinput> but have thought about it. One of my concerns was just what you've been discussing. Doing a little experimenting this morning and I found that the act of pressing Ctrl+Alt+Del not only calls up task manager but also cancels the blockinput function.
run the following script, then press Ctrl+Alt+Del. Close Task manager (notice your mouse is working) then press Shift+Esc to stop the script.
Hope this is helpful,
Dick
Edit
When all else fails read the help. This is from help for BlockInput>:
run the following script, then press Ctrl+Alt+Del. Close Task manager (notice your mouse is working) then press Shift+Esc to stop the script.
Hope this is helpful,
Dick
Edit
When all else fails read the help. This is from help for BlockInput>:
Be aware that this prevents all user input apart from CTRL-ALT-DEL. If you need to stop a running script that has blocked input press CTRL-ALT-DEL and then stop the script.
Code: Select all
Blockinput>1
Let>k=0
Repeat>k
add>k,1
message>the macro is running, try and kill it.%CRLF%Looping for %k% of 30 seconds
Wait>1
Until>k,30
Blockinput>0
-
- Junior Coder
- Posts: 24
- Joined: Sun Jun 11, 2006 9:50 am
Well spotted.... but there is a further problem...
As soon as I press CTRL-ALT-DEL the macro tabs around task manager pressing all sorts of buttons and is... well... dangerous, it could kill reports that are running in the foreground etc...
Not sure but do you think that Blockinput should be adjusted to not include SHIFT-ESC, like it doesn't block CTRL-ALT-DEL ? Is that worthy of a suggestion in further updates ?
What do you think ?
As soon as I press CTRL-ALT-DEL the macro tabs around task manager pressing all sorts of buttons and is... well... dangerous, it could kill reports that are running in the foreground etc...
Not sure but do you think that Blockinput should be adjusted to not include SHIFT-ESC, like it doesn't block CTRL-ALT-DEL ? Is that worthy of a suggestion in further updates ?
What do you think ?
don't be a chicken little
-
- Junior Coder
- Posts: 24
- Joined: Sun Jun 11, 2006 9:50 am
Didn't see your update....
I have pretty tight loops there is about 100 steps to the macro and it needs to run quickly as it helps the team take calls quickly.
It doesn't make any difference though, as blockinput appears to block SHIFT-ESC which is the default macro killer combo.
I have pretty tight loops there is about 100 steps to the macro and it needs to run quickly as it helps the team take calls quickly.
It doesn't make any difference though, as blockinput appears to block SHIFT-ESC which is the default macro killer combo.
don't be a chicken little
Then use OnEvent to detect task manager and close it.
Press Ctrl+Alt+Del to start task manager, Onevent should see the window and immediately close task manager. After task manager closes, press Shift+Esc to stop the script.
Like this:
Later,
Dick
Press Ctrl+Alt+Del to start task manager, Onevent should see the window and immediately close task manager. After task manager closes, press Shift+Esc to stop the script.
Like this:
Later,
Dick
Code: Select all
OnEvent>WINDOW_OPEN,Windows Task Manager,0,CloseTM
SRT>CloseTM
WindowAction>3,Windows Task Manager
END>CloseTM
Blockinput>1
Let>timer=30
Let>k=0
Repeat>k
add>k,1
message>the macro is running, try and kill it.%CRLF%Looping for %k% of %timer% seconds
Wait>1
Until>k,%timer%
Blockinput>0
-
- Junior Coder
- Posts: 24
- Joined: Sun Jun 11, 2006 9:50 am
JRL you have hit the nail on the head, Automation Wizard indeed. I adjusted it slightly to suit the situation I was trying to resolve :
This removes the need to Press SHIFT ESC while the macro is still causing mayhem.
Thanks everyone for your responses, as always the best support I have had for any piece of software ever, very much appreciated.
Code: Select all
OnEvent>WINDOW_OPEN,Windows Task Manager,0,CloseTM
SRT>CloseTM
WindowAction>3,Windows Task Manager
goto>Finish
END>CloseTM
Blockinput>1
Let>timer=30
Let>k=0
Repeat>k
add>k,1
message>the macro is running, try and kill it.%CRLF%Looping for %k% of %timer% seconds
Wait>1
Until>k,%timer%
Label>Finish
Blockinput>0
This removes the need to Press SHIFT ESC while the macro is still causing mayhem.
Thanks everyone for your responses, as always the best support I have had for any piece of software ever, very much appreciated.
don't be a chicken little
-
- Junior Coder
- Posts: 24
- Joined: Sun Jun 11, 2006 9:50 am
One last thing... in order to make this work perfectly, does anyone know the name for the system window that networked computers get in XP, before Task Manager.
It looks like is should be called "Windows Security" but it isn't...
For those of you wondering what I am talking about, it is a window that appears when you hit CTRL-ALT-DEL and has Lock computer, Log off, Shut Down, change password Task Manager and Cancel on it.
I can't see it in System window monitor as it isn't there till you press CTRL-ALT-DEL, when you have pressed it, you can't refresh the system window monitor.... Catch 22.
It looks like is should be called "Windows Security" but it isn't...
For those of you wondering what I am talking about, it is a window that appears when you hit CTRL-ALT-DEL and has Lock computer, Log off, Shut Down, change password Task Manager and Cancel on it.
I can't see it in System window monitor as it isn't there till you press CTRL-ALT-DEL, when you have pressed it, you can't refresh the system window monitor.... Catch 22.
don't be a chicken little
I don't know the name of the window but for Windows XP the "Windows Security" panel can be disabled. Its appearance is tied to the Windows Welcome screen. The Microsoft site with the information is located here:
http://support.microsoft.com/kb/q281980/
Or perhaps you can use the Onevent> trigger WINDOW_NEWACTIVE? If the Security Window pops up, pressing esc will close it and using the technique that you employed the script will be closed before you get back to the desktop.
I think that this trigger has obvious drawbacks but it might work for your situation.
Hope this helps,
Dick
http://support.microsoft.com/kb/q281980/
Or perhaps you can use the Onevent> trigger WINDOW_NEWACTIVE? If the Security Window pops up, pressing esc will close it and using the technique that you employed the script will be closed before you get back to the desktop.
I think that this trigger has obvious drawbacks but it might work for your situation.
Hope this helps,
Dick
Code: Select all
OnEvent>WINDOW_NEWACTIVE,0,0,CloseTM
SRT>CloseTM
Press Esc
Goto>end
END>CloseTM
Blockinput>1
Let>timer=30
Let>k=0
Repeat>k
add>k,1
message>the macro is running, try and kill it.%CRLF%Looping for %k% of %timer% seconds
Wait>1
Until>k,%timer%
Blockinput>0
Label>end
Blockinput>0