TinyHacker 0 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 Share this post Link to post Share on other sites
lordicast 0 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] Share this post Link to post Share on other sites
Zibit 0 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 Share this post Link to post Share on other sites
TinyHacker 0 Posted August 10, 2010 THank u my friends.. that helped me alot Share this post Link to post Share on other sites