ramirez Posted March 11, 2014 Share Posted March 11, 2014 (edited) Hi guys. A little big help in here. I have a GUI with 7 inputs fields and submit button. I need to, when the operator press the submit the script imports the data to a column table in a mail.oft. At this point I use the SEND command to insert data in the table, line by line. I want to past all the info in the mail at once. expandcollapse popupGUICreate("My Gui", 562, 600, 192, 114) GUICtrlCreatelabel("Field 1", 200, 80, 324, 20) $Field1 = GUICtrlCreateInput("Field 1", 200, 100, 324, 20, $ES_NUMBER) GUICtrlCreatelabel("Field 2", 200, 130, 324, 20) $Field2 = GUICtrlCreateInput("Field 2", 200, 150, 324, 20, $ES_NUMBER) GUICtrlCreatelabel("Field 3", 200, 180, 324, 20) $Field3 = GUICtrlCreateInput("Field 3", 200, 200, 324, 20, $ES_NUMBER) GUICtrlCreatelabel("Field 4", 200, 230, 324, 20) $Field4 = GUICtrlCreateInput("Field 4", 200, 250, 324, 20) GUICtrlCreatelabel("Field 5", 200, 280, 324, 20) $Field5 = GUICtrlCreateInput("Field 5", 200, 300, 324, 20, $ES_NUMBER) GUICtrlCreatelabel("Field 6", 200, 330, 324, 20) $Field6 = GUICtrlCreateInput("Field 6", 200, 350, 324, 20) GUICtrlCreatelabel("Field 7", 200, 380, 324, 20) $Field7 = GUICtrlCreateInput("Field 7", 200, 400, 324, 60, $ES_MULTILINE) $send = GUICtrlCreateButton("send", 200, 480, 324, 40, 0) $exit = GUICtrlCreateButton("exit", 420, 540, 50, 40, 0) $lbcentral = GUICtrlCreateLabel("My Gui", 150, 30, 200) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") $Pic1 = GUICtrlCreatePic("5172_quad.jpg", 20, 150, 141, 142, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) GUISetState() While 1 Switch GUIGetMsg() Case $SEND ShellExecute("send.oft") If GUICtrlRead($) = "" Then GUICtrlSetData($Field2, "Keep") Else GUICtrlRead($Field7) EndIf Sleep(1000) Send(GUICtrlRead($Field1) & " - " & GUICtrlRead($Field2)) Sleep(500) Send("{TAB 2}") Send(GUICtrlRead($Field1)) Sleep(500) Send("{TAB 2}") Send(GUICtrlRead($Field3)) Sleep(500) Send("{TAB 2}") Send(GUICtrlRead($Field2)) Sleep(500) Send("{TAB 2}") Send(GUICtrlRead($Field4)) Sleep(500) Send("{TAB 2}") Send(GUICtrlRead($Field5)) Sleep(500) Send("{TAB 2}") Send(GUICtrlRead($Field6)) Sleep(500) Send("{TAB 2}") Send(GUICtrlRead($Field7)) $ask = MsgBox($MB_YESNO, "Send", "Is this correct? This will send the mail.") If $ask = 6 Then Send("!s") ;Else ;Sleep(1500) ;Send("!s") Endif Case $GUI_EVENT_CLOSE ExitLoop Case $exit ExitLoop EndSwitch WEnd Edited March 12, 2014 by ramirez onlineth 1 Link to comment Share on other sites More sharing options...
ramirez Posted March 12, 2014 Author Share Posted March 12, 2014 Anyone? onlineth 1 Link to comment Share on other sites More sharing options...
water Posted March 13, 2014 Share Posted March 13, 2014 Looks like you use Outlook to send the mail. You could have a look at my OutlookEX UDF. onlineth 1 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki 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