summaryrefslogtreecommitdiff
path: root/windows/autohotkey/Source/Methods-ScreenKeyboard.ahk
blob: 94c0cfca394c008218af75779bc8fec47dfb351d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/*
   ------------------------------------------------------
   BildschirmTastatur
   ------------------------------------------------------
*/

guiErstellt = 0
alwaysOnTop = 1

*F1::
  if (isMod4Pressed()&&zeigeBildschirmTastatur)
    goto Switch1
  else send {blind}{F1}
return

*F2::
  if (isMod4Pressed()&&zeigeBildschirmTastatur)
    goto Switch2
  else send {blind}{F2}
return

*F3::
  if (isMod4Pressed()&&zeigeBildschirmTastatur)
    goto Switch3
  else send {blind}{F3}
return

*F4::
  if (isMod4Pressed()&&zeigeBildschirmTastatur)
    goto Switch4
  else send {blind}{F4}
return

*F5::
  if (isMod4Pressed()&&zeigeBildschirmTastatur)
    goto Switch5
  else send {blind}{F5}
return

*F6::
  if (isMod4Pressed()&&zeigeBildschirmTastatur)
    goto Switch6
  else send {blind}{F6}
return

*F7::
  if (isMod4Pressed()&&zeigeBildschirmTastatur)
    goto Show
  else send {blind}{F7}
return

*F8::
  if (isMod4Pressed()&&zeigeBildschirmTastatur)
    goto ToggleAlwaysOnTop
  else send {blind}{F8}
return

Switch1:
  tImage := ResourceFolder . "\ebene1.png"
  goto Switch
Return

Switch2:
  tImage := ResourceFolder . "\ebene2.png"
  goto Switch
Return

Switch3:
  tImage := ResourceFolder . "\ebene3.png"
  goto Switch
Return

Switch4:
  tImage := ResourceFolder . "\ebene4.png"
  goto Switch
Return

Switch5:
  tImage := ResourceFolder . "\ebene5.png"
  goto Switch
Return

Switch6:
  tImage := ResourceFolder . "\ebene6.png"
  goto Switch
Return

Switch:
  if guiErstellt {
    if (Image = tImage)
       goto Close
    else {
      Image := tImage
      SetTimer, Refresh
    }
  } else {
    Image := tImage
    goto Show    
  }
Return

Show:
  if guiErstellt {
     goto Close
  } else {
    if (Image = "") {
      Image := ResourceFolder . "\ebene1.png"
    }     
    yPosition := A_ScreenHeight -270
    Gui,Color,FFFFFF
    Gui,Add,Button,xm+5 gSwitch1,F1
    Gui,Add,Text,x+5,kleine Buchstaben
    Gui,Add,Button,xm+5 gSwitch2,F2
    Gui,Add,Text,x+5,große Buchstaben
    Gui,Add,Button,xm+5 gSwitch3,F3
    Gui,Add,Text,x+5,Satz-/Sonderzeichen
    Gui,Add,Button,xm+5 gSwitch4,F4
    Gui,Add,Text,x+5,Zahlen / Steuerung
    Gui,Add,Button,xm+5 gSwitch5,F5
    Gui,Add,Text,x+5,Sprachen
    Gui,Add,Button,xm+5 gSwitch6,F6
    Gui,Add,Text,x+5,Mathesymbole
    Gui,Add,Button,xm+5 gShow,F7
    Gui,Add,Text,x+5,An /
    Gui,Add,Text,y+3,Aus
    Gui,Add,Button,x+10 y+-30 gShow,F8
    Gui,Add,Text,x+5,OnTop
    Gui,Add,Picture,AltSubmit ys w729 h200 vPicture,%Image%
    Gui,+AlwaysOnTop
    Gui,Show,y%yposition% Autosize
;    SetTimer,Refresh
    guiErstellt = 1
  } 
Return

Close:
  guiErstellt = 0
  Gui,Destroy
Return

Refresh:
  If (Image != OldImage) {
    GuiControl,,Picture,%Image%
    OldImage := Image
  }
Return

ToggleAlwaysOnTop:
  if alwaysOnTop {
    Gui, -AlwaysOnTop
    alwaysOnTop = 0    
  } else {
    Gui, +AlwaysOnTop
    alwaysOnTop = 1
  }
Return