Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Disable/Enable Pause/Break Key
#1
Would it be possible to disable the Pause/Break key when a macro starts to play and enable it at the very end?

I am trying to disallow users from hitting Pause/Break and stopping the macro when it is playing.

Thanks!

P.S. Would be great if I can disable the entire keyboard lmao! :lol:
#2
To disable all keys including Pause, and mouse too, insert this at the beginning:

BlockInput 1


Or, convert the macro to function. Functions cannot be stopped using Pause. In Properties, select Function in the combo box where now is selected Macro. Insert spe -1 at the beginning of macro text.
#3
go with the function option. definitely better.
#4
What is spe -1?

I have used spe before, just dont understand what the -1 is for.

Thanks!
#5
spe -1, if used in a function that is called from a macro or function, inherits caller's speed (autodelay). If used in a function that is not called, sets autodelay that is specified in Options (initial autodelay for macros). Initial autodelay for functions is 0, and therefore the function may run too fast without spe. Of course you can use eg spe 100 instead.
#6
Is there also a way to delete Hidden or System files from QM?

When I am manually deleting a specific file, it tells me it's in use and so I cannot delete it.

Thanks!
#7
I think it'd be a very bad thing to delete a system file, especially if the OS is using it. If it's just an application file you can use "Who lock me" (google for it) to determine what app is using the file, and kill the app. I'm sure there is a Win API you can use in QM to do the same thing. MSDN for it.
Matt
Matt B
#8
Well I was hoping I can create a bat file, change the attribute to the file and delete it.

FYI, using BlockInput, user can still hit Ctrl+Alt+Del and do an end task on QM, so its not 100% effective. I haven't tried using it as a function.

Thanks!
#9
Try the attached file. Blockinput2 is an updated function which catches Ctrl+Alt+Del. It works well.
Matt


Attached Files
.qml   block input.qml (Size: 2.65 KB / Downloads: 745)
#10
Great Matt, one little problem. I am still using 2.1.4 and I received error on if(WINNT) line.

Thanks!
#11
replace WINNT to _winnt.


Attached Files
.qml   xtreme activex.qml (Size: 1.17 KB / Downloads: 264)
#12
itsjustmatt Wrote:Try the attached file. Blockinput2 is an updated function which catches Ctrl+Alt+Del. It works well.
Matt



Have you tried this on 2.1.6?

Doesnt seem to work using BlockInput2 3
#13
BlockInput2 3 disables keyboard and mouse only while the macro is running. For example, this macro blocks input for 10 seconds:

Code:
Copy      Help
BlockInput2 3
10
#14
Well that is what i thought, disable keyboard and mouse and I could type on a yahoo message box, so it didn't work for me.


Code:
Copy      Help
BlockInput2 3
;my simple codes that searches for files
;and moving them to another folder
BlockInput2 0
#15
Try to add BlockInput too.

BlockInput 1
BlockInput2 3
...
#16
I am getting compiler error on BlockInput2:

Code:
Copy      Help
if(block&1) __bikhook=SetWindowsHookEx(WH_KEYBOARD_LL &BIKeyboardProc _hinst 0)


Highlighting >>>> _hinst
#17
_hinst is global variable declared somewhere around function init which is in System folder. Do you have System folder in the list of macros? If yes, try to run init, and then run macro with BlockInput2. What results?

If not using System, insert this in BlockInput2, before if(WINNT):

dll kernel32 #GetModuleHandle $lpModuleName
int _hinst=GetModuleHandle(0)
#18
I have deleted the system folders, had multiple since it was from 2.1.4 and everything is working just fine.

Quick question tho. Since this macro have a system folder, when I give the file to my friend, will she have 2 system folders also, she is also using 2.1.6.

Thanks
#19
In older QM versions, maybe in 2.1.4 too, it was possible to accidentally add two System folders when importing (don't remember how exactly). In QM 2.1.6 this will not happen. If System already exists in the list, it will not be imported.
#20
Cool thank you very much. I am assuming it's the same with 2.1.7? If my file contains the System folder, it will not have 2 System folders are the file is Opened or Imported?


Forum Jump:


Users browsing this thread: 1 Guest(s)