Vielen Dank fuer den Python- Schnipsel. Hat mir wirklich sehr geholfen. Ich habe ein kleines Skript
geschrieben, das aller 10 Sekunde den Maus- Zeiger kreisen laesst. So kann ich meine citrix session offen halten
"""
Hier mein Beispiel. Laeuft auf Linux. Weil die Formatierung verloren geht,
habe ich "TAB" eingetragen. Also bitte im Editor "TAB" durch Tabulator ersetzen.
"""
import os
import re, string
import sys
import math
import time
from ctypes import cdll
def moveMouse( x, y):
TAB"""
TABThis procedure is used to move the mouse curser.
TAB"""
TABdll = cdll.LoadLibrary('libX11.so')
TABd = dll.XOpenDisplay(None)
TABroot = dll.XDefaultRootWindow(d)
TABdll.XWarpPointer(d,None,root,0,0,0,0,x,y)
TABdll.XCloseDisplay(d)
TABreturn(0)
def drawCircle( centerX, centerY, radius):
TAB"""
TABThis procedure moves the mouse pointer in a circle shape
TAB"""
TABfor angle in range( 0, 360):
TABTABgrad = angle * math.pi / 180.0
TABTABx = math.cos( grad) * radius + radius + centerX
TABTABy = math.sin( grad) * radius + radius + centerY
TABTABmoveMouse( int(x), int(y))
TABreturn( 0)
try:
TABwhile True:
TABTABdrawCircle( 500, 500, 200)
TABTABtime.sleep(10)
except IOError:
TABprint "Could not move the mouse cursor"