sluth Posted April 18, 2008 Posted April 18, 2008 I am new to autoit. I have a gui window that has two guictrlcreateedit boxes. I want to be able to paste info into each box and then spit it out into a cmd windows 1 line item at a for each box. So spit out the first line from box 1 and the first line from box 2 then hit enter and move onto the next lines. If someone could help that would be great. Thanks
Zedna Posted April 18, 2008 Posted April 18, 2008 Post your existing code. Resources UDF ResourcesEx UDF AutoIt Forum Search
Swift Posted April 18, 2008 Posted April 18, 2008 Hmm, I'm not really understanding this, maybe he needs StringSplit($String, "&@CRLF&") I think?
sluth Posted April 18, 2008 Author Posted April 18, 2008 Post your existing code.If $msg = $fileitem3 Then GUICreate ("Random Order" , 330, 600,100,100) GuiSetIcon(@DesktopDir & "\KDLauncher.exe", 0) GUICtrlSetFont (-1,12) GUISetState (@SW_SHOW) GUISetState ($GUI_DROPACCEPTED) $OK_btn = GUICtrlCreateButton ("OK",125,550,70,20) $file1 = GuiCtrlCreateEdit("Machine Names", 10, 10, 150, 500, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL)) $file2 = GuiCtrlCreateEdit("Com Ports", 170, 10, 150, 500, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL)) ;GUICtrlCreateEdit("", 0, 0, 497, 233, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL, $ES_READONLY)) While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $OK_btn $Input1 = GUICtrlRead($file1) $Input2 = GUICtrlRead($file2) Run ("cmd") WinWait ("C:\Windows\system32\cmd.exe") send ($add & $Input1 & " " & $Input2) EndSelectWEndEndIf
sluth Posted April 18, 2008 Author Posted April 18, 2008 Hmm, I'm not really understanding this, maybe he needs StringSplit($String, "&@CRLF&") I think?Sorry what does that do?Thanks
Swift Posted April 18, 2008 Posted April 18, 2008 (edited) I think you want to Split the edit one, by lines, and then paste each line into the command window? Like this? $Split = StringSplit($Edit1, "&@CRLF&") For $i=1 To $Split[0] Send($Split[$i]) Next Edit the variables to fit your code, and try that Edited April 18, 2008 by Swift
sluth Posted April 18, 2008 Author Posted April 18, 2008 I think you want to Split the edit one, by lines, and then paste each line into the command window? Like this? $Split = StringSplit($Edit1, "&@CRLF&") For $i=1 To $Split[0] Send($Split[$i]) Next Edit the variables to fit your code, and try thatThanks I will give that a try. This forum is great. Response time is way fast. Thanks again
sluth Posted April 19, 2008 Author Posted April 19, 2008 Thanks I will give that a try. This forum is great. Response time is way fast. Thanks againThanks I will give that a try. Great forum. Response time is way fast.
Swift Posted April 19, 2008 Posted April 19, 2008 Thanks I will give that a try. Great forum. Response time is way fast.And What Was The Point Of That? You Just Said That?
sluth Posted April 19, 2008 Author Posted April 19, 2008 And What Was The Point Of That? You Just Said That?Sorry didn't mean to reply twice. Noob to the forum thing as well.
Swift Posted April 19, 2008 Posted April 19, 2008 Sorry didn't mean to reply twice. Noob to the forum thing as well.It's all good, was just wondering!
sluth Posted April 19, 2008 Author Posted April 19, 2008 It's all good, was just wondering! The code you listed will that only pull from the first box. I can't firgure out how to get it to pull the first line from both boxes and spit it out and then move to the next line.Thanks for the help
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