Jump to content

Recommended Posts

Posted (edited)

hey guys is there anyway of banning a word like a censor from a specific Input

$txt = GUICtrlCreateInput("", 64, 232, 185, 21)

if GUICtrlRead($txt) = 'hello' Then

suit()

Else

Msgbox(0,'title,''$txt'')

EndIf

I get it to work for just saying "hello" however function wont work with sentences like "hello my name is" or "oh hello by the way"

thanks

Edited by lordicast
[Cheeky]Comment[/Cheeky]
Posted

hey guys is there anyway of banning a word like a censor from a specific Input

$txt = GUICtrlCreateInput("", 64, 232, 185, 21)

if GUICtrlRead($txt) = 'hello' Then

suit()

Else

Msgbox(0,'title,''$txt'')

EndIf

I get it to work for just saying "hello" however function wont work with sentences like "hello my name is" or "oh hello by the way"

thanks

Look at stringreplace in the help file.

[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Posted

I learned something new. :P

Anyways, look of this example I made:

$GUI = GUICreate("GUI", 123, 22, 193, 115)
$Input = GUICtrlCreateInput("", 0, 0, 121, 21)
GUISetState(@SW_SHOW)

While 1
    $Read = GUICtrlRead($Input)
    $StringReplace = StringReplace($Read, "boob", "breast")
    GuiCtrlSetData($Input, $StringReplace)
    $Msg = GUIGetMsg()
    Switch $Msg
        Case -3
            Exit
    EndSwitch
WEnd
Posted

that may be what I need piano im trying to call a function when any part of that string hits. thanks justin and eagle both suggestions work for different instances solved 2 problems

[Cheeky]Comment[/Cheeky]

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
×
×
  • Create New...