Coder Social home page Coder Social logo

Comments (5)

saucepleez avatar saucepleez commented on May 11, 2024

Both commands end up using the Mouse Move Command when clicking items. The UI Automation and Click Item both get the clickable location of the element and then create the Mouse Move Command, set the parameters, then run the command.

However, to this point, Mouse Move could not use variables to move the mouse. In order to add variable support, the Mouse Move command was updated which changed the parameters from integer to string. It appears that the command thinks the value being parsed in your command is invalid (AKA not a number OR the number is not a string). I tested on old scripts and it seemed to work but I have added exception handling so it will output the error specifically with the X and Y values that are attempting to be parsed.

Can you run the latest DEV build and reply with the actual values of the command? I am currently unable to reproduce the issue.

from taskt.

msshubin avatar msshubin commented on May 11, 2024

Hi, thanks. I'll check it in last dev-branch:
2018-10-29 08:08:32.551 +03:00 [INF] Running Line 7: Wait For Window To Exist [Target Window: 'Запуск 1С:Предприятия', Wait Up To 600 seconds] 2018-10-29 08:08:32.864 +03:00 [INF] Running Line 8: Click UI Item [Perform Left Click on '{1CDataBase}' in Window 'Запуск 1С:Предприятия'] 2018-10-29 08:08:33.223 +03:00 [INF] Result Code: Error 2018-10-29 08:08:33.223 +03:00 [INF] Error: System.Exception: System.Exception: System.Exception: Error parsing input to int type (X: 643, Y:520,5) System.FormatException: Входная строка имела неверный формат. в System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) в System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) в System.Int32.Parse(String s) в taskt.Core.AutomationCommands.SendMouseMoveCommand.RunCommand(Object sender) в C:\src\taskt\taskt\Core\AutomationCommands.cs:строка 2272 в taskt.Core.AutomationCommands.SendMouseMoveCommand.RunCommand(Object sender) в C:\src\taskt\taskt\Core\AutomationCommands.cs:строка 2276 в taskt.Core.AutomationCommands.ThickAppClickItemCommand.RunCommand(Object sender) в C:\src\taskt\taskt\Core\AutomationCommands.cs:строка 2458 в taskt.Core.AutomationEngineInstance.ExecuteCommand(ScriptAction command) в C:\src\taskt\taskt\Core\AutomationEngine.cs:строка 231 в taskt.Core.AutomationEngineInstance.ExecuteCommand(ScriptAction command) в C:\src\taskt\taskt\Core\AutomationEngine.cs:строка 252 в taskt.Core.AutomationCommands.BeginIfCommand.RunCommand(Object sender, ScriptAction parentCommand) в C:\src\taskt\taskt\Core\AutomationCommands.cs:строка 5233 в taskt.Core.AutomationEngineInstance.ExecuteCommand(ScriptAction command) в C:\src\taskt\taskt\Core\AutomationEngine.cs:строка 200 в taskt.Core.AutomationEngineInstance.ExecuteCommand(ScriptAction command) в C:\src\taskt\taskt\Core\AutomationEngine.cs:строка 252 в taskt.Core.AutomationEngineInstance.ExecuteScript(String filePath) в C:\src\taskt\taskt\Core\AutomationEngine.cs:строка 116

Maybe error in a fractional number in coordinates )

from taskt.

saucepleez avatar saucepleez commented on May 11, 2024

can you recapture the command and see if it persists? AFAIK, It is not possible to have fractions in coordinates - screen coordinates are integers (whole number) only. What I can do is make the number round-down, but im not sure how this scenario is happening.

I will use your debug output posted here to assess and implement a fix.

from taskt.

saucepleez avatar saucepleez commented on May 11, 2024

I changed the parse method so it should round the variables down -- it should not be possible to move the mouse to a position like 540.5 but it should be better handled now.

from taskt.

msshubin avatar msshubin commented on May 11, 2024

Jason, thanks. Now my script works without errors.

from taskt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.