Fabry Posted July 21, 2007 Share Posted July 21, 2007 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 More sharing options...
nf67 Posted July 21, 2007 Author Share Posted July 21, 2007 Huh that's really confusing, maybe someone can explain it a bit, what do I replace the data_you_typed thing with? How would I ever know what I type at another moment Link to comment Share on other sites More sharing options...
Fabry Posted July 21, 2007 Share Posted July 21, 2007 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 More sharing options...
Fabry Posted July 21, 2007 Share Posted July 21, 2007 My chat send over UDP and receive also, then I don't use only guictrlread and guictrlsetdata. 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 More sharing options...
nf67 Posted July 21, 2007 Author Share Posted July 21, 2007 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 boxThanks a lot if someone can do this Link to comment Share on other sites More sharing options...
Fabry Posted July 21, 2007 Share Posted July 21, 2007 (edited) #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 July 21, 2007 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 More sharing options...
nf67 Posted July 21, 2007 Author Share Posted July 21, 2007 That's Awesome! Works just as I wanted it to work! Thanks! ( Now just the Check for keyword part =D, I'll post if I need help ) Link to comment Share on other sites More sharing options...
Sardith Posted July 21, 2007 Share Posted July 21, 2007 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 More sharing options...
nf67 Posted July 21, 2007 Author Share Posted July 21, 2007 Cool thanks mate, someone got ideas for the Check For Keyword function yet? Nice to see people are this helpful here =D Link to comment Share on other sites More sharing options...
poisonkiller Posted July 21, 2007 Share Posted July 21, 2007 StringInStr() Link to comment Share on other sites More sharing options...
Fabry Posted July 21, 2007 Share Posted July 21, 2007 Cool thanks mate, someone got ideas for the Check For Keyword function yet?Nice to see people are this helpful here =DWhat 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 More sharing options...
Sardith Posted July 21, 2007 Share Posted July 21, 2007 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 More sharing options...
Fabry Posted July 21, 2007 Share Posted July 21, 2007 For the key word you can use Stringinstr() using And or Or if the keyword is more one. 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 More sharing options...
nf67 Posted July 22, 2007 Author Share Posted July 22, 2007 (edited) Thanks Fabry, I'll give it a try Here's the fine-read version of the code, I tought you guys might like to see it.Create GUI blablaCreate Button ( Go )Create EdittextfieldCreate InputtextfieldIn case button pressed:move text from Inputfield to Editfieldif Mailgo to www.hotmail.comandadd to editfield "Read around sire!"endifif Overlordlaunch C:/Program Files/Overlord/Overlord.exeandadd to editfield: "Overlord launched sir"endif****Some more commands, I'm sure I can make these***Clear InputfieldEndcaseSardith: These are the keywords I tought of_______________________________________________Mailwww.hotmail.comRead around, Sire._________________________________________________Overlordlaunch overlord.exe ( I'll edit it to fit the path of the .exe )Ready to dominate!_________________________________________________Pictureitlaunch pi.exeEditing pictures again, mighty lord?_________________________________________________________________________________________Autoitlaunch 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________________________________________________Firefoxlaunch firefox.exeI present you: internet!_________________________________________________Steamlaunch steam.exeThat stupid piece of crap! I'd almost refuse to touch it!_____________________________________________________Paintlaunch paint.exeOnly because you're the master then._____________________________________________________________________________Shareazamaximize 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 July 22, 2007 by nf67 Link to comment Share on other sites More sharing options...
nf67 Posted July 22, 2007 Author Share Posted July 22, 2007 (edited) 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 July 22, 2007 by nf67 Link to comment Share on other sites More sharing options...
nf67 Posted July 22, 2007 Author Share Posted July 22, 2007 Eltorro are you here? Link to comment Share on other sites More sharing options...
Fabry Posted July 22, 2007 Share Posted July 22, 2007 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 More sharing options...
nf67 Posted July 22, 2007 Author Share Posted July 22, 2007 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 More sharing options...
nf67 Posted July 22, 2007 Author Share Posted July 22, 2007 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 More sharing options...
Fabry Posted July 22, 2007 Share Posted July 22, 2007 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now