Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ascii values
#1
Solved: 10 Years, 9 Months, 1 Week ago
How to return the ASCII value of Functional Keys

e.g: F11, F2 .... etc.,
Reply
#2
Solved: 10 Years, 9 Months, 1 Week ago
Asc("F11"), Asc("F2")...etc.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 10 Years, 9 Months, 1 Week ago
Hi ,
Use "Asc" built-in function ;

Code:
For i=1 to 12  
   funct_key= "F"&i
   msgbox Asc(funct_key)
Next
Reply
#4
Solved: 10 Years, 9 Months, 1 Week ago
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.
Reply
#5
Solved: 10 Years, 9 Months, 1 Week ago
Hello,

This loop returning all 70's...

it is a ascii value of "F"
Reply
#6
Solved: 10 Years, 9 Months, 1 Week ago
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
Reply
#7
Solved: 10 Years, 9 Months, 1 Week ago
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.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#8
Solved: 10 Years, 9 Months, 1 Week ago
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Removing ASCII Control Characters from a file Nithin 0 5,509 09-30-2013, 11:45 PM
Last Post: Nithin
  Ascii Characters Appear while typing in Test Page SaiJyothsana 2 2,583 11-10-2010, 04:52 PM
Last Post: SaiJyothsana
  How to compare local sheet values with run time data table values? test71 2 8,151 03-14-2008, 07:09 PM
Last Post: test71

Forum Jump:


Users browsing this thread: 1 Guest(s)