EloiStree / 2024_05_23_HelloStreamDeckGirleek

In the context of Girleek and a QA testing workshop. We are going to learn how to remote control game with code in a steam deck hub way.
0 stars 0 forks source link

Précédemment #44

Open EloiStree opened 1 month ago

EloiStree commented 1 month ago

Code à déposer: https://github.com/EloiStree/2024_05_23_HelloStreamDeckGirleek/issues/43

Code project Unity : https://github.com/EloiStree/2024_05_12_HelloGirleekOnShadow
Download Unity Hub: https://unity.com/download
Publish Asset Store: https://assetstore.unity.com/packages/tools/utilities/asset-store-publishing-tools-115

Guide Line :

Note: image

Yesterday

Installer Unity3D: https://unity.com/fr/download

IP: 192.168.150.3 Port: 405

Cours: https://github.com/EloiStree/2024_05_23_HelloStreamDeckGirleek/issues/38


import random
import time
import keyboard
time.sleep(6)
def get_random_letter():
    r =random.randint(0, 6)
    if r==0: 
        return "A"
    if r==1:
        return "B"
    print("Not found")
    return "space"

compteur=1
while compteur<=50:
    keyboard.press(get_random_letter())
    keyboard.release(get_random_letter())
    print(compteur)
    #compteur = compteur + 1
    compteur +=2

r =random.randint(-1, 1)

while r<0:
    time.sleep(1)
    r =random.randint(-1, 1)

    print(f"Le nombre:{r}")
    if r<0:
        print("Negatif")
    elif r==0:
        print("Zero")
    else:
        print("Positif")

print("End of loop")

def a(variable):
    print("Hello A "+str(variable))
    print(f"Hello B {variable}")
a(3)