Jump to content

Search the Community

Showing results for tags '_ispressed'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start






Found 20 results

  1. I am trying to record a ClipGet after Ctrl + C Is stroke. Not working. It is possible ? While (1) $msg = GUIGetMsg () Switch $msg Case $GUI_EVENT_CLOSE Exit EndSwitch Local $hDLL = DllOpen("user32.dll") If _IsPressed ("A2",$hDLL) And _IsPressed ("56",$hDLL) Then Sleep (500) $ClipBoard = ClipGet () ;~ ==========================================Console============================================ _GUICtrlListView_AddItem($ConsoleArea,""&$ClipBoard) _GUICtrlListView_EnsureVisible($Cons
  2. Hi guys, I'm learning about GUI's, I'm trying the below code, the idea being if I press the letter "e" while I have the GUI open I want the label color to change to green (I'm using a UDF for label colors). But every time I press "e" on my keyboard I just get a "ding" sound from my speakers and nothing changes with the label. I've looked at using something like "While GUIGetMsg() <> $GUI_EVENT_CLOSE" as I've seen it in other code instead of "While 1", but I don't think it's relevant. #include <GUIConstantsEx.au3>; for GUI... #include <GUIRichLabel.au3>; UDF fo
  3. Hello to all, I've written a script using following part is inserted. Func _CallFolder() ; .... Local $_hDLL = DllOpen("user32.dll") ; .... ; .... While 1 ; .... ; .... If _IsPressed("1b",$_hDLL) then _Terminate($_hDll,$_iPID,$_hGUI) Sleep(10) WEnd ; .... ; .... EndFunc Func _Terminate($_para1, $_para2, $_para3) DllClose($_para1) ProcessClose($_para2) GUIDelete($_para3) Exit EndFunc The script is working right. But on typing "ESC" not only my script is closing all other open programs using "ESC" for termination too g
  4. I want to create a loop which loops a code until for example f2 is pressed. So I tried something with _IsPressed but it doesn't work. Local $test = WinActivate("Notepad") Do Send("hi") Until _IsPressed("72", $test) I don't know how I can do nothing when pressing f2 because it says "error: _IsPressed(): undefined function.". I did put Send("hi") after Local $test = but it gives the same error. Does anyone know how to solve this problem? Maybe I am wrong and I need to use a whole other Function.. I am ne
  5. Hello guys. how are u doing today ?? Im new here but i wanted show somethink i just did. best kind of dynamic way to set hotkeys in yours own program. i need any suggestions, bugs report or any way to improve or any way i can do it better. its first my own "example" so be easy for me. Thank u for your attention !!! #include <Misc.au3> #include <MsgBoxConstants.au3> #include <GUIConstantsEx.au3> $GUI = GUICreate("set hotkeys", -1,-1) GUISetState() $button_hotkey = GUICtrlCreateButton("", 80, 30, 150, 25) $button_empty
  6. Greetings people of the AutoIt community! I think I have discovered some possible wrong verbiage in the HelpFile. I'm trying to make my software detect the _IsPressed("KEY") for the RIGHT MENU button on the keyboard. You all have a RIGHT MENU button on your keyboard (maybe you haven't noticed it), it's they key between the Right ALT key and the Right CTRL Key. However!!!!!!! In the helpfile it says the RIGHT MENU key is "A5", that is not true for me. A5 is actually the Right ALT key. So my question is, what is the _IsPressed HexKey for the RIGHT MENU button?
  7. I need to know how to get delays let's say for example 4 mouse clicks then get the total delay What i have tried: While 1 If _IsPressed ("01") = 1 Then $timer = TimerInit () Sleep (100) While _IsPressed ("01") Sleep (50) WEnd $timer2 = TimerInit () While _IsPressed ("01") Sleep (50) Wend $timer3 = TimerInit () While _IsPressed ("01") Sleep (50) WEnd $timer4 = TimerInit () $diff = TimerDiff ($timer + $timer2 + $timer3 + $timer4) MsgBox ($MB_TOPMOST, "", "Difference in milliseconds: " & @CRLF & $diff)
  8. I know there is a simple way to do this, but I can't remember and can't find the proper way.. I just need to set a hotkey that is only active while the GUI is up. When the GUI is minimized or no longer in focus, I need it to release the bound key. I have the enter key bound for barcode scanning and when the app is minimized, it holds on to the enter key. I know there is a simple way to fix this, but I don't recall how.. I cant post the app because its massive and wont start if you try to use it outside our environment. Here is my little test script.. Any ideas are greatly appreciated! #inc
  9. Let's say I'm in a browser and the exta Left side button (_IsPressed "05") on my mouse is configured to move back to the previous web page... But I would also like to use this button to modify the behavior of an AutoIt script I may be running with the browser active, but in that case I don't want the default behavior to happen; my page has to stay put. I think I cannot temporarily use BlockInput here, cause I may have a dialog window opening in which I must allow user input. In javascript (or jQuery) they use e.preventDefault(); (ore return false;) for this stuff. Can AutoIt do it too? TIA!
  10. Hey im looking to rebind my wasd keys to arrow keys in order to play a game using my phone and chrom remote access. I tried using controlsend to send a arrow keys when i push wasd. Problem lies in that it sends both w (for example) and the up arrow key aswell as asd etc. Any ideas how to get around this?
  11. Respected programmers, tell me how to get the arguments in the correct format for the function HotKeySet () from the results function _IsPressed ()? I need to allow the user to choose the key(eg left/right arrow), when pressed, will be called the desired function through HotKeySet (). Thanks!
  12. Hi all, I want use more than one key in HotKeySet or _IsPressed functions. This is my code. It is working. But i would like to know if there is any better way to do this. Local $flag1 = False Local $flag2 = False While 1 Sleep(10) if _IsPressed("4D") Then $flag1 = True If _IsPressed("44") Then $flag2 = True if $flag1 = True And $flag2 = True And _IsPressed("41") Then TestSend() WEnd Func TestSend() Send("{BS 3}My Dear Alan{TAB}:{SPACE}") EndFunc ;==>WordSendKeyALT_W
  13. IsPressed_UDF is based on original _IsPressed function. Description : -This udf can detect if some keys are pressed by user on keyboard or mouse. -IsPressed functions extend possibility to choice keys to check. -Keys are specified in functions by their hexadecimal number, ['0D' = 'ENTER'] you can also translate hexadecimal key to alpha key (see functions and examples) Update : [Latest: 12 Jun 2013] Functions : Exemples : IsPressed_UDF 2.3 : IsPressed_UDF.au3 IsPressed_UDF 2.2 : IsPressed_UDF.au3 Add IsPressed_UDF functions to SciTE : IsPressed_Function Enjoy !
  14. Hi, this searches only for CTRL but ALT, also activates it, if i change the number to 12 (ALT) it works, and CTRL doesn't activate it! So this means there is a problem, when i use ispressed 11. Can anyone verify this? ;ALT = 12 ;CTRL = 11 #include $dll = DllOpen("user32.dll") Do Sleep(50) If _IsPressed("11", $dll) Then TrayTip('Info', 'Key Pressed', 1) Sleep(1000) TrayTip('','',1) EndIf Until $dll = 123 DllClose($dll)
  15. Hello everyone, I have been working on a script, which makes a circle in the window (a ball perhaps), which allows me to change its position using keyboard. Here's it: #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> #include <Misc.au3> #include <WinAPI.au3> Global $g = 10, $Label2, $CONTROLPOS[2] $CONTROLPOS[0] = 20 $CONTROLPOS[1] = 20 Global $USER32DLL = DllOpen('user32.dll') $DEFAULTVELOCITY = 5 _GDIPlus_StartUp() $Form1 = GUICreate("My Problem", 934, 627, 332, 130) GUISetBkColor(0x
  16. Works with ctrl+left mouse click, displays a traytip, balloon-like with the image resolution, if can be read. Not entirely mine, got help from forum, without you i couldn't have done it. thanks ppl. #include "image_get_info.au3" #include <Misc.au3> AutoItSetOption("TrayAutoPause", 0) Local $DLL = DllOpen("user32.dll") Local $file, $aInfo, $keyR1, $keyR2 RegWrite("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced", "EnableBalloonTips", "REG_DWORD", "1") While 1 Sleep(50) If _IsPressed("11", $dll) Then ;CTRL $keyR1 = 1 CTRLkey() ElseIf $keyR1 + $keyR2 = 2 Then RE
  17. Hi all, back again to AutoIt after a while... I have a minimal problem I need to solve. I'm building a tool that will run an application with just an "hotkeyset". But, since there is another application (geolocalization of water infrastructures) running that uses customizable shortcuts, I want to let user choose a personal key. So, brutally this is the idea (and it works perfectly) #include <GUIConstantsEx.au3> #include <HotKeyInput.au3> #include <Misc.au3> $dll = DllOpen("user32.dll") Global $Form, $HKI1, $HKI2, $Button, $Text Global $app = "Thermo" HotKeySet("^y", "_ki
  18. I am trying to do it with the following code. #include <Misc.au3> Do . . . While 1 If _IsPressed(02) Then TogglePause() Endif Wend until $count = 125 Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc The problem is that the addition of the code into the loop stops the loop. Now it executes only once. And I did not even press any key or mouse button.
  19. how can i check if the quote key (') is pressed?
  20. I'm trying to create a small script to press a few keys after two mouse clicks. Below is the script that I wrote. For some reason it does the Send command after only one click, then it waits until I click again. #Include <Misc.au3> ; required for _IsPressed $dll = DllOpen("user32.dll") Dim $x = 0 While 1 While $x < 2 If _IsPressed("01", $dll) Or _IsPressed("02", $dll) Then $x = $x + 1 EndIf WEnd Send("{UP 4}{ENTER}{ENTER}") $x = 0 WEnd This version works after one click, and gives me 1 1/2 seconds to make the second click before calling the Send command. But I'd pre
  • Create New...