Jump to content

Recommended Posts

Posted

I'm tring to make out of the mouse wheel button a pause button, but i have no clue how to do that.

I had read this: 


But gives me no clue about doing this.

Instead of this:

 

HotKeySet("{F6}", "TogglePause")



Func TogglePause()
    $Paused= Not $Paused;if true set to false and vice versa
EndFunc

 

I want something like this:

 

HotKeySet("{$MOUSE_WHEELDOWN_EVENT}", "TogglePause")



Func TogglePause()
    $Paused= Not $Paused;if true set to false and vice versa
EndFunc

Thx

Posted (edited)
Posted
6 minutes ago, Nine said:

And what would be the application you want to automate this way ?

This way i want to automate the application AutoIt to start/pause at the press of the mouse wheel button, not the scroll up/down of the wheel, but the button itself.

Would be nice to have it at hand this pause button, instead looking for F6 possibly mistaking it with F5/refresh/time or F7/"Terminate" - Func Terminate() ;exit

 

Posted
1 hour ago, Nine said:

And what would be the application you want to automate this way ?

Edit : I see you have a nice experience of locked threads.  I'll let mods know about it.

Hi 9Nine, how do you do?

Sorry not recognizing you. Hope you are doing well in these crazy times.

As i said, i'm playing with AutoIt scripting and learning bits and bites at a time about this program. Who knows when i will need it and for what i will need it. So, if my question above seems a bit off, well, i found more threads on this site about this topic. Old posts and decided to not necroposting on post from 2007~2000andlate, instead, decided to make a new thread, maybe there are new info about this matter. I could spend more time reading posts from 2007, but i will not have with whom to talk to if i encounter a problem.

Posted
2 hours ago, Nine said:

And what would be the application you want to automate this way ?

Edit : I see you have a nice experience of locked threads.  I'll let mods know about it.

 You gave me some thinking to do. Given the "nice experience" you are talking about, should i consider making a new account?

 

Thank you for your time.

Bogdan

  • Developers
Posted

Moved to the appropriate AutoIt General Help and Support forum, as the Developer General Discussion forum very clearly states:

Quote

General development and scripting discussions.


Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

  • Developers
Posted (edited)
13 hours ago, BogdanNicolescu said:

should i consider making a new account?

Not sure what you are on about, but funny you are avoiding to really answer the question and come up with this comment.

So: What about you answer me now first what you are really trying to accomplish here and what it is for?

 

ps: All others please stay out for now! 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted
7 hours ago, Jos said:

Not sure what you are on about, but funny you are avoiding to really answer the question and come up with this comment.

So: What about you answer me now first what you are really trying to accomplish here and what it is for?

 

ps: All others please stay out for now! 

Hi Jos,

As i said above, the accomplishment woud be to learn how to set a mouse key do do something. I read the help files, and some (really old) threads, tried some variations, but i must do something wrong that i can't make it run.

Hoped that someone who has encountered this case has figure it out already.

Of course, i will continue to do my own research, ițm not that lazy, but i wanted to see other opinions on this too.

Posted
1 minute ago, Jos said:

Yea right...   No concrete task just want to learn....    and making smart remarks along the way.    Good luck with that.

Ok, if you really want to see what ițm working on, this is a script for copy-paste:

 

Global $Paused=True , $counter = 34

HotKeySet("{F6}", "TogglePause")
HotKeySet("{F7}", "Terminate")

While 1
    If Not $Paused Then ;to see if paused or not
Sleep(20)
MouseClick("left",660,57,2)
Sleep(20)
Send("^x")
Sleep(20)
MouseWheel("down", 1)
Sleep(20)
MouseClick("left",65,207,1)
Sleep(20)
Send ("^v")
Sleep(20)
MouseWheel("down", 1)
Sleep(100)
MouseClick("left",65,203,1)
Sleep(20)
    EndIf
    Sleep(10)
WEnd

Func TogglePause()
    $Paused= Not $Paused;if true set to false and vice versa
EndFunc

Func Terminate() ;exit
    Exit
EndFunc

And wanted to have a middle mouse button as a pause button instead of F6 which is between F5 and F7.

It's an old work in progress.

  • Jos locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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