Jump to content
Sign in to follow this  

Joystick (_BlockInputEx)????

Recommended Posts


good afternoon

there is some function in AutoIT like (_BlockInputEx) but joystick to lock the buttons of the joystick you want?

thank you

Share this post

Link to post
Share on other sites

Just unplug it?

this would be the easiest way.lol lol

Share this post

Link to post
Share on other sites

Hehe yeah...

So why do you want to "lock" you buttons? I don't think I've seen anyone do that specifically, but maybe there are alternatives depending on what you are doing.

Share this post

Link to post
Share on other sites

I'll tell you specifically what I want, I have a timer and what I want is to integrate a function in the script to block certain buttons on the joystick so if you do not have time to leave only one button to be used ,if you have time to release the remaining buttons and when the time comes again to zero lock the same buttons. On the keyboard i know what the function that does this now in the joystick do not know if there is this function ? Best Regards

Share this post

Link to post
Share on other sites

Share this post

Link to post
Share on other sites

Join the club @Belini. ;)

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • Skeletor
      By Skeletor
      Hi Virtual People, 
      I'm trying to lock my screen in Windows 10 but to no avail. 
      Has Windows 10 forbidden this feature? 
      Send("#l") Above code does not work. Even sending Ctrl Alt Del does not work nor as an Admin. 
      Note: I want to lock my screen, not log off. Thanks for been kind.
    • ergo
      By ergo

      Hello AutoIt-Fans. The main reason why I wrote this script was to simulate the entire keyboard with just the joypad. Mostly I need it when I play retro games on an emulator like CCS64 or VICE emulator, PCSXR, ... So maybe someone can use it too.
      In the configuration file macroJoy.cfg you can define your macros. A macro has two parts, a button sequence-line and the commands-line. If all buttons of a sequence-line (one by one or simultaneously, depending on pushType) are pressed, the functions in the commands-line will be invoked. The following functions are currently available: sendkey, run, focus, killproc, cursor, sleep. If you like you can add some custom functions in includes/functions.au3. Below you will find a configuration example and a brief description.
      The program resides in the system tray. Use the menu item Check JoyData to test your macros or see the joystick button codes. 
      Project files can be downloaded from Github macroJoy Source code.zip
      [config] ;sequenceNN: process;pushType;joynum;time;joyid,code;joyid,code,... ;process: 0=ignore process / processID or process name e.g.: notepad.exe ;pushType: 1=simultaneous, 2=one by one ;JoyPort: 1-15 ;time(pushType 1): [idle-repeat time in ms] or 0=off / (pushType 2): [timeout in ms] or 0=no timeout ;joyid: 1-8 ;code: integer value ;commandNN: func,para1,para2,...;func,para1,para2,... ;functions ;sleep pause execution para1: time in ms ;sendKey simulate keystrokes para1: sequence of keys / para2(opt): 0=default 1=send raw (see autoit docs "send" for details) ;focusA focus to the specified window name para1: window name ;killpidfile kill process from pid-file para1: text file with a process id ;focusB focus to the specified window name para1: window name (Works better, but may be unavailable in subsequent versions of Windows.) ;killproc kill process by name or process id para1: process name or process id ;run run a program para1: program name / para2(opt): show_flag / para3(opt): opt_flag (see autoit docs "run" for details) ;cursor hide/set or toggle mouse cursor para1: 0=hide 1=show 2=toggle sequence01=0;2;1;2000;8,128;8,0;8,64 command01=sendKey,!{F4},0;sleep,1000;sleep,5000;focusA,Kodi sequence02=0;2;2;3000;8,128;8,0;8,128;8,0;8,64;8,0;8,64 command02=sendKey,{F2},0 ;XINPUT: <Start> sequence03=ccs64.exe;1;1;0;8,128 command03=sendKey,{ESC down},0;sleep,100;sendKey,{ESC up},0 ;XINPUT: <Square> sequence04=ccs64.exe;1;1;0;8,4 command04=sendKey,{z down},0;sleep,100;sendKey,{z up},0 ;XINPUT: <R1>+<D-Up> sequence05=ccs64.exe;1;1;0;8,32;7,0 command05=sendKey,{F1 down},0;sleep,300;sendKey,{F1 up},0 ;XINPUT: <R1>+<D-Right> sequence06=ccs64.exe;1;1;0;8,32;7,9000 command06=sendKey,{F3 down},0;sleep,300;sendKey,{F3 up},0 ;XINPUT: <L3> Toggle Mouse Cursor On/Off sequence07=0;1;1;0;8,256 command07=cursor,2 ;XINPUT: <R3> Run Notepad and open desktop.ini, killproc after 3 seconds sequence08=0;1;1;0;8,512 command08=run,notepad.exe "%USERPROFILE%\Desktop\desktop.ini",c:\;sleep,3000;killproc,notepad.exe  

    • nacerbaaziz
      By nacerbaaziz
      Hi dear
      I have a request
      I want a simplified example of how to create the toolbar
      With an example of pressing the buttons inside this bar
      for example
      Toolbar contains Three buttons
      open, save, And delete
      and i want  If i press a button from among these buttons a MSGBox appears
      I know this is easy
      But I did not know how to do it
      I hope you help me
      I apologize for the inconvenience
      Thank you in advance
    • t0nZ
      By t0nZ
      Hello to all, my problem is to have in the same gui buttons (static and dinamically generated ones) and an edit control.
      The gui also adjust its height in function of button number.
      Below you see an ugly interface and the long buttons at the bottom are dinamically generated reading from a txt file.

      Because I have "static" buttons and dynamically generated ones it's not workin' well your method, also the EDIT area is updated (is a live log) and this is detected as GUI events, and this makes the guigetmsg() "dirty".
      Have you any ideas to make it work in better way ?  I only think about creating two different GUIs to not interfere one with the other one.
      My code is this
      While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GOLLOG("<<<< STOP <<<<") Exit #cs ; test 1 Case $iStart To $iEnd ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< gollog(GUICtrlRead($nMsg) & ' ' & 'was pressed' & @CRLF) $iValueToWorkWith = $nMsg - $iStart ; Adjust as required gollog($iValueToWorkWith) ;ExitLoop #ce Case $buttonarray[1] To $buttonarray[UBound($buttonarray) - 1] $UMDguimsg = GUICtrlRead($nMsg) If $UMDguimsg <> 0 Then GOLLOG("ButtonText=[" & $UMDguimsg & "] was clicked") EndIf Case $Bcerca If BitAND(GUICtrlRead($idradio1), $GUI_CHECKED) = $GUI_CHECKED Then Multisearch("username-machinedescription") If BitAND(GUICtrlRead($idradio2), $GUI_CHECKED) = $GUI_CHECKED Then Multisearch("machinename-username") ;Multisearch("username-machinedescription") Case $Block lock() Case $Busergroups usergroups() Case $Bvnc VNC() Case $Icercato If BitAND(GUICtrlRead($idradio1), $GUI_CHECKED) = $GUI_CHECKED Then Multisearch("username-machinedescription") If BitAND(GUICtrlRead($idradio2), $GUI_CHECKED) = $GUI_CHECKED Then Multisearch("machinename-username") #CS Multisearch("username-machinedescription") Case Else msgbox(64,"test",GUIGetMsg()) $UMDguimsg = GUICtrlRead(GUIGetMsg()) If $UMDguimsg <> $salvaUMDguimsg Then MsgBox(64, "test2", $UMDguimsg) $salvaUMDguimsg = $UMDguimsg #CE EndIf EndSwitch WEnd Thank you , cheers,
    • fopetesl
      By fopetesl
      OK, still learning SOLVED! $WS_EX_COMPOSITED hides buttons?
      I've read, run examples but cannot show action buttons in tabs in a GUI.
      I've run the GUICtrlCreateTabItem function example and, of course, it works.
      Mine doesn't:
      #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> #include <MenuConstants.au3> #include <TabConstants.au3> #include <ColorConstants.au3> $hGUI = GUICreate("My GUI Tab", @DesktopWidth * 1, @DesktopHeight * 1, 0, 0,-1, $WS_EX_COMPOSITED) $hTab = GUICtrlCreateTab(10, 10, 640, 480,$TCS_HOTTRACK) ; Create tabitems ;For $i = 0 To 2 GUICtrlCreateTabItem(" Scan Sample ") ; $idButton1 = GUICtrlCreateButton("Button " & 0, 20 + (0 * 100), 40 + (0 * 50), 80, 30) ; $idButton1 = GUICtrlCreateButton("00", 20, 50, 80, 30) GUICtrlCreateLabel("label0", 30, 80, 50, 20) GUICtrlCreateButton("OK0", 20, 50, 50, 20) GUICtrlCreateInput("default", 80, 50, 70, 20) GUICtrlCreateTabItem(" Database ") GUICtrlCreateButton("Button " & 1, 20 + (1 * 100), 40 + (1 * 50), 80, 30) GUICtrlCreateTabItem(" Software ") GUICtrlCreateButton("Button " & 2, 20 + (2 * 100), 40 + (2 * 50), 80, 30) ;Next ; Close Tab definiton GUICtrlCreateTabItem("") ; Set the color of the label control. ; GUICtrlSetColor($idButton1, 0x002E7A) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd It just shows:
      whatever I try.  So I've missed, again?, that I do not have the focus?