TinyHacker Posted August 10, 2010 Share Posted August 10, 2010 Hello: how to make autoit understand the written text? means: in this script how can i make it tell me the text which is befor (@) and .... which is after the dot (.) ???? is it possible in autoit? if not... how to do that in another way??! #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 224, 237, -1, -1) $Input1 = GUICtrlCreateInput("[email="me@hotmail.com"]me@hotmail.com[/email]", 24, 24, 177, 21) $Input2 = GUICtrlCreateInput("my folder is .temp", 24, 101, 177, 21) $Button1 = GUICtrlCreateButton("show only name that before aat (@)", 24, 56, 177, 25, $WS_GROUP) $Button2 = GUICtrlCreateButton("show name that is after the dot (.)", 23, 137, 177, 25, $WS_GROUP) $Label1 = GUICtrlCreateLabel("The first button must show (me)", 24, 192, 147, 17) $Label2 = GUICtrlCreateLabel("The second button must show (temp)", 24, 209, 175, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit case $Button1 msgbox(0,"my name","") case $Button2 msgbox(0,"my folder","") EndSwitch WEnd Link to comment Share on other sites More sharing options...
lordicast Posted August 10, 2010 Share Posted August 10, 2010 (edited) Hard to understand what your talking bout willis? like this? Edit Better Yet<> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 224, 237, -1, -1) $Input1 = GUICtrlCreateInput('[email="me@hotmail.com"]me@hotmail.com[/email]', 24, 24, 177, 21) $Input2 = GUICtrlCreateInput("my folder is .temp", 24, 101, 177, 21) $Button1 = GUICtrlCreateButton("show only name that before aat (@)", 24, 56, 177, 25, $WS_GROUP) $Button2 = GUICtrlCreateButton("show name that is after the dot (.)", 23, 137, 177, 25, $WS_GROUP) $Label1 = GUICtrlCreateLabel("The first button must show (me)", 24, 192, 147, 17) $Label2 = GUICtrlCreateLabel("The second button must show (temp)", 24, 209, 175, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit case $Button1 $EndJa = StringInStr(GUICtrlRead($Input1),']') $AtSym = StringInStr(GUICtrlRead($Input1),'@',0,2) $User = StringLeft(GUICtrlRead($Input1),$AtSym - 1) $User = StringTrimLeft($User,$EndJa) msgbox(0,"my name",$User) case $Button2 $StrFind = StringInStr(GUICtrlRead($Input2),'.') $LastExt = StringLen(GUICtrlRead($Input2)) - $StrFind $Ext = StringRight(GUICtrlRead($Input2),$LastExt) msgbox(0,"my folder",$Ext) EndSwitch WEnd Edited August 10, 2010 by lordicast [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
Zibit Posted August 10, 2010 Share Posted August 10, 2010 let me get this right. You want to know what is before @ and after . well then you should check out the StringSplit function. There are a lot of native functions that are capable doing that. Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam Link to comment Share on other sites More sharing options...
TinyHacker Posted August 10, 2010 Author Share Posted August 10, 2010 THank u my friends.. that helped me alot Link to comment Share on other sites More sharing options...
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