BoBo Gast
|
Verfasst am: Fr Okt 28, 2005 12:07 pm Titel: Programm über Bildschirmposition ... |
|
|
... starten. Mit diesem Script kannst Du ein Programm/Dokument mit der Maus starten/aufrufen/schließen, indem du eine bestimmte Region am Bidschirmrand "berührst". Macht Sinn wenn du einen Tablett-PC oder deine Eingaben mittels Stift auf einem Touchpad machst.
Have phun.
| Code: | #Persistent
DetectHiddenWindows, On
SetTitleMatchMode, 3
CoordMode, Mouse, Relative
WinTitle1 = 1.txt - Notepad
WinTitle2 = 2.txt - Notepad
App1 = C:\1.txt
App2 = C:\2.txt
SetTimer, ScreenFrameDetector, 500
Return
ScreenFrameDetector:
TouchZoneLeftPos = %A_ScreenWidth%
TouchZoneLeftPos -= 1
TouchZoneRightPos = %A_ScreenWidth%
TouchZoneRightPos += 5
BarXPos = %A_ScreenWidth%
BarXPos -= 5
MouseGetPos, X, Y
if X between %TouchZoneLeftPos% and %TouchZoneRightPos%
{
If Y between 0 and 100 ; Show 1st AddOn
{
SplashImage,, cWBlue b1 H100 X%BarXPos% Y0
Sleep, 1500
SplashImage, Off
WinShow, %WinTitle1%
WinActivate, %WinTitle1%
}
If Y between 101 and 200 ; Show 2nd AddOn
{
SplashImage,, cWGreen b1 H100 X%BarXPos% Y101
Sleep, 1500
SplashImage, Off
WinShow, %WinTitle2%
WinActivate, %WinTitle2%
}
If Y between 201 and 300 ; Hide loaded AddOns
{
SplashImage,, cWYellow b1 H100 X%BarXPos% Y201
Sleep, 1500
SplashImage, Off
WinHide, %WinTitle1%
WinHide, %WinTitle2%
}
If Y between 301 and 400 ; Load AddOns
{
SplashImage,, cWWhite b1 H100 W20 X%BarXPos% Y301
Sleep, 1500
SplashImage, Off
Run, %App1%,,Hide
Run, %App2%,,Hide
SoundPlay, C:\WINNT\Media\Ding.wav, 1
}
If Y between 401 and 500 ; Terminate loaded AddOns
{
SplashImage,, cWRed b1 H100 W20 X%BarXPos% Y401
Sleep, 1500
SplashImage, Off
WinKill, %WinTitle1%
WinKill, %WinTitle2%
}
}
Return |
Originalbeitrag gab es bereits einmal [hier] |
|