Jump to content

Help with this neato script please!


layer
 Share

Recommended Posts

hey guys, i just needed some suggestions/help on this part of my script...

i have a loop, where it sees if the "X" was pressed and if it was, it exits... etc. etc. then theres a part where it searches for the word "print"... and if that word is there it will do a little GUICtrlSetData ($edit, "test", 1)... except it doesnt set the data..

heres the code:

While 1
   $get= GUIGetMsg ()
   $print1= "print"
   Select
   Case $get= -3 
      Exit
               Case $get= $go
      $read= GUICtrlRead ($edit)
      If $read= "" Then
         GUICtrlDelete ($edit)
         $edit= GUICtrlCreateEdit ("", 0, 0, 300, 200)
         EndIf
      EndSelect
      If $read= $print1 Then
         GUICtrlSetData ($edit, "test", 1)
      EndIf
   WEnd

lets just say edit and all the variables are declared already... any one know why? :idiot:

FootbaG
Link to comment
Share on other sites

The line

EndSelect
      If $read= $print1 Then
         GUICtrlSetData ($edit, "test", 1)
      EndIf

Should be:

If StringInString($read, $print1) <> 0 Then
         GUICtrlSetData ($edit, "test", 1)
      EndIf
EndSelect
Edited by Wolvereness

Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote]

Link to comment
Share on other sites

Thanks Wolvereness! i still have much work to do on this though :idiot:

BTW: it's StringInStr and i made it like this now...

While 1
   $get= GUIGetMsg ()
   $read= GUICtrlRead ($edit)
   $print1= "print"
   If $get= -3 Then Exit
      If $read= "cls" Then GUICtrlDelete ($edit) & $edit= GUICtrlCreateEdit ("", 0, 0, 300, 200)
      If StringInStr($read, $print1) Then GUICtrlSetData ($edit, "test", 1)
   WEnd
FootbaG
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...