Cinostroza Posted February 5, 2020 Share Posted February 5, 2020 Hi, Hi, I'm using autoit with python to send files by whatsApp. At the time of sending the route in some cases the characters change from (\) to (') or (:) to (.) Any idea what is happening? Link to comment Share on other sites More sharing options...
Danp2 Posted February 5, 2020 Share Posted February 5, 2020 Have you checked the value of Imagepath from within Python? Why is there an "r" inside the left parentheses? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 5, 2020 Moderators Share Posted February 5, 2020 r in python denotes the string as raw. Danp2 1 "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...
Cinostroza Posted February 7, 2020 Author Share Posted February 7, 2020 (edited) I tried saving the route as a string and it still throws me the same error. In addition every time I send the route I print it to see the value of the variable and there is no problem. In addition, this problem does not always occur, in most occasions the route is well written Edited February 7, 2020 by Cinostroza Link to comment Share on other sites More sharing options...
Danp2 Posted February 7, 2020 Share Posted February 7, 2020 Have you tried setting mode equal to 1 instead of the default of 0? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Cinostroza Posted February 7, 2020 Author Share Posted February 7, 2020 sorry I did not understand what you mean with the setting mode at 0 or 1, where did that parameter change? Link to comment Share on other sites More sharing options...
Danp2 Posted February 7, 2020 Share Posted February 7, 2020 You stated that you are using Python and Autoit, and based on the structure of your code I assumed that you are using PyAutoit. Correct? The Autoitx ControlSend function supports an optional flag parameter. This appears to be implemented in PyAutoit as "mode" instead of "flag" -- def control_send(title, control, send_text, mode=0, **kwargs): so I was suggesting that you try changing your code to -- autoit.control_send("Abrir", "Edit1", Imagepath, 1) and then test to see if the issue reoccurs. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Cinostroza Posted February 10, 2020 Author Share Posted February 10, 2020 I tried what you told me and I didn't succeed Link to comment Share on other sites More sharing options...
Danp2 Posted February 10, 2020 Share Posted February 10, 2020 Sorry, but your description is lacking as "didn't succeed" could have so many different meanings. I'm going to assume that you meant that the code ran fine but it exhibited the same behavior as before. No matter... this isn't an area where I have much experience, so I don't know how to assist you further until you can identify a way to reliably repeat the issue. Latest Webdriver UDF Release Webdriver Wiki FAQs 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