Sign in to follow this  
Followers 0
TheBobynator

GuiCtrlCreateInput Question

4 posts in this topic

hi together,

I ve post this question now 3 times but noone give me an exact answer.

How can a make an Input wehre you can only type Numbers (0-9) and comas (,).

thx :P

Share this post


Link to post
Share on other sites



I think it can't be done whit autoIt, at least not in a easy way...

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

hi together,

I ve post this question now 3 times but noone give me an exact answer.

How can a make an Input wehre you can only type Numbers (0-9) and comas (,).

thx :P

try this:

#include <GUIConstants.au3>
Opt("GUIOnEventMode", 1)

GUICreate("", 336, 65, 193, 115)
GUISetOnEvent($GUI_EVENT_CLOSE,"close")
$input = GUICtrlCreateInput("", 16, 16, 297, 21)

GUISetState(@SW_SHOW)
While 1
    Sleep(100)
    If GUICtrlRead($input) <> "" Then GUICtrlSetData($input,StringRegExpReplace(GUICtrlRead($input),"[^\d,]",""))
WEnd

Func close()
    Exit
EndFunc
Edited by andybiochem

- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!

Share this post


Link to post
Share on other sites

I think I know your problem for the numbers.

$ES_NUMBER

But for the comma, I dont know. Sorry :P

AlmarM


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0