FernanS1 Posted October 5, 2018 Share Posted October 5, 2018 Hi all, I'm running into an issue where I am sending a string using the "Send" command to a field. Oddly enough it is opening up Outlook, and I have no idea why. The String it is sending is grabbed from a dictionary populated from an Excel spreadsheet. As far as I can see, whenever it tries to send a "#", outlook opens. Strings that have caused me issues have been "PLT#4-3VERT", "PLT#4-2VERT" etc... It gets the "PLT" part but stops and opens Outlook after. Here is the code snippet that is doing the work Else Send("{DOWN}") Sleep(10000) Send(String($oDictionary.Item(GUICtrlRead($billedPoleFrameCUArray[$i])))) Sleep(5000) Send("{TAB}") Sleep(5000) Send(GUICtrlRead($billedPoleFrameQtyArray[$i])) Sleep(5000) Send("{TAB}") Send("INSTALL") Sleep(5000) Send("{TAB}") Send("NORMAL") Sleep(5000) Send("{TAB}") Send("DPOLE") Sleep(5000) Send("OPERATIONS") Sleep(5000) Send("{F10}") Sleep(20000) EndIf It is getting hung up at the first "Send" method that grabs $billedPoleFrameCUArray I've highlighted the entries in the excel file image below that are producing this "Outlook Shortcut" error - Please note that the right-hand side column is what is being entered into the field you saw above. The left side column is the "simplified" term for the right side items. I'm a novice at AutoIT, so any help would be very much appreciated. I don't know if this is an issue on the autoIT side, or the application I am making entries on. Thanks in advance! Shawn Link to comment Share on other sites More sharing options...
Ilounah Posted October 5, 2018 Share Posted October 5, 2018 Hello, You want to use Outlook and attach the Excel file using AutoIT? Link to comment Share on other sites More sharing options...
jdelaney Posted October 5, 2018 Share Posted October 5, 2018 send('your string with # in it',1) Check the help file. Much more reliable routes are to use the _ie* functions to set the data...or if that's a gui application: controlcommand or controlsettext FernanS1 1 IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
FernanS1 Posted October 5, 2018 Author Share Posted October 5, 2018 Thanks for your input. Using Send with the flag to send RAW data is exactly the solution I needed. Much appreciated! I'll do more research on the _ie* functions to see if I can avoid running into this in the future. 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