Using Python by gimx

Need help? Ask here and someone will help
Post Reply
Abra23
Posts: 22
Joined: Sat Jul 08, 2023 4:34 pm

Using Python by gimx

Post by Abra23 »

Who can explain for me how to use python by gimx for modify Xbox one controller .

What I should to do ?!
User avatar
GoDlike
Posts: 1319
Joined: Thu Apr 28, 2016 12:47 pm
Location: Poland

Re: Using Python by gimx

Post by GoDlike »

My hardware: PS3 Slim CFW 4.80 | PS4 Pro 500 Million LE | PS5 | Xbox Series X
Steam: Godlike_RU | PSN: GoDlike_RU | XBL: GoDlike
Abra23
Posts: 22
Joined: Sat Jul 08, 2023 4:34 pm

Re: Using Python by gimx

Post by Abra23 »

Can you tell me example how to do it.

where I should type the code
Abra23
Posts: 22
Joined: Sat Jul 08, 2023 4:34 pm

Re: Using Python by gimx

Post by Abra23 »

How to use this code on gimx by python ?
I downloaded python but idk how to work on it :evil: :lol:
[*]import socket
from enum import IntEnum
from time import sleep
import struct
import sys

DEFAULT_IP = "127.0.0.1"
DEFAULT_PORT = 51914


class XboxOneControls(IntEnum):
# ... (other controls)

RS = 143


class ButtonState(IntEnum):
RELEASED = 0
PRESSED = 255


def send_message(ip, port, changes):
# ... (same as before)


def check_status(ip, port):
# ... (same as before)


def main():
# ... (same as before)

holding_rs = False
left_stick_x = 0
left_stick_y = 0

while True:
# Check for the RS button press
if not holding_rs and XboxOneControls.RS in changes:
holding_rs = True
send_message(ip, port, {XboxOneControls.RS: ButtonState.PRESSED})
print("RS button is being held.")
elif holding_rs and XboxOneControls.RS in changes:
holding_rs = False
send_message(ip, port, {XboxOneControls.RS: ButtonState.RELEASED})
print("RS button is released.")

# Check for left stick x and y thresholds
if XboxOneControls.LEFT_STICK_X in changes:
left_stick_x = changes[XboxOneControls.LEFT_STICK_X]
if left_stick_x >= 60:
changes[XboxOneControls.LEFT_STICK_X] = 100

if XboxOneControls.LEFT_STICK_Y in changes:
left_stick_y = changes[XboxOneControls.LEFT_STICK_Y]
if left_stick_y >= 40:
changes[XboxOneControls.LEFT_STICK_Y] = 100

# Send the modified changes to GIMX
send_message(ip, port, changes)
sleep(0.05)


if __name__ == "__main__":
main()
User avatar
GoDlike
Posts: 1319
Joined: Thu Apr 28, 2016 12:47 pm
Location: Poland

Re: Using Python by gimx

Post by GoDlike »

If you don't have programming knowledge you won't be able to use it.
My hardware: PS3 Slim CFW 4.80 | PS4 Pro 500 Million LE | PS5 | Xbox Series X
Steam: Godlike_RU | PSN: GoDlike_RU | XBL: GoDlike
Abra23
Posts: 22
Joined: Sat Jul 08, 2023 4:34 pm

Re: Using Python by gimx

Post by Abra23 »

GoDlike wrote: Sat Aug 05, 2023 8:55 am If you don't have programming knowledge you won't be able to use it.
I'm evolving :mrgreen:

you can see what i came up with :roll:
gimx respond my python code but nothing happened on xbox console, am trying to find solution :evil:

Image
Post Reply