Gui, Color, c0000FF
Gui, Add, Edit, x6 y7 w250 h20 Limit16 Number vCardNumber
Gui, Add, Button, x76 y67 w100 h20 , Summit
Gui, Add, Text, cffffff x6 y37 w250 h20 , Enter the card number
; Generated using SmartGUI Creator 4.0
Gui, Show, x131 y91 h99 w268, PI99 Card Reader
Return
ButtonSummit:
Gui , Submit , NoHide
FileCreateDir , H:\xxx\AHK Reflections\AHKs\PI99
FileDelete , H:\xxx\AHK Reflections\AHKs\PI99\CardReaderInfoFile.txt
FileAppend , %CardNumber%`n , H:\xxx\AHK Reflections\AHKs\PI99\CardReaderInfoFile.txt
String := CardNumber
StringLeft, OutputVar1, String, 7 ; Stores the string "Last 9 digits of card" in OutputVar9.
StringRight, OutputVar2, String, 9 ; Stores the string "The first 7 digits of the card" in OutputVar7.
FileAppend , %OutputVar1%`n , H:\xxx\AHK Reflections\AHKs\PI99\CardReaderInfoFile.txt
FileAppend , %OutputVar2%`n , H:\xxx\AHK Reflections\AHKs\PI99\CardReaderInfoFile.txt
IfWinExist, PI99 Card Reader
WinClose ; use the window found above
Return