Jump to content

Recommended Posts

Posted (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 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]
Posted

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]
Posted (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

<{POST_SNAPBACK}>

Played with your program a little.... not sure about LakeNUM

but 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
            
    EndSelect

hope it helps...

Edited by Valuater

NEWHeader1.png

Posted

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 $Message

Take 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. :">

RPC

Played with your program a little.... not sure about LakeNUM

but 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
            
    EndSelect

hope it helps...

<{POST_SNAPBACK}>

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
  • Recently Browsing   0 members

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