egymma Posted June 29, 2009 Posted June 29, 2009 Hello all,, i want to convert text letters to numbers when i type "man" in text input it appears like that "6 2 666" in the second text input m -> 6 a -> 2 n -> 666 as i type in my cell phone b -> 22 c -> 222 and so on and how make the opposite from numbers to letters ? Good day [center][/center]My Projects:-[list][*]Window Ender[*]Encryptor-Decryptor[/list]
PsaltyDS Posted June 29, 2009 Posted June 29, 2009 Hello all,,i want to convert text letters to numberswhen i type "man" in text input it appears like that "6 2 666" in the second text inputm -> 6a -> 2n -> 666as i type in my cell phone b -> 22c -> 222 and so onand how make the opposite from numbers to letters ?Good dayTry a Scripting.Dictionary object (lots of examples on the forum) where you can easily cross the letter to the button pushing string. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Moderators Melba23 Posted June 29, 2009 Moderators Posted June 29, 2009 egymma,This shows one possible way to do it. I have only set it up for a-f. Over to you to fill in the rest of the array!#include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <Array.au3> Global $aTextType[6][2] = [[97, "1"], [98, "11"], [99, "111"], [100, "2"], [101, "22"], [102, "222"]] $hGUI = GUICreate("Test", 500, 500) $hInput = GUICtrlCreateInput("", 10, 10, 200, 20, $ES_LOWERCASE) GUISetState() $sCurrent_Text = "" While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch $sText = GUICtrlRead($hInput) If $sCurrent_Text <> $sText Then $iIndex = _ArraySearch($aTextType, Asc(StringRight($sText, 1))) ConsoleWrite($aTextType[$iIndex][1] & @CRLF) $sCurrent_Text = $sText EndIf WendM23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
egymma Posted June 29, 2009 Author Posted June 29, 2009 thanks alot PsaltyDS i'll sure try it [center][/center]My Projects:-[list][*]Window Ender[*]Encryptor-Decryptor[/list]
egymma Posted June 29, 2009 Author Posted June 29, 2009 thanks muh Melba23 that was very helpfull i'll work on it [center][/center]My Projects:-[list][*]Window Ender[*]Encryptor-Decryptor[/list]
egymma Posted June 29, 2009 Author Posted June 29, 2009 (edited) just another question .. how i make text warp in edit box ?? **Edit** nvm i got it Edited June 29, 2009 by egymma [center][/center]My Projects:-[list][*]Window Ender[*]Encryptor-Decryptor[/list]
PsaltyDS Posted June 29, 2009 Posted June 29, 2009 just another question .. how i make text warp in edit box ?? It's a style thang: #include <GuiConstantsEx.au3> #include <EditConstants.au3> $hGUI = GUICreate("Test", 200, 200) $iStyle = BitOR($ES_AUTOVSCROLL, $ES_WANTRETURN) $ctrlEdit = GUICtrlCreateEdit("", 10, 10, 180, 180, $iStyle) GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now