-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPD.vb
1674 lines (1542 loc) · 71 KB
/
PD.vb
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Public Class PD
'@dnaspider
Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As Int32) As UShort
Private Declare Sub Keybd_event Lib "user32" Alias "keybd_event" (ByVal bVk As Integer, bScan As Integer, ByVal dwFlags As Integer, ByVal dwExtraInfo As Integer)
Private Declare Function SetCursorPos Lib "user32.dll" (ByVal X As Int32, ByVal Y As Int32) As UShort
Private Declare Sub Mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer)
Sub LeftClick()
Mouse_event(&H2, 0, 0, 0, 0)
Mouse_event(&H4, 0, 0, 0, 0)
End Sub
Sub LeftHold()
Mouse_event(&H2, 0, 0, 0, 0)
End Sub
Sub LeftRelease()
Mouse_event(&H4, 0, 0, 0, 0)
End Sub
Sub MiddleClick()
Mouse_event(&H20, 0, 0, 0, 0)
Mouse_event(&H40, 0, 0, 0, 0)
End Sub
Sub MiddleHold()
Mouse_event(&H20, 0, 0, 0, 0)
End Sub
Sub MiddleRelease()
Mouse_event(&H40, 0, 0, 0, 0)
End Sub
Sub RightClick()
Mouse_event(&H8, 0, 0, 0, 0) '&H2
Mouse_event(&H10, 0, 0, 0, 0) '&H4
End Sub
Sub RightHold()
Mouse_event(&H8, 0, 0, 0, 0)
End Sub
Sub RightRelease()
Mouse_event(&H10, 0, 0, 0, 0)
End Sub
Dim g_drag As Boolean
Dim g_drag_x As Integer
Dim g_drag_y As Integer
Sub DragFormInit()
g_drag = True
g_drag_x = Cursor.Position.X - Me.Left
g_drag_y = Cursor.Position.Y - Me.Top
End Sub
Sub DragForm()
If g_drag = True Then
Me.Top = Cursor.Position.Y - g_drag_y
Me.Left = Cursor.Position.X - g_drag_x
End If
End Sub
Sub Key(key As Integer, shft As Boolean, presses As Integer)
If shft Then Keybd_event(Keys.RShiftKey, 0, 1, 0)
If CInt(g_presses) > 1 Then presses = CInt(g_presses)
Dim x = 1 : If key = Keys.Left Or key = Keys.Up Or key = Keys.Right Or key = Keys.Down Or key = Keys.Home Or key = Keys.End Then x = 1 Else x = 0
For i = 1 To presses
Keybd_event(key, 0, x, 0)
Keybd_event(key, 0, 2, 0)
Next
If shft Then Keybd_event(Keys.RShiftKey, 0, 2, 0)
GetAsyncKeyState(key)
End Sub
'Sub KeyHold(key As Integer)
' Dim x = 0 : If key = Keys.LShiftKey Then x = 0 Else x = 1
' Keybd_event(key, 0, x, 0)
'End Sub
Sub KeyRelease(key As Integer)
Keybd_event(key, 0, 2, 0)
End Sub
Sub TextClear()
TextBox1.SelectAll()
TextBox1.SelectedText = ""
End Sub
Sub SleepMinutes(m As Integer)
Dim x = Now.AddMinutes(m)
Application.DoEvents()
Do While x > Now
If CBool(GetAsyncKeyState(Keys.Pause)) Or CBool(GetAsyncKeyState(Keys.Escape)) Then Exit Do
System.Threading.Thread.Sleep(m)
Loop
Application.DoEvents()
End Sub
Sub SleepMS(ms As Integer)
Dim x = Now.AddMilliseconds(ms)
Application.DoEvents()
Do While x > Now
If CBool(GetAsyncKeyState(Keys.Pause)) Or CBool(GetAsyncKeyState(Keys.Escape)) Then Exit Do
System.Threading.Thread.Sleep(ms)
Loop
Application.DoEvents()
End Sub
Sub Sleep(ms As Integer)
System.Threading.Thread.Sleep(ms)
Application.DoEvents()
End Sub
Sub Timeout(ms As Integer)
Dim x = Now.AddMilliseconds(ms)
Do While x > Now
If CBool(GetAsyncKeyState(Keys.Pause)) Or CBool(GetAsyncKeyState(Keys.Escape)) Then Exit Sub
Application.DoEvents()
Loop
End Sub
Sub LoadArray()
ar.Clear()
For x = 0 To ListBox1.Items.Count - 1
If ListBox1.Items(x).ToString.StartsWith(p_) Then ar.Add(x & ":" & ListBox1.Items(x).ToString.Substring(1, ListBox1.Items(x).ToString.IndexOf(_p) - 1))
Next
'For x = 0 To ar.Count - 1
' Console.WriteLine(ar.Count & ": ar: " & ar(x).ToString)
'Next
End Sub
Sub LoadSe()
My.Settings.Upgrade()
If My.Settings.SettingIcon > "" Then Me.Icon = New Icon(My.Settings.SettingIcon)
TextBox1.WordWrap = My.Settings.SettingWordWrap
DarkMode()
Timer1.Interval = My.Settings.SettingInterval
Me.Opacity = My.Settings.SettingOpacity
Me.TopMost = My.Settings.SettingTopMost
GetBorder()
Me.ListBox1.Font = New System.Drawing.Font(TextBox1.Font.Name, My.Settings.SettingListBoxFontSize)
SplitContainer1.SplitterWidth = My.Settings.SettingSplitterWidth
If My.Settings.SettingBackgroundImage > "" Then
Select Case My.Settings.SettingBackgroundImageLayout
Case 0
Me.BackgroundImageLayout = ImageLayout.None
Case 1
Me.BackgroundImageLayout = ImageLayout.Tile
Case 2
Me.BackgroundImageLayout = ImageLayout.Center
Case 3
Me.BackgroundImageLayout = ImageLayout.Stretch
Case 4
Me.BackgroundImageLayout = ImageLayout.Zoom
Case Else
Me.BackgroundImageLayout = ImageLayout.Center
End Select
Me.BackgroundImage = Image.FromFile(My.Settings.SettingBackgroundImage)
End If
On Error Resume Next
SplitContainer1.SplitterDistance = My.Settings.SettingSplitterDistance
End Sub
Sub LoadDb()
For Each item As String In My.Settings.SettingDB
ListBox1.Items.Add(CStr(item))
Next
LoadArray()
End Sub
Sub AddDbItm()
My.Settings.SettingDB.Add(TextBox1.Text)
ListBox1.Items.Add(TextBox1.Text)
TextClear()
ListBox1.SelectedIndex() = ListBox1.Items.Count - 1
KeyRelease(Keys.S)
KeyRelease(g_bracketKey)
CleanMock()
LoadArray()
End Sub
Sub RemoveDbItm()
If ListBox1.SelectedIndex = -1 Then Exit Sub
Dim x As String = TextBox1.Text
TextClear()
TextBox1.AppendText(ListBox1.SelectedItem.ToString)
My.Settings.SettingDB.RemoveAt(ListBox1.SelectedIndex)
ListBox1.Items.RemoveAt(ListBox1.SelectedIndex)
Key(Keys.Down, False, 1)
TextClear()
TextBox1.AppendText(x)
LoadArray()
End Sub
Sub UpdateDbItm()
If ListBox1.SelectedIndex < 0 Or TextBox1.Text = "" Then Exit Sub
Dim x As Integer = TextBox1.SelectionStart
Dim i As Integer = ListBox1.SelectedIndex
ListBox1.Items.RemoveAt(i)
My.Settings.SettingDB.RemoveAt(i)
ListBox1.Items.Insert(i, TextBox1.Text)
My.Settings.SettingDB.Insert(i, TextBox1.Text)
ListBox1.SelectedItem() = ListBox1.Items.Item(i)
TextBox1.SelectionStart = x
CleanMock()
LoadArray()
End Sub
Sub CleanMock()
Sleep(333)
TextBox2.Clear()
End Sub
Sub CleanSelect()
Sleep(333)
ListBox1.SelectedIndex() = ListBox1.SelectedIndex
CleanMock()
End Sub
Sub EditDbItm()
If ListBox1.GetItemText(ListBox1.SelectedItem) > "" And TextBox1.Text = "" Then
TextBox1.AppendText(ListBox1.SelectedItem.ToString)
CleanMock()
End If
End Sub
Sub ClearAllKeys()
For i = 48 To 57 '0-9
GetAsyncKeyState(i)
Next
For i = 65 To 90 'a-z
GetAsyncKeyState(i)
Next
GetAsyncKeyState(Keys.Tab)
GetAsyncKeyState(Keys.Insert)
GetAsyncKeyState(Keys.Space)
GetAsyncKeyState(g_bracketKey)
GetAsyncKeyState(g_repeatKey)
#Region "rem"
'GetAsyncKeyState(Keys.Escape)
'GetAsyncKeyState(Keys.F1)
'GetAsyncKeyState(Keys.F2)
'GetAsyncKeyState(Keys.F3)
'GetAsyncKeyState(Keys.F4)
'GetAsyncKeyState(Keys.F5)
'GetAsyncKeyState(Keys.F6)
'GetAsyncKeyState(Keys.F7)
'GetAsyncKeyState(Keys.F8)
'GetAsyncKeyState(Keys.F9)
'GetAsyncKeyState(Keys.F10)
'GetAsyncKeyState(Keys.F11)
'GetAsyncKeyState(Keys.F12)
'GetAsyncKeyState(Keys.PrintScreen)
'GetAsyncKeyState(Keys.Scroll)
'GetAsyncKeyState(Keys.Pause)
'GetAsyncKeyState(Keys.LWin)
'GetAsyncKeyState(Keys.RWin)
'GetAsyncKeyState(Keys.LShiftKey)
'GetAsyncKeyState(Keys.RShiftKey)
'GetAsyncKeyState(Keys.LMenu) 'alt
'GetAsyncKeyState(Keys.RMenu)
'GetAsyncKeyState(Keys.LControlKey)
'GetAsyncKeyState(Keys.RControlKey)
'GetAsyncKeyState(Keys.Enter)
'GetAsyncKeyState(Keys.Tab)
'GetAsyncKeyState(Keys.CapsLock)
'GetAsyncKeyState(Keys.Space)
'GetAsyncKeyState(Keys.OemQuestion)
'GetAsyncKeyState(Keys.OemOpenBrackets)
'GetAsyncKeyState(Keys.OemCloseBrackets)
'GetAsyncKeyState(Keys.OemBackslash)
'GetAsyncKeyState(Keys.OemPipe)
'GetAsyncKeyState(Keys.OemSemicolon)
'GetAsyncKeyState(Keys.OemQuotes)
'GetAsyncKeyState(Keys.OemMinus)
'GetAsyncKeyState(Keys.Oemplus)
'GetAsyncKeyState(Keys.Oemcomma)
'GetAsyncKeyState(Keys.OemPeriod)
'GetAsyncKeyState(Keys.Up)
'GetAsyncKeyState(Keys.Down)
'GetAsyncKeyState(Keys.Left)
'GetAsyncKeyState(Keys.Right)
'GetAsyncKeyState(Keys.PageUp)
'GetAsyncKeyState(Keys.PageDown)
'GetAsyncKeyState(Keys.Home)
'GetAsyncKeyState(Keys.End)
'GetAsyncKeyState(Keys.Delete)
'GetAsyncKeyState(Keys.Back)
'GetAsyncKeyState(Keys.Menu)
'GetAsyncKeyState(Keys.NumLock)
'GetAsyncKeyState(Keys.NumPad0)
'GetAsyncKeyState(Keys.NumPad1)
'GetAsyncKeyState(Keys.NumPad2)
'GetAsyncKeyState(Keys.NumPad3)
'GetAsyncKeyState(Keys.NumPad4)
'GetAsyncKeyState(Keys.NumPad5)
'GetAsyncKeyState(Keys.NumPad6)
'GetAsyncKeyState(Keys.NumPad7)
'GetAsyncKeyState(Keys.NumPad8)
'GetAsyncKeyState(Keys.NumPad9)
'GetAsyncKeyState(Keys.Multiply)
'GetAsyncKeyState(Keys.Add)
'GetAsyncKeyState(Keys.Divide)
'GetAsyncKeyState(Keys.Subtract)
'GetAsyncKeyState(Keys.Return)
'GetAsyncKeyState(Keys.Oem1) ';
'GetAsyncKeyState(Keys.Oem2) '/
'GetAsyncKeyState(Keys.Oem3) '`
'GetAsyncKeyState(Keys.Oem4) '[
'GetAsyncKeyState(Keys.Oem5) '\
'GetAsyncKeyState(Keys.Oem6) ']
'GetAsyncKeyState(Keys.Oem7) '
'GetAsyncKeyState(Keys.VolumeUp)
'GetAsyncKeyState(Keys.VolumeDown)
'GetAsyncKeyState(Keys.VolumeMute)
'GetAsyncKeyState(Keys.MediaPlayPause)
'GetAsyncKeyState(Keys.MediaStop)
'GetAsyncKeyState(Keys.MediaPreviousTrack)
'GetAsyncKeyState(Keys.MediaNextTrack)
#End Region
End Sub
Sub TextMock()
If TextBox2.TextLength > 20 Then TextBox2.Clear() : Exit Sub
If TextBox2.Text.StartsWith(p_) Then Exit Sub
TextBox2.Text = Microsoft.VisualBasic.Right(TextBox2.Text, g_length)
End Sub
Sub DarkMode()
If My.Settings.SettingDarkMode = True Then
ListBox1.BackColor = Color.Black
ListBox1.ForeColor = My.Settings.SettingDarkModeText
TextBox1.BackColor = Color.Black
TextBox1.ForeColor = My.Settings.SettingDarkModeText
Me.BackColor = Color.Black
End If
End Sub
Sub SaveSettings()
If Me.Top <> -32000 Then My.Settings.SettingLocationTop = Me.Top
If Me.Left <> -32000 Then My.Settings.SettingLocationLeft = Me.Left
'If WindowState = 0 And ControlBox = True Then
My.Settings.SettingHeight = Me.Height
My.Settings.SettingWidth = Me.Width
'End If
If ListBox1.Focused Then My.Settings.SettingTabIndex = 1
If TextBox1.Focused Then My.Settings.SettingTabIndex = 5
My.Settings.SettingSelectionStart = TextBox1.SelectionStart
My.Settings.SettingSelectionLength = TextBox1.SelectionLength
My.Settings.SettingTextBoxZoomFactor = TextBox1.ZoomFactor
My.Settings.SettingTextBox = TextBox1.Text
My.Settings.SettingListboxSelectedIndex = ListBox1.SelectedIndex
My.Settings.SettingListBoxFontSize = Me.ListBox1.Font.Size
My.Settings.SettingSplitterDistance = SplitContainer1.SplitterDistance
'config
If My.Settings.SettingFirstLoad = 0 Then
My.Settings.SettingBorderStyle = My.Settings.SettingBorderStyle
My.Settings.SettingIcon = My.Settings.SettingIcon
My.Settings.SettingTitleText = My.Settings.SettingTitleText
My.Settings.SettingWordWrap = My.Settings.SettingWordWrap
My.Settings.SettingCodeLength = My.Settings.SettingCodeLength
My.Settings.SettingBracketKey = My.Settings.SettingBracketKey
My.Settings.SettingRepeatKey = My.Settings.SettingRepeatKey
My.Settings.SettingTitleTip = My.Settings.SettingTitleTip
My.Settings.SettingBracketModeOnlyScan = My.Settings.SettingBracketModeOnlyScan
My.Settings.SettingInterval = My.Settings.SettingInterval
My.Settings.SettingDarkMode = My.Settings.SettingDarkMode
My.Settings.SettingDarkModeText = My.Settings.SettingDarkModeText
My.Settings.SettingOpacity = My.Settings.SettingOpacity
My.Settings.SettingTopMost = My.Settings.SettingTopMost
My.Settings.SettingSendkeysOnlyMode = My.Settings.SettingSendkeysOnlyMode
My.Settings.SettingBracketOpen = My.Settings.SettingBracketOpen
My.Settings.SettingBracketClose = My.Settings.SettingBracketClose
My.Settings.SettingBackgroundImage = My.Settings.SettingBackgroundImage
My.Settings.SettingBackgroundImageLayout = My.Settings.SettingBackgroundImageLayout
My.Settings.SettingInfiniteLoop = My.Settings.SettingInfiniteLoop
My.Settings.SettingIgnoreWhiteSpaceOpen = My.Settings.SettingIgnoreWhiteSpaceOpen
My.Settings.SettingIgnoreWhiteSpaceClose = My.Settings.SettingIgnoreWhiteSpaceClose
My.Settings.SettingInsertSymbol = My.Settings.SettingInsertSymbol
My.Settings.SettingOpenCloseBracketModeScan = My.Settings.SettingOpenCloseBracketModeScan
My.Settings.SettingSettingClickItemToRun = My.Settings.SettingSettingClickItemToRun
My.Settings.SettingFirstLoad += 1
End If
My.Settings.Save()
End Sub
Private Sub PD_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
Timer1.Dispose()
SaveSettings()
End Sub
Private Sub PD_Load(sender As Object, e As EventArgs) Handles Me.Load
If My.Settings.SettingFirstLoad = 0 Then Application.Restart()
LoadDb()
Me.Show()
Me.Top = My.Settings.SettingLocationTop
Me.Left = My.Settings.SettingLocationLeft
Me.Height = My.Settings.SettingHeight
Me.Width = My.Settings.SettingWidth
If ListBox1.Items.Count > 0 Then ListBox1.SelectedIndex = My.Settings.SettingListboxSelectedIndex
Select Case My.Settings.SettingTabIndex
Case 1
ListBox1.Focus()
Case 5
TextBox1.Focus()
Case Else
ListBox1.Focus()
End Select
TextBox1.Text = My.Settings.SettingTextBox
If TextBox1.Focused Then
TextBox1.SelectionStart = My.Settings.SettingSelectionStart
TextBox1.SelectionLength = My.Settings.SettingSelectionLength
End If
TextBox1.ZoomFactor = My.Settings.SettingTextBoxZoomFactor
LoadSe()
If My.Settings.SettingBackgroundImage > "" Then FixedSize()
'If TextBox1.Text = "'" Then TextBox1.Focus() : Kb("'") 'SendKeys.Send("^a'^a") 'off
'If My.Settings.SettingBackgroundImage > "" And Me.Text > "" Then FixedSize()
End Sub
Private Sub PD_MouseDown(sender As Object, e As MouseEventArgs) Handles Me.MouseDown
If MouseButtons = Windows.Forms.MouseButtons.Left Then DragFormInit()
End Sub
Private Sub PD_MouseUp(sender As Object, e As MouseEventArgs) Handles Me.MouseUp
g_drag = False
End Sub
Private Sub PD_MouseMove(sender As Object, e As MouseEventArgs) Handles Me.MouseMove
If MouseButtons = Windows.Forms.MouseButtons.Left Then DragForm()
End Sub
Dim g_bracketKey As Integer = My.Settings.SettingBracketKey
Dim g_repeatKey As Integer = My.Settings.SettingRepeatKey
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
If CBool(GetAsyncKeyState(Keys.Back)) Then If TextBox2.Text > "" Then TextBox2.Text = Microsoft.VisualBasic.Left(TextBox2.Text, Len(TextBox2.Text) - 1)
If CBool(GetAsyncKeyState(g_repeatKey)) Then
If TextBox1.ContainsFocus Then Exit Sub
TextBox2.Text = "'"
If My.Settings.SettingTitleTip = True And ControlBox = True Then Me.Text = My.Settings.SettingTitleText & " > " & g_s
If TextBox1.Text > "" Then
If TextBox1.SelectedText.Length > 0 Then g_s = TextBox1.SelectedText
If TextBox1.SelectedText.Length = 0 Then g_s = TextBox1.Text
If My.Settings.SettingTitleTip = True And ControlBox = True Then Me.Text = My.Settings.SettingTitleText & " > " & g_s
PD()
End If
If TextBox1.Text = "" And ListBox1.Items.Count > 0 Then PD()
If My.Settings.SettingTitleTip = True And ControlBox = True Then Me.Text = My.Settings.SettingTitleText
ClearAllKeys()
TextBox2.Clear()
End If
If TextBox1.ContainsFocus And CBool(GetAsyncKeyState(Keys.F5)) Then
If TextBox1.Text = "" Then Exit Sub
TextBox2.Text = "'"
Dim x As Boolean = Me.Visible
Me.Visible = False
Sleep(1)
If TextBox1.SelectedText.Length > 0 Then
g_s = TextBox1.SelectedText
PD()
Else
If TextBox1.Text > "" Then g_s = TextBox1.Text : PD()
End If
Me.Visible = x
ClearAllKeys()
TextBox2.Clear()
End If
If CBool(GetAsyncKeyState(g_bracketKey)) Then
If TextBox2.Text.StartsWith(p_) Then
If My.Settings.SettingOpenCloseBracketModeScan Then
If TextBox2.Text.Contains(_p) Or TextBox2.Text = p_ Then TextBox2.Clear() Else TextBox2.Text += _p : Exit Sub
Else
TextBox2.Clear()
End If
Else
ClearAllKeys()
TextBox2.Text = p_
End If
End If
If My.Settings.SettingBracketModeOnlyScan And TextBox2.Text.StartsWith(p_) = False Then Exit Sub
If CBool(GetAsyncKeyState(Keys.Insert)) Then TextBox2.AppendText(My.Settings.SettingInsertSymbol)
If CBool(GetAsyncKeyState(Keys.Z)) Then TextBox2.AppendText("z")
If CBool(GetAsyncKeyState(Keys.X)) Then TextBox2.AppendText("x")
If CBool(GetAsyncKeyState(Keys.C)) Then TextBox2.AppendText("c")
If CBool(GetAsyncKeyState(Keys.V)) Then TextBox2.AppendText("v")
If CBool(GetAsyncKeyState(Keys.B)) Then TextBox2.AppendText("b")
If CBool(GetAsyncKeyState(Keys.N)) Then TextBox2.AppendText("n")
If CBool(GetAsyncKeyState(Keys.M)) Then TextBox2.AppendText("m")
If CBool(GetAsyncKeyState(Keys.A)) Then TextBox2.AppendText("a")
If CBool(GetAsyncKeyState(Keys.S)) Then TextBox2.AppendText("s")
If CBool(GetAsyncKeyState(Keys.D)) Then TextBox2.AppendText("d")
If CBool(GetAsyncKeyState(Keys.F)) Then TextBox2.AppendText("f")
If CBool(GetAsyncKeyState(Keys.G)) Then TextBox2.AppendText("g")
If CBool(GetAsyncKeyState(Keys.H)) Then TextBox2.AppendText("h")
If CBool(GetAsyncKeyState(Keys.J)) Then TextBox2.AppendText("j")
If CBool(GetAsyncKeyState(Keys.K)) Then TextBox2.AppendText("k")
If CBool(GetAsyncKeyState(Keys.L)) Then TextBox2.AppendText("l")
If CBool(GetAsyncKeyState(Keys.Q)) Then TextBox2.AppendText("q")
If CBool(GetAsyncKeyState(Keys.W)) Then TextBox2.AppendText("w")
If CBool(GetAsyncKeyState(Keys.E)) Then TextBox2.AppendText("e")
If CBool(GetAsyncKeyState(Keys.R)) Then TextBox2.AppendText("r")
If CBool(GetAsyncKeyState(Keys.T)) Then TextBox2.AppendText("t")
If CBool(GetAsyncKeyState(Keys.Y)) Then TextBox2.AppendText("y")
If CBool(GetAsyncKeyState(Keys.U)) Then TextBox2.AppendText("u")
If CBool(GetAsyncKeyState(Keys.I)) Then TextBox2.AppendText("i")
If CBool(GetAsyncKeyState(Keys.O)) Then TextBox2.AppendText("o")
If CBool(GetAsyncKeyState(Keys.P)) Then TextBox2.AppendText("p")
If CBool(GetAsyncKeyState(Keys.D1)) Then TextBox2.AppendText("1")
If CBool(GetAsyncKeyState(Keys.D2)) Then TextBox2.AppendText("2")
If CBool(GetAsyncKeyState(Keys.D3)) Then TextBox2.AppendText("3")
If CBool(GetAsyncKeyState(Keys.D4)) Then TextBox2.AppendText("4")
If CBool(GetAsyncKeyState(Keys.D5)) Then TextBox2.AppendText("5")
If CBool(GetAsyncKeyState(Keys.D6)) Then TextBox2.AppendText("6")
If CBool(GetAsyncKeyState(Keys.D7)) Then TextBox2.AppendText("7")
If CBool(GetAsyncKeyState(Keys.D8)) Then TextBox2.AppendText("8")
If CBool(GetAsyncKeyState(Keys.D9)) Then TextBox2.AppendText("9")
If CBool(GetAsyncKeyState(Keys.D0)) Then TextBox2.AppendText("0")
If CBool(GetAsyncKeyState(Keys.Space)) Then TextBox2.AppendText(" ")
If CBool(GetAsyncKeyState(Keys.Tab)) Then TextBox2.AppendText("T")
#Region "rem"
'If CBool(GetAsyncKeyState(Keys.Escape)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.F1)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.F2)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.F3)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.F4)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.F5)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.F6)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.F7)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.F8)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.F9)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.F10)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.F11)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.F12)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.PrintScreen)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Scroll)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Pause)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.LWin)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.RWin)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.LShiftKey)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.RShiftKey)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.LMenu)) Then TextBox2.AppendText("") 'alt
'If CBool(GetAsyncKeyState(Keys.RMenu)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.LControlKey)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.RControlKey)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Enter)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Tab)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.CapsLock)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Space)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.OemQuestion)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.OemOpenBrackets)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.OemCloseBrackets)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.OemBackslash)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.OemPipe)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.OemSemicolon)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.OemQuotes)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.OemMinus)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Oemplus)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Oemcomma)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.OemPeriod)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Up)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Down)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Left)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Right)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.PageDown)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.PageUp)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Home)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.End)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Delete)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Menu)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.NumLock)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.NumPad0)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.NumPad1)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.NumPad2)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.NumPad3)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.NumPad4)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.NumPad5)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.NumPad6)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.NumPad7)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.NumPad8)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.NumPad9)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Multiply)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Add)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Divide)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Subtract)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Return)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.Oem1)) Then TextBox2.AppendText("") ';
'If CBool(GetAsyncKeyState(Keys.Oem2)) Then TextBox2.AppendText("") '/
'If CBool(GetAsyncKeyState(Keys.Oem3)) Then TextBox2.AppendText("") '`
'If CBool(GetAsyncKeyState(Keys.Oem4)) Then TextBox2.AppendText("") '[
'If CBool(GetAsyncKeyState(Keys.Oem5)) Then TextBox2.AppendText("") '\
'If CBool(GetAsyncKeyState(Keys.Oem6)) Then TextBox2.AppendText("") ']
'If CBool(GetAsyncKeyState(Keys.Oem7)) Then TextBox2.AppendText("") '
'If CBool(GetAsyncKeyState(Keys.VolumeUp)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.VolumeDown)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.VolumeMute)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.MediaPlayPause)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.MediaStop)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.MediaPreviousTrack)) Then TextBox2.AppendText("")
'If CBool(GetAsyncKeyState(Keys.MediaNextTrack)) Then TextBox2.AppendText("")
#End Region
If CBool(GetAsyncKeyState(Keys.Escape)) And CBool(GetAsyncKeyState(Keys.X)) Then
Clipboard.SetText(p_ & "xy:" & MousePosition.X & "," & MousePosition.Y & _p)
End If
If CBool(GetAsyncKeyState(Keys.Escape)) And CBool(GetAsyncKeyState(Keys.H)) Then 'toggle visibility
KeyRelease(Keys.H)
KeyRelease(Keys.Escape)
If Not Me.Visible Then
Me.Show()
If Me.Text > "" Then AppActivate(My.Settings.SettingTitleText)
Exit Sub
End If
If Me.Visible Then
Me.Hide()
Exit Sub
End If
End If
End Sub
Private Sub TextBox1_DoubleClick(sender As Object, e As EventArgs) Handles TextBox1.DoubleClick
If TextBox1.Text = "" And TextBox2.TextLength = g_length Then
TextBox1.AppendText(TextBox2.Text) 'get code
Exit Sub
End If
If TextBox1.SelectedText = "" Then
SendKeys.Send(p_ & _p & "{left}") '«»
Exit Sub
End If
End Sub
Private Sub TextBox1_KeyPress(sender As Object, e As KeyPressEventArgs) Handles TextBox1.KeyPress
If CBool(GetAsyncKeyState(Keys.LControlKey)) And CBool(GetAsyncKeyState(Keys.X)) Then GetAsyncKeyState(Keys.X) 'clear
If CBool(GetAsyncKeyState(Keys.LControlKey)) And CBool(GetAsyncKeyState(Keys.C)) Then GetAsyncKeyState(Keys.C)
If CBool(GetAsyncKeyState(Keys.LControlKey)) And CBool(GetAsyncKeyState(Keys.A)) And TextBox1.TextLength > 1 Then
TextBox1.SelectionStart = 0
TextBox1.SelectionLength = TextBox1.TextLength
End If
If e.KeyChar = ChrW(19) Then AddDbItm() 'ctrl + s
If e.KeyChar = ChrW(21) Then UpdateDbItm() 'ctrl + u
If e.KeyChar = ChrW(5) Then 'ctrl + e
TextBox1.Undo()
EditDbItm()
End If
If e.KeyChar = ChrW(22) Then 'ctrl + v
GetAsyncKeyState(Keys.V)
If Clipboard.GetText > "" Then Clipboard.SetText(Clipboard.GetText.ToString) 'double paste, raw txt
TextBox1.Undo()
TextBox1.Paste()
CleanMock()
End If
If CBool(GetAsyncKeyState(Keys.Tab)) Then
If My.Settings.SettingSendkeysOnlyMode Then Exit Sub
KeyRelease(Keys.Tab)
If TextBox1.SelectionStart = 0 Or TextBox1.SelectionStart = TextBox1.TextLength Then
Key(Keys.Back, False, 1)
SendKeys.Send(p_ & _p & "{left}")
Exit Sub
End If
Dim x As String
'If TextBox1.SelectionStart > 1 Then Console.WriteLine(Microsoft.VisualBasic.Mid(TextBox1.Text, TextBox1.SelectionStart - 1))
If TextBox1.SelectionStart > 1 Then
x = (Microsoft.VisualBasic.Mid(TextBox1.Text, TextBox1.SelectionStart - 1))
Select Case Microsoft.VisualBasic.Left(x, 3)
Case "ap" & _p
AutoComplete("p:", "", 0)
Exit Sub
Case "au" & _p, "Au" & _p
AutoComplete("dio:", "", 0)
Exit Sub
Case "da" & _p
AutoComplete("te", "", 1)
Exit Sub
Case "de" & _p
AutoComplete("lete*", "", 0)
Exit Sub
Case "en" & _p
AutoComplete("d", "", 1)
Exit Sub
Case "es" & _p
AutoComplete("c", "", 1)
Exit Sub
Case "iw" & _p
AutoComplete("", "-iw", 1) 'ignore whitespace
Exit Sub
Case "me" & _p
AutoComplete("nu", "", 1)
Exit Sub
Case "mi" & _p
AutoComplete("nute:", "", 0)
Exit Sub
Case "re" & _p
AutoComplete("place:|", "", 0)
Key(Keys.Left, False, 1)
Exit Sub
Case "se" & _p 'exe settings
g_s = p_ & "win" & _p & "r" & p_ & "-win" & _p & p_ & "app:run" & _p & Application.LocalUserAppDataPath.ToString.Replace("\PD\" & Application.ProductVersion, "") & p_ & "enter" & _p
PD()
AppActivate(My.Settings.SettingTitleText)
Key(Keys.Right, False, 1)
Key(Keys.Back, False, 5)
TextBox2.Clear()
Exit Sub
Case "sl" & _p
AutoComplete("eep:", "", 0)
Exit Sub
Case "sp" & _p
AutoComplete("ace*", "", 0)
Exit Sub
Case "st" & _p
AutoComplete("op-audio", "", 1)
Exit Sub
Case "ti" & _p
AutoComplete("me", "", 1)
Exit Sub
Case "to" & _p 'timeout
AutoComplete(":", "", 0)
Exit Sub
Case "wr" & _p 'run
TextBox2.Clear()
Key(Keys.Right, False, 1)
Key(Keys.Back, False, 5)
SendKeys.Send(p_ & "win" & _p & "r" & p_ & "-win" & _p & p_ & "app:run" & _p & p_ & "enter" & _p)
Key(Keys.Left, False, 7)
Exit Sub
Case "ws" & _p 'ignore whitespace
Key(Keys.Right, False, 1)
Key(Keys.Back, False, 5)
SendKeys.Send(ws_ & _ws & "{left}")
Exit Sub
Case "xy" & _p
For i = 3 To 1 Step -1
Me.Text = My.Settings.SettingTitleText & " > " & p_ & "xy:" & i.ToString & _p
Sleep(1000)
Next
Key(Keys.Back, False, 1)
TextBox2.Clear()
g_s = (":" & MousePosition.X & "," & MousePosition.Y)
PD()
Key(Keys.Right, False, 1)
Exit Sub
Case "ye" & _p
AutoComplete("sno:", "", 0)
Exit Sub
End Select
If TextBox1.SelectionStart > 0 Then
x = (Microsoft.VisualBasic.Mid(TextBox1.Text, TextBox1.SelectionStart))
Select Case Microsoft.VisualBasic.Left(x, 2)
Case "a" & _p
AutoComplete("lt", "-alt", 1)
Exit Sub
Case "b" & _p
AutoComplete("s*", "", 0)
Exit Sub
Case "c" & _p
AutoComplete("trl", "-ctrl", 1)
Exit Sub
Case "d" & _p
AutoComplete("own*", "", 0)
Exit Sub
Case "e" & _p
AutoComplete("nter*", "", 0)
Exit Sub
Case "h" & _p
AutoComplete("ome", "", 1)
Exit Sub
Case "i" & _p
AutoComplete("nsert", "", 1)
Exit Sub
Case "l" & _p
AutoComplete("eft*", "", 0)
Exit Sub
Case "m" & _p
AutoComplete("enu", "", 1)
Exit Sub
Case "r" & _p
AutoComplete("ight*", "", 0)
Exit Sub
Case "s" & _p
AutoComplete("hift", "-shift", 1)
Exit Sub
Case "t" & _p
AutoComplete("ab*", "", 0)
Exit Sub
Case "u" & _p
AutoComplete("p*", "", 0)
Exit Sub
Case "w" & _p
AutoComplete("in", "-win", 1)
Exit Sub
Case "x" & _p, "y" & _p, "," & _p
AutoComplete(":", "", 0)
Exit Sub
Case p_ & _p
Key(Keys.Back, False, 2)
Key(Keys.Delete, False, 1)
Key(Keys.Tab, False, 1)
Exit Sub
Case _p & p_, Chr(9), _p
Key(Keys.Back, False, 1)
SendKeys.Send(p_ & _p & "{left}")
Exit Sub
Case "*" & _p, ":" & _p
Key(Keys.Back, False, 2)
Key(Keys.Right, False, 1)
Exit Sub
Case "0" & _p, "1" & _p, "2" & _p, "3" & _p, "4" & _p, "5" & _p, "6" & _p, "7" & _p, "8" & _p, "9" & _p
Key(Keys.Back, False, 1)
Key(Keys.Right, False, 1)
Exit Sub
End Select
End If
End If
If TextBox1.SelectionStart = 0 Then
Key(Keys.Back, False, 1)
SendKeys.Send(p_ + _p + "{left}")
ElseIf TextBox1.SelectionStart = 1 And TextBox1.Text.Substring(TextBox1.SelectionStart - 1, 1) = p_ Then
Key(Keys.Right, False, 1)
Key(Keys.Back, False, 3)
Key(Keys.Tab, False, 1)
Else
Key(Keys.Back, False, 1)
SendKeys.Send(p_ + _p + "{left}")
End If
End If
End Sub
Dim g_length As Integer = My.Settings.SettingCodeLength
Dim g_i As Integer = 0 'listbox1 item
Dim g_kb_i As Integer = 0 'kb item c
Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged
If TextBox2.Text = "'" Then Exit Sub
If My.Settings.SettingTitleTip = True And ControlBox = True Then Me.Text = My.Settings.SettingTitleText & " > " & TextBox2.Text
If ((TextBox2.TextLength = g_length) Or (TextBox2.Text.StartsWith(p_) And TextBox2.TextLength >= 1)) = False Then
TextMock()
Exit Sub
End If
For i = 0 To ListBox1.Items.Count - 1
If CBool(GetAsyncKeyState(Keys.Escape)) Then Exit For
If TextBox2.Text = p_ Then Exit Sub
If ListBox1.Items(i).ToString = "" Or
ListBox1.Items(i).ToString.StartsWith("'") Then Continue For 'rem
g_i = i
If TextBox2.Text.StartsWith(p_) Then '«x»|«x-»
If My.Settings.SettingOpenCloseBracketModeScan Then
If ListBox1.Items(i).ToString.StartsWith(TextBox2.Text) And TextBox2.Text.EndsWith(_p) Then '«x»
Sk(1)
Exit For
End If
If ListBox1.Items(i).ToString.StartsWith(TextBox2.Text.Substring(0, TextBox2.TextLength - 1) & "-") And TextBox2.Text.EndsWith(_p) Then '«x-»
Sk(2)
Exit For
End If
If i = ListBox1.Items.Count - 1 And TextBox2.Text.EndsWith(_p) Then TextBox2.Clear()
Else
If ListBox1.Items(i).ToString.StartsWith(TextBox2.Text & _p) Then '«x
Sk(1)
Exit For
End If
If ListBox1.Items(i).ToString.StartsWith(TextBox2.Text & "-" & _p) Then '«x-
Sk(2)
Exit For
End If
End If
Continue For
End If
If Microsoft.VisualBasic.Left(TextBox2.Text, g_length) = Microsoft.VisualBasic.Left(ListBox1.Items(i).ToString, g_length) Then 'x
Sk(3)
Exit For
End If
Next
TextMock()
End Sub
Sub AutoComplete(fill As String, fill2 As String, right As Integer)
Key(Keys.Back, False, 1)
g_s = fill
PD()
For i = 1 To right
Key(Keys.Right, False, 1)
Next
If fill2.Length > 0 Then
SendKeys.Send(p_)
g_s = fill2
PD()
SendKeys.Send(_p)
Key(Keys.Left, False, fill2.Length + 2)
End If
End Sub
Sub Kb(c As String)
'On Error GoTo err
Select Case c
Case "0"
Key(Keys.D0, False, 1)
Case "9"
Key(Keys.D9, False, 1)
Case "8"
Key(Keys.D8, False, 1)
Case "7"
Key(Keys.D7, False, 1)
Case "6"
Key(Keys.D6, False, 1)
Case "5"
Key(Keys.D5, False, 1)
Case "4"
Key(Keys.D4, False, 1)
Case "3"
Key(Keys.D3, False, 1)
Case "2"
Key(Keys.D2, False, 1)
Case "1"
Key(Keys.D1, False, 1)
Case "a"
Key(Keys.A, False, 1)
Case "b"
Key(Keys.B, False, 1)
Case "c"
Key(Keys.C, False, 1)
Case "d"
Key(Keys.D, False, 1)
Case "e"
Key(Keys.E, False, 1)
Case "f"
Key(Keys.F, False, 1)
Case "g"
Key(Keys.G, False, 1)
Case "h"
Key(Keys.H, False, 1)
Case "i"
Key(Keys.I, False, 1)
Case "j"
Key(Keys.J, False, 1)
Case "k"
Key(Keys.K, False, 1)
Case "l"
Key(Keys.L, False, 1)
Case "m"
Key(Keys.M, False, 1)
Case "n"
Key(Keys.N, False, 1)
Case "o"
Key(Keys.O, False, 1)
Case "p"
Key(Keys.P, False, 1)
Case "q"
Key(Keys.Q, False, 1)
Case "r"
Key(Keys.R, False, 1)
Case "s"
Key(Keys.S, False, 1)
Case "t"
Key(Keys.T, False, 1)
Case "u"
Key(Keys.U, False, 1)
Case "v"