AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

phone number too word generator

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Quincy
Guest





PostPosted: Sat Sep 27, 2008 7:13 pm    Post subject: phone number too word generator Reply with quote

Has anybody made phone number too word generator?

Like,

0 = 0
1 = 1 or .
2 = ABC
3 = DEF
4 = GHI
5 = JKL
6 = NMO
7 = PQRS
8 = TUV
9 = WXYZ

2453425 would be
AHKDIAL
or
CGLEHBL
etc.
etc.

Sad I think the parseing algebra would kill me on this.

So I hope somebody made phone number too word generator.
Tried some on the web they do Wii numbers aswell but the dont give me
all posibility and most of them will compare them only too a english dictionary.

Thanks, Quincy
Back to top
Dra_Gon



Joined: 25 May 2007
Posts: 314

PostPosted: Sat Sep 27, 2008 7:48 pm    Post subject: Reply with quote

Actually, it probably shouldn't be that difficult, I'll try to do more thinking on it over the next couple days {if someone else doesn't reply with a better answer for ya}, but at the moment I haven't heard of anything like that.

You'd probably need only a couple loops {one for the 7 digits and the other to parse each digit of the phone number}, an edit control {or inputbox} for the number, a listbox for your results and a "GO" button. Sounds like a bit of fun to try anyway Wink.

Ciao,
Dra'Gon
_________________

For a good laugh {hopefully} >> megamatts.50megs.com

My WritersCafe profile>>
http://www.writerscafe.org/writers/BlueDragonFire/
Back to top
View user's profile Send private message Send e-mail
trenton_xavier



Joined: 16 Jun 2008
Posts: 64
Location: Pittsburgh, Pennsylvania, USA

PostPosted: Sat Sep 27, 2008 9:06 pm    Post subject: Reply with quote

Does this work for you?

Code:
inpt = 2453425

inptlen := StrLen(inpt)

var0 = 0
var1 = 1.
var2 = ABC
var3 = DEF
var4 = GHI
var5 = JKL
var6 = NMO
var7 = PQRS
var8 = TUV
var9 = WXYZ

text :=

Loop, %inptlen%
 {
  char := SubStr(inpt,A_Index,1)
  StringLen, varlen, var%char%
  Random, varpos, 1, varlen
  text := text . SubStr(var%char%, varpos, 1)
 }

MsgBox, %text%
Back to top
View user's profile Send private message AIM Address
Slanter



Joined: 28 May 2008
Posts: 397
Location: Minnesota, USA

PostPosted: Sun Sep 28, 2008 1:35 am    Post subject: Reply with quote

You might find this helpful: Numpad9 - T9 Input with the Numpad by Icarus
_________________
Unless otherwise stated, all code is untested

(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.
Back to top
View user's profile Send private message Visit poster's website
Dra_Gon



Joined: 25 May 2007
Posts: 314

PostPosted: Sun Sep 28, 2008 8:48 pm    Post subject: Reply with quote

I'm kinda stuck at the moment on the one I'm working on so I'll simply post what I've got and see if anyone else has ideas for it.

Code:
; Takes a phone number {or any numerical set of digits}
;   and changes them to a list of alpha sets according
;   to the letters of the phone. This was begun in response
;   to an inquiry here --> http://www.autohotkey.com/forum/topic36178.html .
; Working Name:   phone2word.ahk
; Created By:     Matthew "Dra'Gon" Stohler
; Begun:          27Sep08
; Completed:
; Email:          mattstohler@yahoo.com
; ScreenName:     Dra_Gon
; Use it however you wish and enjoy!
; -------------------------------------
#SingleInstance ignore

GoSub sub_Varis

Menu, tray, NoStandard
Menu, tray, add, Exit, GuiClose
Menu, tray, Default, Exit

Gui, Add, Text, x5 y5, Enter phone number {7/10 digits`nw/o the dash "-"} then press "GO!".
Gui, Add, Edit, x5 y+10 w75 vedtPhnNbr Number
Gui, Add, Button, x+5 yp+0 gsub_GetList, GO!
Gui, Add, ListBox, x5 y+10 h75 w100 vlbxWordList

Gui, Show, Center AutoSize, Phone -> Words

Return

GuiClose:
  ExitApp
Return

sub_GetList:
  GuiControlGet, Phn_Nbr,, edtPhnNbr
  NbrLen := StrLen(Phn_Nbr)

  Loop, Parse, %Phn_Nbr%
    {
      SetDgts := PNDgt%a_Index%
      i := a_Index

      If a_Index = 1
        Loop, Parse, %SetDgts%
          {
            PhnWord%a_Index% := a_LoopField
            nWrds := a_Index
          }
      Else
        {
        }
    }

Return

sub_Varis:
  PNDgt1=1.
  PNDgt2=ABC
  PNDgt3=DEF
  PNDgt4=GHI
  PNDgt5=JKL
  PNDgt6=MNO
  PNDgt7=PQRS
  PNDgt8=TUV
  PNDgt9=WXYZ
  PNDgt0=0

Return


My basic problem now is just to get each digit's set of letters into the PhnWord%a_Index% in their proper order to create a list. There will be a LOT of "words" for even a set of 7 digits so I figured to limit it to maybe 200 or so in the list, and possibly set it up to make a text file {named by the phone number used, I suppose} for all the alpha-sets of that number.

If nothing else, I'll keep working on this off and on and see what I can come up with.

Ciao,
Dra'Gon
_________________

For a good laugh {hopefully} >> megamatts.50megs.com

My WritersCafe profile>>
http://www.writerscafe.org/writers/BlueDragonFire/
Back to top
View user's profile Send private message Send e-mail
Dennis02
Guest





PostPosted: Mon Sep 29, 2008 11:18 pm    Post subject: Reply with quote

You could try this site.

http://www.dialabc.com/motion/keypads.html

Dennis
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group