Hi Chris!
I've the following script running in the background and exactly every 2 minutes the "A_GuiEvent" is triggered so that the alt-tab function switches my programs. Do you have any explanation for that behaviour?
This script is running under W98 with IE6 (from where the Calendar-Class is(?)).
Short version:
Code:
gui, add, MonthCal, gDatum vADat Multi
...
return
Datum:
if A_GuiEvent=Normal
{
...
send, !{tab}
}
return
Full proggi:
Code:
/*
This script shows a Calendar. If you click on a date this date is been put into the clipboard.
A shift-click on a second date puts "FirstDate - SecondDate" into the clipboard.
"strg-e" opens an InputBox. You may enter your prefered date-format there.
You can not compile this script because it's self-modifing!
There's no use to format the script with indents due to the self-modifing. All indents will be deleted after closing the Gui.
Have fun! www.kapege.de
*/
#NoTrayIcon
title=MiniCal
IniRead, X, %A_ScriptFullPath%, Coord, x, 1
IniRead, Y, %A_ScriptFullPath%, Coord, y, 1
IniRead, F, %A_ScriptFullPath%, Coord, Format, 1
; "+ToolWindow" prevents the MonthCal from appearing in the Alt-Tab list
gui, +ToolWindow -MaximizeBox -LastFound -SysMenu ; +AlwaysOnTop
gui, add, MonthCal, gDatum vADat Multi
gui, show, x%X% y%Y% NoActivate, %title%
return
Datum:
if A_GuiEvent=Normal
{
StringSplit, VonBis, ADat,-
FormatTime, ADat1, %VonBis1%, %F%
FormatTime, ADat2, %VonBis2%, %F%
if (ADat1=ADat2)
ADat=%ADat1%
else
ADat=%ADat1% - %ADat2%
Clipboard=%ADat%
send, !{tab}
}
return
^e::
InputBox, Format, %title%, Enter new date format,,150,110,,,,,%F%
if ErrorLevel=0
{
IniWrite, %Format%, %A_ScriptFullPath%, Coord, Format
F :=Format
}
return
GUIEscape:
GUIClose:
WinGetPos, x, y,,,A
IniWrite, %x%, %A_ScriptFullPath%, Coord, x
IniWrite, %y%, %A_ScriptFullPath%, Coord, y
ExitApp
return
; Do not delete the next line with the /* !!!
/*
[Coord]
x=1288
y=497
Format=dd.MM.yy
_________________
Peter
Wisenheiming for beginners:
KaPeGe (German only, sorry)