Jump to content

Trying to convert this bash into autoit


Sami1985
 Share

Recommended Posts

  • Moderators

@Sami1985 I don't do a lot of bash, but it should not be difficult. Mousemove, however, is patently unreliable in AutoIt. What, exactly are you trying to automate? Typically there is a much better way to do it.

"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

15 minutes ago, JLogan3o13 said:

@Sami1985 I don't do a lot of bash, but it should not be difficult. Mousemove, however, is patently unreliable in AutoIt. What, exactly are you trying to automate? Typically there is a much better way to do it.

Thank you so much for the quick help. I am so sorry for not explaining what I am trying to do. The "xdotool mousemove xxx yyy click 1" command is just asking the script to do a left mouse click at the specified coordinates.

Link to comment
Share on other sites

click on (848,845) every 70 seconds forever?

did you look in the helpfile for mouse functions at all?  Because the answer is to literally copy the script out of the helpfile.

Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

is this playlist by chance an .mu3 file (nvm, we started with bash so probably not),  are we clicking on youtube?

Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

1 minute ago, iamtheky said:

click on (848,845) every 70 seconds forever?

did you look in the helpfile for mouse functions at all?  Because the answer is to literally copy the script out of the helpfile.

I googled autoit while loop but did not read the helpfile. I will locate it and start reading. Thanks

Link to comment
Share on other sites

excellent, then aiming a left click should be a fun first script, and any kind of loop will do - :sweating:

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

10 minutes ago, iamtheky said:

excellent, then aiming a left click should be a fun first script, and any kind of loop will do - :sweating:

I did not say the left click was my main issue. It is just every software has its structure how to write the while loop.  So if you dont or cant contribute anything apart from sarcasm, then leave it for somebody else who could or want to help.

Link to comment
Share on other sites

I can help, but so far there is no code to help with.  so you went to the while function, copied that stuff; and then you went to mouseclick and put that stuff inside of the while stuff.  Or are you just mad because you are not being handed code?

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

1 minute ago, iamtheky said:

I can help, but so far there is no code to help with.  so you went to the while function, copied that stuff; and then you went to mouseclick and put that stuff inside of the while stuff.  Or are you just mad because you are not being handed code?

I am not mad but I am not expecting anything positive from you. Just please leave this thread and dont spam it anymore. 

Link to comment
Share on other sites

Subz, I think he thinks all text is spam, watchout B)

I literally said look at the mouse functions (and then even said mouseclick in #11), and put do in italics like the worst dad joke ever. Is there a language barrier I missed?

Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

#include <AutoItConstants.au3>

While 1
    
    MouseClick($MOUSE_CLICK_MAIN, XXX, YYY, 1) ; Click with the main button, Coordinates: XXX, YYY. 1 click
    
    Sleep(70*1000) ; Wait for 70 seconds
    
WEnd

This will loop forever.

To loop 16 times, as stated in the bash code, use:

#include <AutoItConstants.au3>

For 0 To 16
    
    MouseClick($MOUSE_CLICK_MAIN, XXX, YYY, 1) ; Click with the main button, Coordinates: XXX, YYY. 1 click
    
    Sleep(70*1000) ; Wait for 70 seconds
    
Next

 

Edited by Annatsu
Link to comment
Share on other sites

7 minutes ago, Annatsu said:
#include <AutoItConstants.au3>

While 1
    
    MouseClick($MOUSE_CLICK_MAIN, XXX, YYY, 1) ; Click with the main button, Coordinates: XXX, YYY. 1 click
    
    Sleep(70*1000) ; Wait for 70 seconds
    
WEnd

This will loop forever.

To loop 16 times, as stated in the bash code, use:

#include <AutoItConstants.au3>

For 0 To 16
    
    MouseClick($MOUSE_CLICK_MAIN, XXX, YYY, 1) ; Click with the main button, Coordinates: XXX, YYY. 1 click
    
    Sleep(70*1000) ; Wait for 70 seconds
    
Next

 

Thank you very much man.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...