Jump to content

Search the Community

Showing results for tags 'hotkeypressed'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Categories

  • 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

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. Hello all! In celebration of Rocket League supporting cross platform play with the XBone I wanted to finally create a script to accompany my game winning goals! Currently I have a switch where one button will play this soccer.mp3 while the other cuts the audio in case someone skips the replay during the game. I have a collection of mp3 files that I would like to use from "C:\Rocket" folder and I would like to play a random file from that directory so "C:\Rocket\*.mp3". I am having trouble understanding the random() function and hot to integrate it. Or would I need to create an array before being able to use the random function? Also for note I am trying to use about 20 mp3 files. #include <MsgBoxConstants.au3> Global $g_bPaused = False HotKeySet("{8}", "HotKeyPressed") HotKeySet("{5}", "HotKeyPressed") Func HotKeyPressed() Switch @HotKeyPressed Case "{8}" SoundPlay("") Case "{5}" SoundPlay("C:\Rocket\Soccer.mp3") EndSwitch EndFunc The recordings are newscasters similar to this. Thought that it would have been nice for this to have been in the game to begin with lol Thanks Everyone!
  2. Hello all, I found a couple of threads that touched in this issue - but workarounds were always found before anyone could get around to answering the original request. So, I'll ask here: I've got a function that is going to be handling the administration of a lot of stuff. The GUI I have running is calling this function on 17 different GUI button presses and what will eventually be around 50 hotkeys. Before you think it's a keylogger, it isn't. The GUI is representing one of my companies keypads and controlling it via a serial connection. As it stands, if I want to enter an alphanumeric character in the keypad, I can do so by pressing a button. It would be MUCH simpler to be able to type everything into the keypad. Anyway, each hotkey press and GUI button press is calling the same function. The function sends the key to the keypad and writes the function call (_Reg_PressKey()) and its keypress to a listview that records the script. The beginning of the function code looks like this: Func bKeypadButtons() Select Case @GUI_CtrlId = $bTop1 Or @HotKeyPressed = "{NUMPADDIV}" _Reg_PressKey("T1") __WriteKeypress("T1") Case @GUI_CtrlId = $bTop2 Or @HotKeyPressed = "{NUMPADMULT}" _Reg_PressKey("T2") __WriteKeypress("T2") Case @GUI_CtrlId = $bTop3 Or @HotKeyPressed = "{NUMPADSUB}" _Reg_PressKey("T3") __WriteKeypress("T3") Case @GUI_CtrlId = $bTop4 Or @HotKeyPressed = "{NUMPADADD}" _Reg_PressKey("T4") __WriteKeypress("T4") Case @GUI_CtrlId = $bKey1 Or @HotKeyPressed = "{NUMPAD1}" _Reg_PressKey("1") __WriteKeypress("1") Case @GUI_CtrlId = $bKey2 Or @HotKeyPressed = "{NUMPAD2}" _Reg_PressKey("2") __WriteKeypress("2") Case @GUI_CtrlId = $bKey3 Or @HotKeyPressed = "{NUMPAD3}" _Reg_PressKey("3") __WriteKeypress("3") Case @GUI_CtrlId = $bKey4 Or @HotKeyPressed = "{NUMPAD4}" _Reg_PressKey("4") __WriteKeypress("4") ;ETC. This goes on for the enter numberpad and most of the alpha keys As it stands, it seems that I can not use both @GUI_CtrlID and @HotKeyPressed in the same function. This would save a significant amount of code and greatly increase the efficiency if it were possible. Any ideas? Thanks, Fett
×
×
  • Create New...