xkaba01 Posted January 8, 2013 Share Posted January 8, 2013 Hi all, I got this good result c:\users\akabilka\desktop\promedica\LOGS\CCLogFile-01-08-2013_14-54.log but sometimes this bad result c:\users\akabilka\desktop\promedica|LOGS\CCLogFile-01-)*_@)!#_14-54.log when I use $LogFileName = $WorkingDirectory & "LOGS\CCLogFile-" & @MON & "-" & @MDAY & "-" & @YEAR & "_" & @HOUR & "-" & @MIN & ".log" ControlSend("Save", "", "Edit1", $LogFileName) in other part of my code is this command Send($WorkingDirectory & $AmexImportFile) and also sometimes (approximately one from 10 executions) bad text is send to the either dialog Open or Save. It seems like key SHIFT is pressed - the bad characters are changed to same key from keybord but to character with SHIFT (example a to A, \ to |,8 to * etc.) Is this "mystery" known. Thanks in advance, Ales form Czech Republic Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 8, 2013 Moderators Share Posted January 8, 2013 Hi, xkaba01, welcome to the forum. It is difficult to tell where the problem lies without seeing your full code (we cannot see, for example, what the value of $WorkingDirectory or $AmexImportFile is. Can you please post your entire code, and we'll do our best to assist. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
xkaba01 Posted January 8, 2013 Author Share Posted January 8, 2013 Hi below is part of the code.It is better to send video but will try to describe - it opens dialog for Open File and sends whole path to filed "File Name". It looks like fast typing when I see it. And during this "typing" (command Send($WorkingDirectory & $AmexImportFile) in following script) sometimes is send someting like thisc:usersakabilkadesktoptest|ccimport)*.xlsinstead of c:usersakabilkadesktoptestccimport.xlsThe application I am working with is written in VB and it is almost not possible to control it through classes, instances and I have to use a lot of SEND commands to control it.Here is the script----------------------------------$WorkingDirectory = "c:usersakabilkadesktoptest"$AmexImportFile = "ccimport08.xls";WaitFormantenanceMainWindowWhile ControlGetFocus("[CLASS:ThunderRT6FormDC]") <> "TreeViewWndClass1" ControlClick("[CLASS:ThunderRT6FormDC]", "", "[CLASS:TreeViewWndClass; INSTANCE:1]")WEnd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAIN PART;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sleep(1000)Send("{Down 7}");Database AdministrationSend("{Enter 1}")Sleep(1000)Send("{Down 1}")Send("{Tab 4}")Send("{Down 1}");Credit Card ImportSend("{Enter 1}") Sleep(1000)Send("{Tab 7}");Choose firs CC import profileSend("{Enter 1}")WinWaitActive("Credit Card Import - [AMEX import]");click on button to open OPEN file dialogControlClick("Credit Card Import - [AMEX import]", "", "ThunderRT6CommandButton2")WinWaitActive("Open") Sleep(3000)Send($WorkingDirectory & $AmexImportFile) Sleep(3000);confirm file name - click Open buttonControlClick("Open", "", "Button1");Send("{Enter 1}")WinWaitActive("Credit Card Import - [AMEX import]") Sleep(1000);go to next window / Select SheetSend("!n") Sleep(1000);go to next window / Field Mapping Thank you for your time and help.Ales K. 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