FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Script: Virtial keyboard.

 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows
View previous topic :: View next topic  
Author Message
Runarius
Senior Member


Joined: 19 Nov 2006
Posts: 124

PostPosted: Mon Jun 11, 2007 11:55 pm    Post subject: Script: Virtial keyboard. Reply with quote

[b]Update June 17th, 2007

- Changed from Virtual Keystrokes, to Virtual Unicodes, which means that it now supports foreign characters.

- Made it all just a tiny bit better.

- Added instructions for how to edit the characters you want which key on your phone to represent, and how to add new characters.

[/b]
I saw a few requests for a script like this and finally I sat down and made it. The script works just like writings sms's on your phone, just without using the T9 dictionary. You can see a a little part of the last few words you have written on the phone, and it writes on the fly. You can press "Star", or * on your phone to change between upper and lower case(although it will try it's best to put uppercase letters after punctuation, just like the phone does) You can also toggle to number input. Arrow keys on phone works as the arrow keys on keyboard, the middle button as enter, and c as backspace. If the keysetup doesn't fit for all of you, please let me know, and I'll change the keysetup for you if you don't know how to do this by yourself, or I will make a first-run screen which will make the user be able to set the keys up by himself.

Note that I didn't have much time for testing this script either, so please submit bugreports.

the keysetup at this point is set to very much alike the newer Sony Ericssons, so many people should be able to use it with ease.

Currently, I have not integrated all symbols, since most symbols on the real phone input annoys me, since I so rarely use them, if you want more symbols or foreign characters, please let me know here, or you could easaly add them yourself:
[b]
You may want to change which character should be at the keys on your phone, or add new characters, which is really easy. First, you ofcourse will have to open up the writer.js file inside the salling clicker scripts. Open it with notepad or any other text-program. At the top, you will see this:
[code:1]
letters1 = new Array(".", ",", "!", "''");
letters2 = new Array("a", "b", "c","","");
letters3 = new Array("d", "e", "f");
letters4 = new Array("g", "h", "i");
letters5 = new Array("j", "k", "l");
letters6 = new Array("m", "n", "o","");
letters7 = new Array("p", "q", "r", "s");
letters8 = new Array("t", "u", "v");
letters9 = new Array("w", "x", "y", "z");
letters0 = new Array("-", "'","(", ")","+","/");
lettersSquare = new Array(" ");

numbers1 = new Array("1")
numbers2 = new Array("2");
numbers3 = new Array("3");
numbers4 = new Array("4");
numbers5 = new Array("5");
numbers6 = new Array("6");
numbers7 = new Array("7");
numbers8 = new Array("8");
numbers9 = new Array("9");
numbers0 = new Array("0");
numbersSquare = new Array(" ", ".", ",");
[/code:1]

This means that when your phone is in writing letters mode(shown on the phone as "abc","ABC" or "Abc) it will find the keys it want to use in the upper keySet, the one with the preset of "letters", and when your phone is in writing numbers mode("123") it will use the last keyset, with the preses of "numbers". Still with me?

So if you want to use "1" on your phone for SPACE and "#" for symbols, just rename "letters1" and "lettersSquare"(note: case sensetive)

If you want to add new foreign characters, go [url=http://www.columbia.edu/kermit/utf8-t1.html]here[/url] to find the unicode for you key, in this example, we want to find "" just scroll down or use ctrl+f to search for it. When you have found it in the list, you will se this:

[code:1]
[] U+00F6 ö LATIN SMALL LETTER O WITH DIAERESIS
[/code:1]

So the unicode for is 246.

you also need to find the unicode for upper case , which I found in the list to be 214

now, lets add this character to the 6-key:
[code:1]
letters6 = new Array("m", "n", "o","","");
[/code:1]

if you want to delete "", just remove it, like this:
[code:1]
letters6 = new Array("m", "n", "o","");
[/code:1]

Now we must add the unicode into the script:

In the script, scroll a little bit down, untill you see something like this:
[code:1]
keyCodes = new Array("A", 65, "B", 66, "C", 67, "D", 68, "E", 69, "F", 70, "G", 71, "H", 72, "I", 73, "J", 74, "K", 75, "L", 76, "M", 77, "N", 78, "O", 79, "P", 80, "Q", 81, "R", 82, "S", 83, "T", 84, "U", 85, "V", 86, "W", 87, "X", 88, "Y", 89, "Z", 90, "a", 97, "b", 98, "c", 99, "d", 100, "e", 101, "f", 102, "g", 103, "h", 104, "i", 105, "j", 106, "k", 107, "l", 108, "m", 109, "n", 110, "o", 111, "p", 112, "q", 113, "r", 114, "s", 115, "t", 116, "u", 117, "v", 118, "w", 119, "x", 120, "y", 121, "z", 122, "0", 48, "1", 49, "2", 50, "3", 51, "4", 52, "5", 53, "6", 54, "7", 55, "8", 56, "9", 57, " ", 32, ",", 44, ".", 46, "!", 33, "''", 34,"",198,"","216","",197,"",230,"",248,"",229);
[/code:1]

Now, you just add first, the "", then the unicode, which was 246, then the upper case version, "", and the unicode, 214. Your script should now look like this:
[code:1]
keyCodes = new Array("A", 65, "B", 66, "C", 67, "D", 68, "E", 69, "F", 70, "G", 71, "H", 72, "I", 73, "J", 74, "K", 75, "L", 76, "M", 77, "N", 78, "O", 79, "P", 80, "Q", 81, "R", 82, "S", 83, "T", 84, "U", 85, "V", 86, "W", 87, "X", 88, "Y", 89, "Z", 90, "a", 97, "b", 98, "c", 99, "d", 100, "e", 101, "f", 102, "g", 103, "h", 104, "i", 105, "j", 106, "k", 107, "l", 108, "m", 109, "n", 110, "o", 111, "p", 112, "q", 113, "r", 114, "s", 115, "t", 116, "u", 117, "v", 118, "w", 119, "x", 120, "y", 121, "z", 122, "0", 48, "1", 49, "2", 50, "3", 51, "4", 52, "5", 53, "6", 54, "7", 55, "8", 56, "9", 57, " ", 32, ",", 44, ".", 46, "!", 33, "''", 34,"",198,"","216","",197,"",230,"",248,"",229,"",246,"",214);
[/code:1]

Now you are all done.
[/b]

Enjoy.



writer.zip
 Description:
Writer v.1.05

Download
 Filename:  writer.zip
 Filesize:  2.42 KB
 Downloaded:  2623 Time(s)



Last edited by Runarius on Sun Jun 17, 2007 1:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
phatez
Junior Member


Joined: 07 Jun 2007
Posts: 49

PostPosted: Tue Jun 12, 2007 5:56 pm    Post subject: Reply with quote

For the characters think u must use unicode.

Try this link: [url]http://www.columbia.edu/kermit/utf8-t1.html[/url]
Back to top
View user's profile Send private message
Runarius
Senior Member


Joined: 19 Nov 2006
Posts: 124

PostPosted: Sun Jun 17, 2007 1:21 pm    Post subject: Reply with quote

new version.
Back to top
View user's profile Send private message
maxheadroom
Newbie


Joined: 02 Dec 2006
Posts: 9

PostPosted: Sat Mar 01, 2008 7:30 am    Post subject: Reply with quote

anyway to get a backspace key in this script?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group