Dirk98 Posted September 29, 2007 Share Posted September 29, 2007 I need my script to shut down the above (no matter if they are on ar off) before the execution of the main rutine. Pls advise how. Many thanks. Dirk. Link to comment Share on other sites More sharing options...
Fossil Rock Posted September 29, 2007 Share Posted September 29, 2007 What do you mean by "shut down" ? Disable ? Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
BrettF Posted September 29, 2007 Share Posted September 29, 2007 I take it he means disable Num Lock, Caps Lock and Scroll lock... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
sandman Posted September 29, 2007 Share Posted September 29, 2007 Send("{NUMLOCK off}") Send("{CAPSLOCK off}") Send("{SCROLLLOCK off}") [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Link to comment Share on other sites More sharing options...
Dirk98 Posted September 29, 2007 Author Share Posted September 29, 2007 Awesome, thank you, guys! Was thinking about the script I'm working on while writing my request. Link to comment Share on other sites More sharing options...
Fossil Rock Posted September 29, 2007 Share Posted September 29, 2007 Send("{NUMLOCK off}") Send("{CAPSLOCK off}") Send("{SCROLLLOCK off}")Just to clarify, it does not diasable the keys, it justs sets the state to off. If someone presses one of the keys they will switch state. To set the state of the capslock, numlock and scrolllock keys Send("{NumLock on}") ;Turns the NumLock key on Send("{CapsLock off}") ;Turns the CapsLock key off Send("{ScrollLock toggle}") ;Toggles the state of ScrollLock Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
BrettF Posted September 29, 2007 Share Posted September 29, 2007 Just to clarify, it does not diasable the keys, it justs sets the state to off. If someone presses one of the keys they will switch state. This might work: #include Send("{NUMLOCK off}") Send("{CAPSLOCK off}") Send("{SCROLLLOCK off}") While 1 Select Case _IsPressed (90) = 1 Send ("{NUMLOCK toggle}") Case _IsPressed (91) = 1 Send ("{SCROLLLOCK toggle}") Case _IsPressed (14) = 1 Send ("{CAPSLOCK toggle}") Case _IsPressed ('1B') = 1 Exit EndSelect WEnd Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Dirk98 Posted September 29, 2007 Author Share Posted September 29, 2007 This might work: #include Send("{NUMLOCK off}") Send("{CAPSLOCK off}") Send("{SCROLLLOCK off}") While 1 Select Case _IsPressed (90) = 1 Send ("{NUMLOCK toggle}") Case _IsPressed (91) = 1 Send ("{SCROLLLOCK toggle}") Case _IsPressed (14) = 1 Send ("{CAPSLOCK toggle}") Case _IsPressed ('1B') = 1 Exit EndSelect WEnd Sorry, bear with me, #Include what? Link to comment Share on other sites More sharing options...
Nahuel Posted September 29, 2007 Share Posted September 29, 2007 (edited) Sorry, bear with me, #Include what?It needs Misc.au3It didn't work for me though...Oh I see.. the light flashes if I keep the key pressed.. haha. Edited September 29, 2007 by Nahuel Link to comment Share on other sites More sharing options...
BrettF Posted September 29, 2007 Share Posted September 29, 2007 It needs Misc.au3It didn't work for me though...Oh I see.. the light flashes if I keep the key pressed.. haha.Ok... Thats weird, the #include <misc.au3> completely destroyed itself?? Meh. It theory it should have worked Sorry... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Nahuel Posted September 29, 2007 Share Posted September 29, 2007 It does work, but you you have to press the key a little longer... Link to comment Share on other sites More sharing options...
BrettF Posted September 29, 2007 Share Posted September 29, 2007 It does work, but you you have to press the key a little longer...Mmmmmm... The flashy thing is cool Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Fossil Rock Posted September 29, 2007 Share Posted September 29, 2007 It may be better to use this... it should set it back if it gets changed. If _GetScrollLock() = 1 Then Send("{SCROLLLOCK Toggle}"); 0 = Off / 1 = On .... Func _GetScrollLock(); Checks to see if Scroll Lock is on Local $ret $ret = DllCall("user32.dll","long","GetKeyState","long",$VK_SCROLL) Return $ret[0] EndFunc Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
BrettF Posted September 29, 2007 Share Posted September 29, 2007 It may be better to use this... it should set it back if it gets changed. If _GetScrollLock() = 1 Then Send("{SCROLLLOCK Toggle}"); 0 = Off / 1 = On .... Func _GetScrollLock(); Checks to see if Scroll Lock is on Local $ret $ret = DllCall("user32.dll","long","GetKeyState","long",$VK_SCROLL) Return $ret[0] EndFuncYes. It would Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now