Micro Focus QTP (UFT) Forums
Ascii values - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Ascii values (/Thread-Ascii-values)



Ascii values - bfakruddin - 12-22-2008

How to return the ASCII value of Functional Keys

e.g: F11, F2 .... etc.,


RE: Ascii values - Ankur - 12-22-2008

Asc("F11"), Asc("F2")...etc.


RE: Ascii values - sreekanth chilam - 12-23-2008

Hi ,
Use "Asc" built-in function ;

Code:
For i=1 to 12  
   funct_key= "F"&i
   msgbox Asc(funct_key)
Next



RE: Ascii values - bfakruddin - 12-24-2008

Thank You ankur for reply,

But This is not working.....! As per your code it is returning a ASCII value of "F" not "F11"...., for all Functional keys .. it is returning same value "70" i.e, ASCII value of "F"...

check this

print asc("`") --> 126
print asc("~") --> 96

These two are getting different ascii value for single key in keyboard... bcoz they are special char's not a functioning keys or char's.

I hope for function keys also contain some ASCII Value.


RE: Ascii values - bfakruddin - 12-24-2008

Hello,

This loop returning all 70's...

it is a ascii value of "F"


RE: Ascii values - bfakruddin - 01-03-2009

Hello Ankur...

I was waiting very eagerly for your reply, but I didn't get....
here is the answer... I was already given a hint, but you didn't given any answer.

ASCII Value is available for only characters not for keys...
--> I given that "~,` " these two characters have different ASCII Values but it is single key,

Functional Keys doesn't contain any Characters....

So....! It doesn't Contain ASCII Values...

Thank You...
Baba Fakruddin


RE: Ascii values - Ankur - 01-03-2009

That's a new thing I learnt today...Thanks for sharing.

I searched for some more info. on ASCII and here is the complete ASCII chart

@bfakruddin: I am curious whether you are seeking answers on this forum or you already know the answers and just want to share your knowledge here.


RE: Ascii values - bfakruddin - 01-06-2009

Sorry Ankur, do not think like that... Once I get the question in my mind I will try in all the ways to clear that... here in your site and also in many sites... not only in sites but also from my side... until unless I found the answer for my question I can't feel good...

Once I got answer for my question I will share... and I will answer for my question in thread. If any body gives exact answer I will try to take additional information from that answer.
Plz do not think that I was already know the answer before posting the thread.

thank you for reply..
Baba Fakruddin.D