yucatan Posted June 3, 2009 Share Posted June 3, 2009 when i use the function _IsPressed how i can detect if on the keybord is bushed 2 buttons at the same time ? Link to comment Share on other sites More sharing options...
bogQ Posted June 3, 2009 Share Posted June 3, 2009 #include <Misc.au3> While 1 If _IsPressed("11") And _IsPressed("12") Then;<== alt+ctrl MsgBox(0,"","") EndIf WEnd TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
yucatan Posted June 3, 2009 Author Share Posted June 3, 2009 #include <Misc.au3> While 1 If _IsPressed("11") And _IsPressed("12") Then;<== alt+ctrl MsgBox(0,"","") EndIf WEnd is there many another way to detect it because i'm making a func that i can detect the difference between a and A Link to comment Share on other sites More sharing options...
oMBRa Posted June 3, 2009 Share Posted June 3, 2009 is there many another way to detect it because i'm making a func that i can detect the difference between a and Awhat's the problem then? Link to comment Share on other sites More sharing options...
MrCreatoR Posted June 3, 2009 Share Posted June 3, 2009 is there many another way to detect it because i'm making a func that i can detect the difference between a and ACheck if "Shift" was pressed with the "a" Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
yucatan Posted June 3, 2009 Author Share Posted June 3, 2009 what's the problem then?i dont wanne msgbox i wanne _FileWriteLogbut if i do that i get 10 times the same letter thats the problem Link to comment Share on other sites More sharing options...
Yashied Posted June 3, 2009 Share Posted June 3, 2009 And check CapsLock state. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Yashied Posted June 3, 2009 Share Posted June 3, 2009 Concentrate your mind at one point and repeat your question. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
yucatan Posted June 3, 2009 Author Share Posted June 3, 2009 And check CapsLock state.Check if "Shift" was pressed with the "a" wink.gifhow i can do that ? Link to comment Share on other sites More sharing options...
oMBRa Posted June 3, 2009 Share Posted June 3, 2009 i dont wanne msgbox i wanne _FileWriteLogbut if i do that i get 10 times the same letter thats the problemlol, are you joking?, BogQ's code was an example, the MsgBox was to show you that _IsPressed has captured the keystroke, it's not a crime if you modify it to suits your need, and if you have looked at the help file you would have understood that there is a list of keys to check for... Link to comment Share on other sites More sharing options...
yucatan Posted June 3, 2009 Author Share Posted June 3, 2009 (edited) #include <Misc.au3> While 1 If _IsPressed("10") And _IsPressed("48") Then ConsoleWrite("test") while _IsPressed("10") And _IsPressed("48")H sleep(1) WEnd WEnd this works u use the while _IsPressed("10") And _IsPressed("48")H sleep(1) WEnd to prevent that i get 9999 times the same letter is this a good way ? Edited June 3, 2009 by yucatan Link to comment Share on other sites More sharing options...
SaVoR Posted June 3, 2009 Share Posted June 3, 2009 #include <Misc.au3> While 1 If _IsPressed("10") And _IsPressed("48") Then ConsoleWrite("test") while _IsPressed("10") And _IsPressed("48")H sleep(1) WEnd WEnd this works u use the while _IsPressed("10") And _IsPressed("48")H sleep(1) WEnd to prevent that i get 9999 times the same letter is this a good way ? A way that it can be done is.. While 1 Sleep ( 1000 ) While _IsPressed("10") And _IsPressed("48") Then ConsoleWrite("test") ExitLoop Wend WEnd If you still get mutliple keys, dont hold down the keys as long. The "Sleep (1000)" is the amount of time it takes to check if the keys are pressed. Modify that to a bigger number so that it doesn't catch it as much. Link to comment Share on other sites More sharing options...
yucatan Posted June 4, 2009 Author Share Posted June 4, 2009 A way that it can be done is.. While 1 Sleep ( 1000 ) While _IsPressed("10") And _IsPressed("48") Then ConsoleWrite("test") ExitLoop Wend WEnd If you still get mutliple keys, dont hold down the keys as long. The "Sleep (1000)" is the amount of time it takes to check if the keys are pressed. Modify that to a bigger number so that it doesn't catch it as much. is it posseble to detect a keydown and keyup event that i can see when a key is pressed down and when it it not pressed down anymore? Link to comment Share on other sites More sharing options...
MrCreatoR Posted June 4, 2009 Share Posted June 4, 2009 is it posseble to detect a keydown and keyup event that i can see when a key is pressed down and when it it not pressed down anymore?While the keys are pressed the loop will continue, just check it after the loop is ending Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
yucatan Posted June 4, 2009 Author Share Posted June 4, 2009 While the keys are pressed the loop will continue, just check it after the loop is ending _ispressed does that work with more keys at the same time ?for a example if u press shift and then ABC and then i release shift can _ispressed see that while the ABC is pressed the shift key was pressed down ? Link to comment Share on other sites More sharing options...
MrCreatoR Posted June 4, 2009 Share Posted June 4, 2009 for a example if u press shift and then ABC and then i release shift can _ispressed see that while the ABC is pressed the shift key was pressed down ?Yes, something like this... While _IsPressed("10") Or (_IsPressed("41") And _IsPressed("42") And _IsPressed("43")) Sleep(100) If _IsPressed("10") Then ConsoleWrite("Shif is been held down" & @CRLF) WEnd Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
yucatan Posted June 4, 2009 Author Share Posted June 4, 2009 (edited) Yes, something like this... While _IsPressed("10") Or (_IsPressed("41") And _IsPressed("42") And _IsPressed("43")) Sleep(100) If _IsPressed("10") Then ConsoleWrite("Shif is been held down" & @CRLF) WEnd sorry that wont work for me sleep(100) is much to long i show u some code about how i work now ElseIf _IsPressed("01") Then _FileWriteLog($dest & "\my.log","Left mouse button"&@CRLF) while _IsPressed("01") sleep(1) WEnd and 2 if i use your wat i cannot detect for how long the key has been pressed i need to be able to see if i do press shift then i do ABC then i release shift so that i can see that ABC are typed in big letters and not just abc u understand? Edited June 4, 2009 by yucatan Link to comment Share on other sites More sharing options...
MrCreatoR Posted June 4, 2009 Share Posted June 4, 2009 You got all the needed answers in this topic, look also at this _IsPressedEx UDF. Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
bogQ Posted June 4, 2009 Share Posted June 4, 2009 i need to be able to see if i do press shift then i do ABC then i release shift so that i can see that ABC are typed in big letters and not just abc u understand?R y trying to make keyloger?!!!if so, this topic shud b locked. = click TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
yucatan Posted June 4, 2009 Author Share Posted June 4, 2009 R y trying to make keyloger?!!!if so, this topic shud b locked. = clickno i dont try to make a keylogger. 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