Moin,
ich habe einen Bildschirm, auf welchem ein PC im Kiosk modus hängt und dieser eine Monitoring website anzeigt. Diese Website hat mehrere Dashboards, welche ich mit einem ganz einfachem Autoit Skript, mit hilfe von einfachen MouseMove und MouseClick befehlen durchschalte. Dies funktioniert auch ohne Probleme.
Zur Info das Skript wird immer automatisch über die Windows Aufgaben Planung gestartet, sobald der pc hochfährt und sich der Kiosk User anmeldet.
Nun zu meinem Problem: Ich würde gerne das Skript mit der F9 Taste beenden können und mit der F10 Taste daraufhin wieder starten können. Nur irgendwie funktioniert das leider nicht so wie ich mir das vorgestellt habe.
AutoIt
#Persistent ; Keep the script running
; Set Variable on False so that the script will not start by itself
$F10 = False
; Set a Hotkey for starting changing the Dashboard
HotKeySet("{F10}", "_start")
; Set a Hotkey for stopping changing the Dashboard
HotKeySet("{F9}", "_stop")
While True
; Check if F10 was pressed to start the loop
If $F10 = True
Then
; Coordinates to Estate
$x5 = 550
$y5 = 125
; Move the mouse to the Coordinates
MouseMove($x5,$y5)
; Pause just before clicking
Sleep(150)
; Execute left Click
MouseClick("left")
; Coordinates to Backups
$x6 = 550
$y6 = 170
; Move the mouse to the Coordinates
MouseMove($x6,$y6)
; Pause just before clicking
Sleep(150)
; Execute left Click
MouseClick("left")
; Pause for 2 Minutes for changing the Dashboard
Sleep(120000)
; Coordinates to Reports
$x7 = 460
$y7 = 125
; Move the mouse to the Coordinates
MouseMove($x7,$y7)
; Pause just before clicking
Sleep(250)
; Execute let Click
MouseClick("left")
; Coordinates to dropdown
$x8 = 45
$y8 = 185
; Move the mouse to the Coordinates
MouseMove($x8,$y8)
; Execute left Click
MouseClick("left")
; Coordinates to overview in the dropdown menu
$x9 = 45
$y9 = 420
; Move the mouse to the Coordinates
MouseMove($x9,$y9)
; Pause just before Clicking
Sleep(150)
; Execute the left Click
MouseClick("left")
; Pause for 2 Minutes
Sleep(120000)
; Show lower part of the Website
MouseWheel("down", 10)
; Pause for 2 Minutes
Sleep(120000)
; Go to the top part of the Website
MouseWheel("up", 20)
; Coordinates to overview
$x10 = 210
$y10 = 125
; Move the mouse to the Coordinates
MouseMove($x10, $y10)
; Pause just before clicking
MouseClick("left")
; Pause for 2 Minutes
Sleep(120000)
Sleep(100)
_start()
$F10 = True
_stop()
$F10 = False
Alles anzeigen