Jump to content
Sign in to follow this  
TinyHacker

make autoit understand the written text !!!

Recommended Posts

TinyHacker

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

Hard to understand what your talking bout willis? like this?

Edit Better Yet<> :blink:

#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 by lordicast

[Cheeky]Comment[/Cheeky]

Share this post


Link to post
Share on other sites
TinyHacker

THank u my friends.. that helped me alot Posted Image

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.