 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
c4stor
Joined: 12 Mar 2008 Posts: 5
|
Posted: Wed Mar 19, 2008 5:37 pm Post subject: Gui add edit for ip control |
|
|
hi ,
i am trying to do a control on ip who looks like to be simple but cant find any fonction or simple thing to do it
here the code :
| Code: | Gui, Font, cGreen Bold
Gui, Add, Text, x50 y142 w100 h20, Adresse IP :
Gui, Font, cBlack Bold
Gui, Add, Edit, x186 y140 w50 h20 vIP_Address1 Number Limit3
Gui, Font, s10
Gui, Add, Button, x218 y348 w100 h25 Default vButton, APPLIQUER
;GuiControl, Disable, Button
Gui , -sysMenu ; cache les controles Windows en haut a droite
Gui , Show, Center h390 w525, Configuration Réseau |
i want to do this thing : when user enter digits on the box, if number > 255 the user have a msgbox but i want to check once the user enter the 3 digit.
if anyone can help, its will be nice
thx |
|
| Back to top |
|
 |
TheIrishThug
Joined: 19 Mar 2006 Posts: 370
|
Posted: Wed Mar 19, 2008 5:43 pm Post subject: |
|
|
| Put an event on the edit control and make the first thing you do in the subroutine be checking if it has the right number of characters. If not, return, otherwise check the value. |
|
| Back to top |
|
 |
aCkRiTe
Joined: 21 Jul 2006 Posts: 502
|
Posted: Wed Mar 19, 2008 6:06 pm Post subject: |
|
|
| Code: |
Gui, Font, cGreen Bold
Gui, Add, Text, x50 y142 w100 h20, Adresse IP :
Gui, Font, cBlack Bold
Gui, Add, Edit, x186 y140 w50 h20 gCheck_Num vIP_Address1 Number Limit3
Gui, Font, s10
Gui, Add, Button, x218 y348 w100 h25 Default vButton, APPLIQUER
;GuiControl, Disable, Button
Gui , -sysMenu ; cache les controles Windows en haut a droite
Gui , Show, Center h390 w525, Configuration Réseau
Check_Num:
gui, submit, nohide
If IP_Address1 > 255
MsgBox, The number entered is greater than 255.
Return
|
 _________________
HTH...
 |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 5882
|
Posted: Wed Mar 19, 2008 6:30 pm Post subject: |
|
|
 |
|
| Back to top |
|
 |
c4stor
Joined: 12 Mar 2008 Posts: 5
|
Posted: Thu Mar 20, 2008 9:58 am Post subject: |
|
|
i just test using Use the IP Address control in your GUI
but when i do a Msgbox on my variables example :
| Code: | | IP_Address := IPAddress_CreateControl(GuiID, 186, 140, 230, 20) |
i dont have the correct ip but a number . how can get the ip I entered before ? |
|
| Back to top |
|
 |
c4stor
Joined: 12 Mar 2008 Posts: 5
|
Posted: Thu Mar 20, 2008 10:38 am Post subject: |
|
|
sory its oki now  |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|