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 

Gui add edit for ip control

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



Joined: 12 Mar 2008
Posts: 5

PostPosted: Wed Mar 19, 2008 5:37 pm    Post subject: Gui add edit for ip control Reply with quote

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 Smile

thx
Back to top
View user's profile Send private message
TheIrishThug



Joined: 19 Mar 2006
Posts: 370

PostPosted: Wed Mar 19, 2008 5:43 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
aCkRiTe



Joined: 21 Jul 2006
Posts: 502

PostPosted: Wed Mar 19, 2008 6:06 pm    Post subject: Reply with quote

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


Question
_________________

HTH...

Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 5882

PostPosted: Wed Mar 19, 2008 6:30 pm    Post subject: Reply with quote



Smile
Back to top
View user's profile Send private message
c4stor



Joined: 12 Mar 2008
Posts: 5

PostPosted: Thu Mar 20, 2008 9:58 am    Post subject: Reply with quote

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
View user's profile Send private message
c4stor



Joined: 12 Mar 2008
Posts: 5

PostPosted: Thu Mar 20, 2008 10:38 am    Post subject: Reply with quote

sory its oki now Sad
Back to top
View user's profile Send private message
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