Jump to content

MSN Like GUI


Recommended Posts

The error is this:

GUICtrlRead ( $TypeHere )    ;; Read the text input ( lower box ), according              
                                                                         to help: Value: Text entered
            
                        GUICtrlSetData($Typed, $TypeHere);;
A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza è il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center]
Link to comment
Share on other sites

  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

If you use guictrlread($edit), you must put the data in a variable using $data = guictrlread($edit)

and then put it in another edit using guictrlsetdata($edit2,$data)

A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza è il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center]
Link to comment
Share on other sites

I seriously don't get what you say. Will you please type the following code for my program ( of wich I posted the full code ) :

If GO is pressed

Send Message from the input box to the edit box

Clear input box

Posted Image

Thanks a lot if someone can do this

Link to comment
Share on other sites

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("MyMinion", 301, 361, 193, 115)
$Pic1 = GUICtrlCreatePic("C:\animatedround.gif", 24, 24, 257, 121, BitOR($SS_NOTIFY, $WS_GROUP))
$TypeHere = GUICtrlCreateInput("TypeHere", 24, 280, 217, 60)
$Typed = GUICtrlCreateEdit("", 24, 152, 249, 105)
GUICtrlSetData(-1, "Typed")
$Go = GUICtrlCreateButton("Go", 240, 280, 33, 65, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Go
            $data = GUICtrlRead($TypeHere)    ;; Read the text input ( lower box ), according       to help: Value: Text entered
            GUICtrlSetData($Typed, $data&@crlf, 1);; Replace the text in the Typed box  (upper box ) with the value ( wich was the text ) of the textinput box
            GUICtrlSetData($TypeHere, "");; Resets the text input to no text so you   can type again
    EndSwitch
WEnd

Done!!

Edited by Fabry
A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza è il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center]
Link to comment
Share on other sites

Little fine tuning:

Made the go button correct size

Sized things up like your drawing.

You'll have to size your picture up yourself.

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("MyMinion", 301, 361, 193, 115)
$Pic1 = GUICtrlCreatePic("C:\animatedround.gif", 10, 24, 257, 121, BitOR($SS_NOTIFY, $WS_GROUP))
$TypeHere = GUICtrlCreateInput("", 10, 280, 248, 60)
$Typed = GUICtrlCreateEdit("", 19, 145, 262, 130)
GUICtrlSetData(-1, "Typed")
$Go = GUICtrlCreateButton("Go", 257, 279, 33, 62, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Go
            $data = GUICtrlRead($TypeHere)    ;; Read the text input ( lower box ), according       to help: Value: Text entered
            GUICtrlSetData($Typed, $data&@crlf, 1);; Replace the text in the Typed box  (upper box ) with the value ( wich was the text ) of the textinput box
            GUICtrlSetData($TypeHere, "");; Resets the text input to no text so you   can type again
    EndSwitch
WEnd

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Cool thanks mate, someone got ideas for the Check For Keyword function yet?

Nice to see people are this helpful here =D

What means " Check For Keyword"?
A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza è il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center]
Link to comment
Share on other sites

Yeah, I have a idea for the keyword. But for example, what do you want one of the keywords to be, and what do you want to do once a keyword is said?

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Thanks Fabry, I'll give it a try :whistle:

Here's the fine-read version of the code, I tought you guys might like to see it.

Create GUI blabla

Create Button ( Go )

Create Edittextfield

Create Inputtextfield

In case button pressed:

move text from Inputfield to Editfield

if Mail

go to www.hotmail.com

and

add to editfield "Read around sire!"

endif

if Overlord

launch C:/Program Files/Overlord/Overlord.exe

and

add to editfield: "Overlord launched sir"

endif

****Some more commands, I'm sure I can make these***

Clear Inputfield

Endcase

Sardith: These are the keywords I tought of

_______________________________________________

Mail

www.hotmail.com

Read around, Sire.

_________________________________________________

Overlord

launch overlord.exe ( I'll edit it to fit the path of the .exe )

Ready to dominate!

_________________________________________________

Pictureit

launch pi.exe

Editing pictures again, mighty lord?

_________________________________________________________________________________________

Autoit

launch scite.exe

Remember (yourname), (othername) and (maybeanothername) helping to create my script, oh little genius.

_________________________________________________________________________________________

Sandwich

-

What about green pesto with cumcumber and kipfilet ( don't know in english ), sir?

_______________________________________________________________________

Hungry

-

I'd love to see a sandwich... maybe mustard with cheese and ham from italy, don't forget the cumcumber and mustard+honey+mayonaise spread!

____________________________________________________________________________________________________

____________________

Jochem

-

Ah, Jochem? Your friend?

____________________________________________________________________

Niels

-

You mean the guy with the big head?

____________________________________________________________________

(yourname)

-

Oh! The genius! The excellent coder! The helpful helper! The.. Oh yes, a command.

____________________________________________________________________

lol

-

heheheh

________________________________________________

Firefox

launch firefox.exe

I present you: internet!

_________________________________________________

Steam

launch steam.exe

That stupid piece of crap! I'd almost refuse to touch it!

_____________________________________________________

Paint

launch paint.exe

Only because you're the master then.

_____________________________________________________________________________

Shareaza

maximize shareaza ( it's always in the icon tray )

You know, I once downloaded the internet, but halfway my whole room was full of harddisks

______________________________________________________________________________

How are you?

-

Perfectly fine, now you're back!

_____________________________

Hi

-

Master!

____________________________

Hello

-

Oh hey there, sire.

____________________________

Bye

-

So sad to see you leaving, lord.

______________________________

Cya

-

Don't go away!

____________________________

See you

-

Ahhh, you 're leaving me?

Edited by nf67
Link to comment
Share on other sites

I fine-tuned Sardiths GUI script again and now it's perfect.

I tried what you said Fabry but I did something wrong ( ofcourse :/ )

Also the Hotkey function is not working. Take a look, I think it's easy to fix if you know how:

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("MyMinion", 301, 361, 193, 115)
$Pic1 = GUICtrlCreatePic("C:\animatedround.gif", 10, 20, 279, 121, BitOR($SS_NOTIFY, $WS_GROUP))
$TypeHere = GUICtrlCreateInput("", 10, 280, 248, 60)
$Typed = GUICtrlCreateEdit("", 10, 145, 279, 130)
GUICtrlSetData(-1, "Typed")
$Go = GUICtrlCreateButton("Go", 257, 279, 33, 62, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Hotkeyset ("{ENTER}", "$Go" ); I know $Go is not afunction but how do I let it press Go?

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Go
            $data = GUICtrlRead($TypeHere)  
            GUICtrlSetData($Typed, $data&@crlf, 1)
                    if StringInStr ( "$Typed", "Overlord" ) then     ;Wrong
                    run ( "Launcher.exe", "D:\Games\OverlordFULL\" ) ;Wrong
                ;; Add to $Typed "Ready to dominate!"           ;Wrong
                    endif                                           ;Wrong
            GUICtrlSetData($TypeHere, "")
    EndSwitch
WEnd
Edited by nf67
Link to comment
Share on other sites

For "Go" function use defpush.

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("MyMinion", 301, 361, 193, 115)
$Pic1 = GUICtrlCreatePic("C:\animatedround.gif", 10, 20, 279, 121, BitOR($SS_NOTIFY, $WS_GROUP))
$Typed = GUICtrlCreateEdit("", 10, 145, 279, 130)
GUICtrlSetData(-1, "Typed")
$TypeHere = GUICtrlCreateInput("", 10, 280, 248, 60)
$Go = GUICtrlCreateButton("Go", 260, 279, 33, 62 )
GUISetState()
guictrlsetstate($go,$GUI_DEFBUTTON)
#EndRegion ### END Koda GUI section ###
guictrlsetstate($TypeHere,$gui_focus)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Go
            $data = GUICtrlRead($TypeHere)    
            GUICtrlSetData($Typed, $data&@crlf, 1)
                    if StringInStr ( $data, "Overlord" ) then     
                    run ( "D:\Games\OverlordFULL\Launcher.exe", "D:\Games\OverlordFULL\" ) 
                ;; Add to $Typed "Ready to dominate!"            
                    GUICtrlSetData($Typed, 'Ready to dominate!'&@crlf, 1)
                    endif                                            
            GUICtrlSetData($TypeHere, "")
    EndSwitch
WEnd
A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza è il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center]
Link to comment
Share on other sites

Thanks a bunch again!

I'll add your name to the function list ( see the list I made for sardith to see what happens =D )

It works perfect now ( also thanks for fixing the Run error ) =D =D =D =D

Link to comment
Share on other sites

One last thing: I tried to pop up a window with a photo ( that worked ), but when I close it, the whole program closes. O tried Winkill ("Laurien") instead of exit and @sw_hide but none of it worked. Please help. Here's the piece of code:

if StringInStr ( $data, "Laurien" ) then  
                        sleep (1500)                            
                    GUICtrlSetData($Typed, 'Laurien? I got a picture of her! Here: (Type Close to Close it) '&@crlf, 1)
                        sleep (3000) 
                    $LaurienGUI = GUICreate("Laurien", 116, 116, 214, 131)
                    $LaurienPic = GUICtrlCreatePic("C:\minionme\laurien.jpg", 0, 0, 113, 113, BitOR($SS_NOTIFY,$WS_GROUP))
                     GUISetState(@SW_SHOW, "Laurien")

                       While 1
                       $nMsg = GUIGetMsg()
                       Switch $nMsg
                        Case $GUI_EVENT_CLOSE
                            exit
                           

                      EndSwitch
                     WEnd
                    endif
Link to comment
Share on other sites

Try this:

if StringInStr ( $data, "Laurien" ) then  
                        sleep (1500)                            
                    GUICtrlSetData($Typed, 'Laurien? I got a picture of her! Here: (Type Close to Close it) '&@crlf, 1)
                        sleep (3000) 
                    $LaurienGUI = GUICreate("Laurien", 116, 116, 214, 131)
                    $LaurienPic = GUICtrlCreatePic("C:\minionme\laurien.jpg", 0, 0, 113, 113, BitOR($SS_NOTIFY,$WS_GROUP))
                     GUISetState(@SW_SHOW, "Laurien")

                       While 1
                       $nMsg = GUIGetMsg()
                       Switch $nMsg
                        Case $GUI_EVENT_CLOSE
guidelete($LaurienGUI)                          
exitloop
                           

                      EndSwitch
                     WEnd
                    endif

I don't Try it , but I think it works.

A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza è il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center]
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...