ChazFire's REVENGE Posted March 17, 2005 Share Posted March 17, 2005 (edited) GUICtrlCreateLabel("What do you want to say?", 10, 110, 150) $file = GUICtrlCreateInput("", 5, 125, 290, 20) GUICtrlSetState ( -1, $GUI_FOCUS) GUICtrlSetTip(-1, "Type text in field.") $message = GUICtrlRead($file) Dim $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(36,"","You'r about to send MESSAGE to USER, are you sure u want to continue?") Select Case $iMsgBoxAnswer = 6;Yes Run("cmd.exe") WinWaitActive("C:\WINDOWS\system32\cmd.exe") Send("LakeNUM ") Send("+{TAB " & $MESSAGE & "}") Case $iMsgBoxAnswer = 7;No EndSelect How could this code type treeview.au3 ? Does't make any since at all! Plz some1 help. EDIT oh yeah to see what i mean d/l image Edited May 20, 2006 by Jon [font="Arial"]--------When you go to jail a friend will bve thier to bail you out, but a best friend will be sitting right next to you saying, "D*** we F**ked up!"--------A friend helps you move, but a best friend helps you move dead bodies?Which brings me to my question, what kind of friend are you?[/font] Link to comment Share on other sites More sharing options...
ChazFire's REVENGE Posted March 17, 2005 Author Share Posted March 17, 2005 OK so i moved the script to a differnt folder( the main AutoIt folder) and now its typing in unistall.exe. So basicly no matter what i do it just tries to get another file, how would i just copy what is in the text field? [font="Arial"]--------When you go to jail a friend will bve thier to bail you out, but a best friend will be sitting right next to you saying, "D*** we F**ked up!"--------A friend helps you move, but a best friend helps you move dead bodies?Which brings me to my question, what kind of friend are you?[/font] Link to comment Share on other sites More sharing options...
Valuater Posted March 19, 2005 Share Posted March 19, 2005 (edited) GUICtrlCreateLabel("What do you want to say?", 10, 110, 150) $file = GUICtrlCreateInput("", 5, 125, 290, 20) GUICtrlSetState ( -1, $GUI_FOCUS) GUICtrlSetTip(-1, "Type text in field.") $message = GUICtrlRead($file)Dim $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(36,"","You'r about to send MESSAGE to USER, are you sure u want to continue?") Select Case $iMsgBoxAnswer = 6;Yes Run("cmd.exe") WinWaitActive("C:\WINDOWS\system32\cmd.exe") Send("LakeNUM ") Send("+{TAB " & $MESSAGE & "}") Case $iMsgBoxAnswer = 7;No EndSelectHow could this code type treeview.au3 ? Does't make any since at all! Plz some1 help. EDIT oh yeah to see what i mean d/l image<{POST_SNAPBACK}>Played with your program a little.... not sure about LakeNUMbut take a look at this$message = InputBox("User Name", "Please Type in Your User Name. ", @UserName, "") If $message <> "" then $message2 = InputBox("Message", "Please Enter your Message. ", "", "") EndIf If $message="" then Exit Dim $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(36,"","Your about to send MESSAGE to USER, are you sure u want to continue?") Select Case $iMsgBoxAnswer = 6;Yes Run("cmd.exe") WinWaitActive("C:\WINDOWS\system32\cmd.exe") ;Send("LakeNUM ") ;Send("+{TAB " & $MESSAGE & "}") Send(" From: " & $message) Send(" Message is " & $message2) Case $iMsgBoxAnswer = 7;No EndSelecthope it helps... Edited March 19, 2005 by Valuater Link to comment Share on other sites More sharing options...
RPC Posted March 19, 2005 Share Posted March 19, 2005 This is my first posting but I've been programming for over 14 years and I've been using AutoIt for about 3 years. The problem starts here: $message = GUICtrlRead($file). $Message is wrong because GUICtrlRead($file) is wrong.GUICtrlRead($file) is wrong because it's being called before the user has a chance to enter something into the input field.You need to create a GUI first.Next create your controls.Display the GUI to the user.Then wait in a loop for GetGUIMsg to tell you that the user keyed something into the input field.Now read the text using $Message = GUICtrlRead($file)Now you can call LakeNUM $MessageTake a look at GUI Concepts and the example for GUIGetMsg in the HELP. The GUI concept is to create a UI and display it to the user. Then in a loop constantly call GUIGetMsg. This function returns a "message" or an EVENT of what just happened. Did the user click on a control? Which one? Based on the message from GUIGetMsg do something. Like call LakeNUM followed by the text the user typed in. Hopes this helps. :"> RPCPlayed with your program a little.... not sure about LakeNUMbut take a look at this$message = InputBox("User Name", "Please Type in Your User Name. ", @UserName, "") If $message <> "" then $message2 = InputBox("Message", "Please Enter your Message. ", "", "") EndIf If $message="" then Exit Dim $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(36,"","Your about to send MESSAGE to USER, are you sure u want to continue?") Select Case $iMsgBoxAnswer = 6;Yes Run("cmd.exe") WinWaitActive("C:\WINDOWS\system32\cmd.exe") ;Send("LakeNUM ") ;Send("+{TAB " & $MESSAGE & "}") Send(" From: " & $message) Send(" Message is " & $message2) Case $iMsgBoxAnswer = 7;No EndSelecthope it helps...<{POST_SNAPBACK}> 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