Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New & Chg IDC Entries in LD 49

Procomm Plus Nortel Scripts

New & Chg IDC Entries in LD 49

by  Firebird Scrambler  Posted    (Edited  )
; New & Chg IDC Entries.was 19th June 2006

; NOTE!
; This program will ONLY work with a Windows version of PROCOMM PLUS!.
; This Procomm Script file is for you to do a "CHG/NEW" list of IDC Table Lists
; The " ; " denotes that the data on this program script is ignored when the
; file is run.
; The script will also record for you a LOG file such as "pw01.cap" etc.
; After the change have been made the script will print out ALL the IDC tables.
; The program will use LD 49 for all the changes.
; Follow the instructions by Ticking the box's on the screen & locating your source file.
; You might need to change the "Transmit Pacing" depending on the software version!
; A higher number is needed to slow the program down for the older processors.
; Make sure that you enter the file name & click on "ACCEPT" to run in your entries.

; Make sure that you enter the Login Name (or Account name for V04.5x onwards!)&
; the Password & click on the "ACCEPT" button to run in your speed call entries.
; If your system does not use any Login name, then just enter any name or c/r in the box.
; You don't need to be LOGGED into the Meridian, before you run the script!.
; The program will still run on older software versions that don't use Named Login. It's
; best if log in first before the program is started. Just enter any name as mentioned above
; & wait 30 seconds before it will commence the input procedure.

; The SOURCE file should be in a *.CSV Format (EXCEL!)
; An example of the source file as viewed in text, is shown below.
; It should be the "Incoming" Number followed by the "Extn" Number

; 56000,6000
; 56004,6787
; 56005,6474747
; 56006,69996
; 56010,6010
; 56011,566611
; 56003,X (Use "X" after the entry if you want to remove it from the table!)
; 56002,X

; If your source file (example below) has lines of data of this length or more, then the script will FAIL with a
; message of Error 1: Value out of range
; Please reduce the data for that line. e.g. a line of data that is too long is..
;1140,066 0 00 25,1140,0,74210,1,6,1421,10,1111,FBA CRPA
HFA CNIA DNDA PUA VOLA VOUA CFXA
ICRA,2,7000,74210,74210,0,0,SCR 4213 0,SCN 4212 0,SCN 4216
0,SCN 4218 0,SCN 4219 0,SCN 4222,ADL 8 4230,ADL 8 4019,ADL
8 5302,SCN 4211 0,SCN 4791 0,ADL 8, ,CFW 6,RNP,SSU 10 (262
CHARACTERS!)

; Trim the data down to e.g.
;1140,066 0 00 25,1140,0,74210,1,6,1421,10,1111,FBA CRPA
HFA CNIA DNDA PUA VOLA VOUA CFXA
ICRA,2,7000,74210,74210,0,0,SCR 4213 0,SCN 4212 0,SCN 4216
0,SCN 4218 0,SCN 4219 0,SCN 4222,ADL 8 4230,ADL 8 4019,ADL
8 5302,SCN 4211,SCN 4791,ADL 8, ,CFW 6,RNP,SSU 10

#include "vkeys.inc" ; You must have this file "vkeys.inc"
; located within the "Aspect" folder!
STRING F_Time
string s_opdata[2]

proc main
integer i_evt
integer i_rg2_chc = 3
integer i_rg5_chc = 6
integer i_tmp
integer i_ch
integer i_fch_tx_val
integer i_tx_val
integer i_p

long l_tot_no_lin
long l_lin_cnt
long l_prog_bar_op
long l_fi_sz0
long l_cur_fi_sz0

string s_fi_nm
string s_tx_list = "0,5,10,20,30,40,50,80,100,130,200,300,400,700"
string s_tx_item = "130"
string s_dir
string s_pwd
string s_userid
string s_time_start
string s_date_start

string s_progress
string s_prog_bar
string s_sce_lin

string s_fi_ext_item = "*.CSV"
;string s_type_list = "CHG,NEW"
;string s_type_item = "CHG"
string s_list_customer = "0,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"
string s_customer_item = "0"
string s_list_dcno = "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"
string s_dcno_item = "1"

dialogbox 0 13 17 476 332 11 "New or Change of IDC Entries V01.02 19th June 2006"
groupbox 1 10 7 130 51 ""
radiogroup 2 i_rg2_chc
radiobutton 3 19 16 42 11 "NEW"
radiobutton 4 19 36 42 11 "CHG"
endgroup
radiogroup 5 i_rg5_chc
radiobutton 6 87 16 42 11 "IDC"
radiobutton 7 87 36 42 11 "N/A"
endgroup
combobox 8 102 67 32 252 DROPDOWNLIST s_list_customer s_customer_item
text 16 16 69 86 11 "Customer No Use up to 87" left
combobox 10 102 88 32 238 DROPDOWNLIST s_list_dcno s_dcno_item
text 9 17 90 84 9 "IDC Number Use up to 88" left
dirlistbox 12 55 176 85 88 "*.csv" SINGLE s_fi_nm 21 SORT
editbox 23 386 37 73 11 s_userid 11
editbox 13 386 53 74 11 s_pwd 16 MASKED
editbox 37 417 106 38 11 s_date_start 8
editbox 38 417 147 38 11 s_time_start 8
combobox 24 423 168 30 170 DROPDOWNLIST s_tx_list s_tx_item
dirpath 21 9 164 134 11 s_dir
pushbutton 14 379 277 40 13 "Accept"
pushbutton 15 429 277 40 13 "Cancel"
text 29 169 124 294 11 "If you want the program to Time start, then enter the time in 24Hr format in the box below" center
text 47 217 55 166 11 "Switch Password is Case Sensitive for V4.5 onwards" left
text 25 175 170 246 11 "Select the systems Transmit Pacing. User a higher number on older software!." left
text 22 190 38 190 11 "Name or User ID. (No Name = any character key pressed!)" left
text 34 167 147 248 11 "Pressing the (Space Bar) = Auto Start, or enter the start Time = e.g. 16:20:00 " left
text 35 167 211 290 26 " Please remember to check your capture file settings under the following headings's (Options, Data Options, Setup Files, Capture File Options, Control Options) to UNCHECK the box marked (Query for file name when capture is started)!. " left
text 33 168 240 288 16 " Click (OK) & (OK) again before starting this script program. This will make the script capture the information if the delayed Date / Time start function is used!. " left
text 36 169 82 294 11 "If you want the program to Date start, then enter the Date as e.g. 23/12/05 in the box below" center
text 31 169 106 248 11 "Pressing the (Space Bar) = Auto Start, or enter the required Date for it to run" left
text 39 419 138 34 9 "Hr:Mn:Sc" center
text 40 418 96 34 9 "Dy/Mh/Yr" center
text 32 178 19 282 11 "Enter the systems Login Name and Password in the box's below to run the script file" center
groupbox 41 9 56 130 52 ""
groupbox 49 163 3 306 68 ""
groupbox 50 164 71 304 91 ""
groupbox 51 1 155 146 172 ""
groupbox 52 1 2 146 150 ""
text 53 6 220 36 11 "Source file" left
text 43 6 230 36 11 "location" center
text 42 6 240 36 11 "= *.csv" center
text 54 6 255 40 11 "Example e.g." center
text 64 6 265 60 11 "IDGT and CDGT" left
text 44 6 275 60 11 "56000,6000" left
text 45 6 285 60 11 "56004,6787" left
text 48 6 295 60 11 "56005,6474747" left
text 60 6 305 136 11 "56003,X (Use (X) after entry to remove!)" left
groupbox 46 164 159 305 26 ""
text 55 168 193 290 16 " If you are planning to use the delayed start time / date function, then follow the instruction listed below " left
groupbox 56 164 183 304 78 ""
groupbox 63 10 107 128 34 ""
text 61 13 115 122 11 "Note!. Program the new IDC table first" center
text 62 14 127 120 11 "as you may need to set SDID or FDID" left
enddialog

while 1
dlgevent 0 i_evt
switch i_evt
case 0
if i_rg2_chc == 3
if nullstr s_date_start
disable dlgctrl 0 14
elseif nullstr s_time_start
disable dlgctrl 0 14
elseif nullstr s_userid
disable dlgctrl 0 14
elseif nullstr s_pwd
disable dlgctrl 0 14
elseif nullstr s_fi_nm
disable dlgctrl 0 14
else
enable dlgctrl 0 14
endif
endif
if i_rg2_chc == 4
if nullstr s_date_start
disable dlgctrl 0 14
elseif nullstr s_time_start
disable dlgctrl 0 14
elseif nullstr s_userid
disable dlgctrl 0 14
elseif nullstr s_pwd
disable dlgctrl 0 14
elseif nullstr s_fi_nm
disable dlgctrl 0 14
else
enable dlgctrl 0 14
endif
endif
endcase
case 5
if i_rg5_chc == 6
enable dlgctrl 0 8
enable dlgctrl 0 16
endif
if i_rg5_chc == 7
disable dlgctrl 0 8
disable dlgctrl 0 16
endif
endcase

case 13
strlen s_pwd i_tmp
if i_tmp < 4
usermsg "Password `"%s`"`n`nThis must be between 4-16 characters in length & it is case sEnsTivE on V04.50 onwards!" s_pwd
sendvkey MAKE_KV(KV_SHIFT,VK_TAB)
endif
endcase
case 14
exitwhile
endcase
case 15
exitwhile
endcase
case 23
strlen s_userid i_tmp
if i_tmp < 1
usermsg "Name or UserID `"%s`"`n`nName can be up to 11 Characters. Otherwise enter a dummy name or press the Space Bar to accept the entry" s_userid
sendvkey MAKE_KV(KV_SHIFT,VK_TAB)
endif
endcase
case 28
exitwhile
endcase
case 29
exitwhile
endcase
case 30
dlgupdate 0 24
endcase
case 37
strlen s_date_start i_tmp
if i_tmp < 1
usermsg "Start Date `"%s`"`n`nmust be 6 Numbers in length and with a (/) in between every 2 digits. or you can just press the Space Bar to leave the box blank to Auto Start the Listing program" s_date_start
sendvkey MAKE_KV(KV_SHIFT,VK_TAB)
endif
endcase
case 38
strlen s_time_start i_tmp
if i_tmp < 1
usermsg "Start Time `"%s`"`n`nmust be 6 Numbers in length and with a :)) in between every 2 digits. or you can just press the Space Bar to leave the box blank to Auto Start the Listing program" s_time_start
sendvkey MAKE_KV(KV_SHIFT,VK_TAB)
endif
endcase
endswitch
endwhile

dlgdestroy 0 cancel

if i_evt != 14
exit
endif

if not fopen 0 s_fi_nm read
errormsg "Couldn't open file `"%s`"." s_fi_nm
else
cnt_no_fi_lines(i_ch,&l_tot_no_lin,&l_fi_sz0)

STATMSG "Waiting for the New or Chg IDC table auto start date/time program to run. Make sure that auto capture is set correctly!"

fetch txpace i_fch_tx_val
atoi s_tx_item i_tx_val
strcat s_tx_item " ms"
set txpace i_tx_val

; datestart(s_date_start)
; timestart(s_time_start)

datetimestart(s_time_start,s_date_start)
logi(s_userid)
login(s_pwd)

ld_ovl_49(i_rg2_chc,i_rg5_chc,s_dcno_item,s_customer_item)

dialogbox 1 192 46 300 91 14 "New or Change of IDC Entries Progress Status Bar"
text 1 6 8 218 11 s_progress left
editbox 2 14 22 198 11 s_prog_bar
text 3 14 38 290 11 s_fi_nm left
text 4 14 80 58 11 "Transmit Pace ==" left
text 6 14 60 214 11 s_sce_lin left
text 5 76 80 34 11 s_tx_item left
enddialog

l_prog_bar_op = l_fi_sz0/40

while not feof 0
fgetc 0 i_ch
if not feof 0
ftell 0 l_cur_fi_sz0
if l_cur_fi_sz0 % l_prog_bar_op == 0
strcat s_prog_bar "#"
dlgupdate 1 2
endif
if i_ch == '`r'
loopwhile
endif
if i_ch == '`n'
l_lin_cnt++
strputc s_sce_lin i_p 0
if not nullstr s_sce_lin

get_opdata(s_sce_lin)

strfmt s_progress "Line %ld of %ld" l_lin_cnt l_tot_no_lin
dlgupdate 1 1
dlgupdate 1 6
s_sce_lin = ""
i_p = 0

send_opdata()

loopwhile
endif
endif
strputc s_sce_lin i_p i_ch
i_p++
endif
endwhile

ex_ovl_49(i_rg5_chc,s_dcno_item,s_customer_item)
logo ()
set txpace i_fch_tx_val
fclose 0

endif

dlgdestroy 1 cancel

endproc

proc get_opdata ;#####

param string s_sce_lin

strtok s_opdata[0] s_sce_lin "," ;IDGT
strtok s_opdata[1] s_sce_lin "," ;CONVRT

endproc

proc send_opdata ;#####

Capture On

;param string s_new = "NEW"
;param string s_type_item

;if strcmp s_type_item "NEW"

txdc (s_opdata[0])
waitfor (s_opdata[0])
txdc (s_opdata[1])
waitfor "IDGT "
; else
; endif

endproc

proc cnt_no_fi_lines ;#####

param integer i_ch
param long l_tot_no_lin
param long l_fi_sz0

while not feof 0
fgetc 0 i_ch
if not feof 0
if i_ch == '`n'
l_tot_no_lin++
endif
endif
endwhile

ftell 0 l_fi_sz0
rewind 0

endproc

;proc txdt ;#####

;param string s_txs
;integer i_p = 0
;integer i_ch = -1

; strgetc s_txs i_P i_ch
; i_p++

; while i_ch != 0
; computc i_ch
; strgetc s_txs i_P i_ch
; i_P++
; endwhile

;endproc

proc txdc ;#####

param string s_txs
integer i_p = 0
integer i_ch = -1

strgetc s_txs i_P i_ch
i_p++

while i_ch != 0
computc i_ch
strgetc s_txs i_P i_ch
i_P++
endwhile

computc 13

endproc

proc ld_ovl_49 ;#####

param integer i_rg2_chc
param integer i_rg5_chc
; param string s_type_item
param string s_dcno_item
param string s_customer_item

txdc ("****")
waitfor ">"

txdc ("LD 49")
waitfor "REQ "
if i_rg2_chc == 3
txdc ("NEW")
else
txdc ("CHG")
endif
; txdc (s_type_item)
waitfor "TYPE "
if i_rg5_chc == 6
txdc ("IDC")
else
txdc ("IDC")
endif
; txdc ("IDC")
waitfor "CUST "
txdc (s_customer_item)
waitfor "DCNO "
txdc (s_dcno_item)
PAUSE 4

endproc

;proc idgt_range ;#####

;waitfor "IDGT "
; txdc (s_opdata[0])

;endproc

proc ex_ovl_49 ;#####

;param integer i_rg2_chc
param integer i_rg5_chc
param string s_dcno_item
param string s_customer_item

pause 3
txdc ("")
; txdc ("***")
waitfor "REQ "
txdc ("PRT")
waitfor "TYPE "
if i_rg5_chc == 6
txdc ("IDC")
else
txdc ("IDC")
endif
waitfor "CUST "
txdc (s_customer_item)
waitfor "DCNO "
txdc (s_dcno_item)
waitfor "REQ "
txdc ("****")
waitfor ">"

Capture off

endproc

;proc datestart ;#####
;param string s_date_start
; Waituntil (s_date_start)
;endproc

Proc TTY_LOGIN
pause 3
txdc ("LOGI")
endproc

;proc timestart ;#####
;param string s_time_start
; Waituntil (s_time_start)
; transmit "^M"
; txdc ("****")
;endproc

PROC DATETIMESTART

param string s_time_start
param string s_date_start
integer i_tmp

strlen s_date_start i_tmp
if i_tmp >5
strlen s_time_start i_tmp
if i_tmp <2
s_time_start = "00:10:00"
endif
endif
strlen s_time_start i_tmp
if i_tmp >5
strlen s_date_start i_tmp
if i_tmp <2
s_date_start = $DATE
endif
endif

Waituntil s_time_start s_date_start
endproc

proc logi ;#####
param string s_userid

WHEN TARGET 0 "OVL014 " CALL OVL014
WHEN TARGET 1 "OVL428 " CALL OVL428
WHEN TARGET 2 "SCH0510 " CALL OVL014
WHEN TARGET 3 "OVL013 " CALL TTY_LOGIN
WHEN TARGET 4 "FCSD " CALL FCSD
WHEN TARGET 5 "SCH0138 " CALL SCH0138 ; NFCR tree does not exist.
WHEN TARGET 6 "SCH3634 " CALL SCH3634
WHEN TARGET 7 "SCH0494 " CALL SCH0494
WHEN TARGET 8 "SCH4565 " CALL SCH4565
WHEN TARGET 9 "OVL111 " CALL OVL111
; WHEN TARGET 9 "SCH0101 " CALL SCH0101
WHEN TARGET 10 "SCH0510 " CALL SCH0101
WHEN TARGET 11 "SCH101 " CALL SCH0101
WHEN TARGET 12 "SCH1111 " CALL SCH1111
WHEN TARGET 13 "FDID " CALL FDID
WHEN TARGET 14 "SDID " CALL SDID

transmit "LOGI "
; txdc ("LOGI ")
txdc (s_userid)
waitfor "PASS?"
endproc

proc login ;#####
param string s_pwd
txdc (s_pwd)
waitfor ">"
endproc

proc logo ;#####
txdc ("LOGO") ; Add on this line ";" to allow the program to remain logged in!.
F_Time=$TIME
usermsg "Script File for New & Chg IDC Entries is now Complete`n`n at %s" F_TIME
endproc

PROC FCSD
PAUSE 2
txdc ("YES")
ENDPROC

PROC FDID
PAUSE 1
TRANSMIT "^M~~~~"
ENDPROC

PROC SDID
PAUSE 1
TRANSMIT "^M~~~~" ; Change this prompt to make "SDID" = "YES on
ENDPROC ; new IDC tables

PROC SCH3634
TRANSMIT "^M~~~~"
ENDPROC

PROC SCH0494
txdc ("****")
waitfor ">"
USERMSG "Script failed, due to a existing IDC Table on the database!"
exit
ENDPROC

PROC SCH4565
txdc ("****")
waitfor ">"
USERMSG "Please increase in LD 15 the (DCMX) setting via the FCR_DATA section!"
exit
ENDPROC

PROC SCH0138
txdc ("****")
waitfor ">"
USERMSG "NFCR tree does not exist."
exit
ENDPROC

PROC SCH1111
txdc ("NO")
PAUSE 1
ENDPROC

PROC OVL014
STATMSG "Please wait 30 seconds as the TTY is already logged in!"
ENDPROC

PROC OVL111
txdc ("****")
waitfor ">"
USERMSG "Script failed, as the TTY user is NOT logged into the system!"
exit
ENDPROC

PROC OVL428
txdc ("****")
USERMSG "Script failed. The Login name & password combination is invalid. Check the password & login name & try again.! On software versions V04.5x onwards, check if the password uses case SeNSiTivItY!"
exit
ENDPROC

PROC SCH0101
pause 2
txdc ("****")
waitfor ">"
STATMSG "Please wait 30 seconds as the TTY is already logged in!"
ENDPROC


; The information listed below has been taken from the "vkeys.inc" file.
; I have added in one ";" against each line for use with this file!.
; Should your copy of "vkeys.inc" be missing or damaged, then you can copy this
; section listed below with one of the ";" removed for each line!.


;;Definitions of standard virtual key code values
;;********************************************************
**************
;;* VKEYS.INC
;;* Copyright (c) 1999 Symantec Corporation
;;*
;;* Definitions of standard virtual key code values. Use these macro
;;* definitions in your ASPECT script files rather than hard-coded
;;* constants to improve maintainability and readability. For more
;;* information, see the keyval and vkey conventions described in the
;;* Windows ASPECT Script Language reference manual.
;;********************************************************
**************

;#ifndef _INC_VKEYS ; if file not already included
;#define _INC_VKEYS ; prevent further inclusion

;;********************************************************
**************
;;* Macro definitions of standard virtual key code values
;;********************************************************
**************

;#define VK_LBUTTON 0x01 ; Left mouse button
;#define VK_RBUTTON 0x02 ; Right mouse button
;#define VK_CANCEL 0x03 ; Ctrl-Break
;#define VK_MBUTTON 0x04 ; Middle mouse button
;; 0x05-0x07 ; Undefined
;#define VK_BACK 0x08 ; Backspace key
;#define VK_TAB 0x09 ; Tab key
;; 0x0A-0x0B ; Undefined
;#define VK_CLEAR 0x0C ; Clear key or Keypad 5 with Num lock off
;#define VK_RETURN 0x0D ; Enter or Return key
;; 0x0E-0x0F ; Undefined
;#define VK_SHIFT 0x10 ; Shift key
;#define VK_CONTROL 0x11 ; Control or Ctrl key
;#define VK_MENU 0x12 ; Menu or Alt key
;#define VK_PAUSE 0x13 ; Pause key
;#define VK_CAPITAL 0x14 ; Capital or Caps Lock key
;; 0x15-0x19 ; Reserved for Kanji Systems
;; 0x1A ; Undefined
;#define VK_ESCAPE 0x1B ; Esc or Escape key
;; 0x1C-0x1F ; Reserved for Kanji Systems
;#define VK_SPACE 0x20 ; Spacebar
;#define VK_PRIOR 0x21 ; Page Up key
;#define VK_NEXT 0x22 ; Page Down key
;#define VK_END 0x23 ; End key
;#define VK_HOME 0x24 ; Home key
;#define VK_LEFT 0x25 ; Left arrow key
;#define VK_UP 0x26 ; Up Arrow key
;#define VK_RIGHT 0x27 ; Right Arrow key
;#define VK_DOWN 0x28 ; Down Arrow key
;#define VK_SELECT 0x29 ; Select key
;#define VK_PRINT 0x2A ; Keyboard (OEM) specific
;#define VK_EXECUTE 0x2B ; Execute key
;#define VK_SNAPSHOT 0x2C ; Print Screen key
;#define VK_INSERT 0x2D ; Insert key
;#define VK_DELETE 0x2E ; Delete key
;#define VK_HELP 0x2F ; Help key
;#define VK_0 0x30 ; 0 key
;#define VK_1 0x31 ; 1 key
;#define VK_2 0x32 ; 2 key
;#define VK_3 0x33 ; 3 key
;#define VK_4 0x34 ; 4 key
;#define VK_5 0x35 ; 5 key
;#define VK_6 0x36 ; 6 key
;#define VK_7 0x37 ; 7 key
;#define VK_8 0x38 ; 8 key
;#define VK_9 0x39 ; 9 key
;; 0x3A-0x40 ; Undefined
;#define VK_A 0x41 ; A key
;#define VK_B 0x42 ; B key
;#define VK_C 0x43 ; C key
;#define VK_D 0x44 ; D key
;#define VK_E 0x45 ; E key
;#define VK_F 0x46 ; F key
;#define VK_G 0x47 ; G key
;#define VK_H 0x48 ; H key
;#define VK_I 0x49 ; I key
;#define VK_J 0x4A ; J key
;#define VK_K 0x4B ; K key
;#define VK_L 0x4C ; L key
;#define VK_M 0x4D ; M key
;#define VK_N 0x4E ; N key
;#define VK_O 0x4F ; O key
;#define VK_P 0x50 ; P key
;#define VK_Q 0x51 ; Q key
;#define VK_R 0x52 ; R key
;#define VK_S 0x53 ; S key
;#define VK_T 0x54 ; T key
;#define VK_U 0x55 ; U key
;#define VK_V 0x56 ; V key
;#define VK_W 0x57 ; W key
;#define VK_X 0x58 ; X key
;#define VK_Y 0x59 ; Y key
;#define VK_Z 0x5A ; Z key
;#define VK_WINDOWSL 0x5B ; Windows key (left)
;#define VK_WINDOWSR 0x5C ; Windows key (right)
;#define VK_APPLICATION 0x5D ; Application key
;; 0x5E-0x5F ; Undefined
;#define VK_NUMPAD0 0x60 ; Numeric Keypad 0
;#define VK_NUMPAD1 0x61 ; Numeric Keypad 1
;#define VK_NUMPAD2 0x62 ; Numeric Keypad 2
;#define VK_NUMPAD3 0x63 ; Numeric Keypad 3
;#define VK_NUMPAD4 0x64 ; Numeric Keypad 4
;#define VK_NUMPAD5 0x65 ; Numeric Keypad 5
;#define VK_NUMPAD6 0x66 ; Numeric Keypad 6
;#define VK_NUMPAD7 0x67 ; Numeric Keypad 7
;#define VK_NUMPAD8 0x68 ; Numeric Keypad 8
;#define VK_NUMPAD9 0x69 ; Numeric Keypad 9
;#define VK_MULTIPLY 0x6A ; Multiply key
;#define VK_ADD 0x6B ; Add key
;#define VK_SEPARATOR 0x6C ; Separator key
;#define VK_SUBTRACT 0x6D ; Subtract key
;#define VK_DECIMAL 0x6E ; Decimal key
;#define VK_DIVIDE 0x6F ; Divide key
;#define VK_F1 0x70 ; Function key F1
;#define VK_F2 0x71 ; Function key F2
;#define VK_F3 0x72 ; Function key F3
;#define VK_F4 0x73 ; Function key F4
;#define VK_F5 0x74 ; Function key F5
;#define VK_F6 0x75 ; Function key F6
;#define VK_F7 0x76 ; Function key F7
;#define VK_F8 0x77 ; Function key F8
;#define VK_F9 0x78 ; Function key F9
;#define VK_F10 0x79 ; Function key F10
;#define VK_F11 0x7A ; Function key F11
;#define VK_F12 0x7B ; Function key F12
;#define VK_F13 0x7C ; Function key F13
;#define VK_F14 0x7D ; Function key F14
;#define VK_F15 0x7E ; Function key F15
;#define VK_F16 0x7F ; Function key F16
;#define VK_F17 0x80 ; Function key F17
;#define VK_F18 0x81 ; Function key F18
;#define VK_F19 0x82 ; Function key F19
;#define VK_F20 0x83 ; Function key F20
;#define VK_F21 0x84 ; Function key F21
;#define VK_F22 0x85 ; Function key F22
;#define VK_F23 0x86 ; Function key F23
;#define VK_F24 0x87 ; Function key F24
;; 0x88-0x8F ; Unassigned
;#define VK_NUMLOCK 0x90 ; Num Lock key
;#define VK_OEM_SCROLL 0x91 ; Scroll Lock key
;; 0x92-0xB9 ; Unassigned
;; 0xBA-0xC0 ; Keyboard (OEM) specific
;; 0xC1-0xDA ; Unassigned
;; 0xDB-0xE4 ; Keyboard (OEM) specific
;; 0xE5 ; Unassigned
;; 0xE6 ; Keyboard (OEM) specific
;; 0xE7-0xE8 ; Unassigned
;; 0xE9-0xF5 ; Keyboard (OEM) specific
;; 0xF6-0xFE ; Unassigned

;;********************************************************
**************
;;* Useful macros for testing and forming key values from keyboard
;;* shift states and virtual key code values.
;;********************************************************
**************

;#define KV_SHIFT 0x01 ; Shift key pressed
;#define KV_CTRL 0x02 ; Ctrl key pressed
;#define KV_ALT 0x04 ; Alt key pressed
;#define KV_EXT 0x08 ; Extended key flag
;#define KV_CAPSLOCK 0x10 ; Caps Lock key toggled on

;#define MAKE_KV(skeys,vkey) (((skeys) << 8) | (vkey))

;#define KV_VKEY(keyval) ((keyval) & 0xFF)
;#define KV_SKEYS(keyval) ((keyval) >> 8)

;#define KV_SHIFTKEY(keyval) (KV_SKEYS(keyval) & KV_SHIFT)
;#define KV_CTRLKEY(keyval) (KV_SKEYS(keyval) & KV_CTRL)
;#define KV_ALTKEY(keyval) (KV_SKEYS(keyval) & KV_ALT)
;#define KV_EXTKEY(keyval) (KV_SKEYS(keyval) & KV_EXT)

;#endif ; _INC_VKEYS
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top