Jump to content

MSN Like GUI


Recommended Posts

Hey there,

I wondered if one of you could help me out with the following:

I want to create a msn-like dialogue.

My idea was to create some kind of GUI with 2 text boxes one in the middle and one under it. The one in the middle is, just like with msn, to see what you typed. and the lower one to actually type ( press enter or a button to send the message to the upper box ). I want to make a little helper that can do whatever I want it to, as long as it's simple. ( search on google, open a folder, translate something, launch something etc. )

I hope I can create that code by myself. Here is the basic idea again, because all this text is kind of confusing isn't it?:

Program

-Looks like an MSN box

-Upper box to see what you typed

-Lower box to send a message to the upper box

-If you send the message to the upper box, it gets scanned for keywords ( launch ????? , firefox, mail , etc. )

-Message appears in the upper box.

-Eventually an animated picture above it

Question:

1) How do I send a message from one input box to another?

2) How do I scan it for certain keywords?

Thanks a lot!

#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

    EndSwitch
WEnd
Edited by nf67
Link to comment
Share on other sites

  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

:S My one has only Build Compile Go SyntaxCheck Prod and Stop Executing (+ a few next previous message functions and switch pane )

open or create a script (.au3) and open it with scite , now it will have...

Link to comment
Share on other sites

Posted Image

Mmm no not really I downloaded SciTe apart from AutoIt3 but I also got the version included in the AutoIt3 installer.

Wich one do I have to use ( they seem to be a bit different )

Link to comment
Share on other sites

  • Developers

Posted Image

Mmm no not really I downloaded SciTe apart from AutoIt3 but I also got the version included in the AutoIt3 installer.

Wich one do I have to use ( they seem to be a bit different )

download the SciTE4AutoIt3 installer (see link in my sig) and install that ... it should override the "lite" version that comes with the AUtoIt3 installer :whistle: Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Igiveup =D

I hop eyou can help for further progress

what ?

Werkt SciTE nu korrekt of heb je nog steeds maar een paar opties onder tools ?

:whistle:

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Werkt SciTE nu korrekt of heb je nog steeds maar een paar opties onder tools ?

Is SciTe working now or do you still have only a few options under tools ?

It works now, just typed Igiveup because the name was too difficult :whistle:

( just translated your message so the others can understand it )

Edited by nf67
Link to comment
Share on other sites

If you want insert colour at words, you should use html. You could look an example from my chat.

Chat

Thanks a lot! That's very useful. Since you worked on it, can you filter out the code that sends the message you typed to the main chat screen if you press send or enter?

Link to comment
Share on other sites

I played around for a bit and now I have this:

FULL SCREEN OR IT GETS REALLY WEIRD :whistle:

#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
            GUICtrlRead ( $TypeHere )   ;; Read the text input ( lower box ), according            
                                                                         to help: Value: Text entered
            
                        GUICtrlSetData($Typed, $TypeHere);; 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

But for some reason everytime I type and click Go the upper box content changes to 4 :-/ seems that the value was not the text after all

Edited by nf67
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...