Jump to content

Recommended Posts

Posted

Hi there!

I have a question regarding MouseWheel. It works fine at first, but next I need the mousewheel to go down a little bit every time during the loop and that doesn't work.

 

MouseWheel("down",17)

Local $i = 0
Local $x = 0
Local $mouseX = 150
Local $mouseX_plus = 60

While $i < 10
   $mouseXt = $mouseX + $mouseX_plus * $i

   ; Go to and click on the top profile
   MouseMove(1350, $mouseXt, 5)
   MouseClick("left")

   ; Go to and click on the top profile
   MouseMove(1350, 220, 5)
   MouseClick("left")

   ; Click back to profiles
   MouseMove(1270, 50, 5)
   MouseClick("left")

   MouseWheel($MOUSE_WHEEL_DOWN, 5)

   $i = $i + 1

WEnd

 

Posted

To clarify the above a bit more:

The MouseWheel function at the first line works like expected, but next the MouseWheel function in the loop doesn't do anything. I tried everything I could imagine, like changing the figure from 5 to 15 and 30, moving the line right below the while-statement etc etc, but whatever I do the mouse doesn't scroll while in that loop.

Posted (edited)

Needs

#include <AutoItConstants.au3>

or use 'down' line the first line instead of the constant $MOUSE_WHEEL_DOWN

Edited by careca
Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted

Thanks for the replies, very much appreciated!

I changed 'down' to $MOUSE_WHEEL_DOWN, just because I was so desperate that I tried anything =) so that's not the problem unfortunately..

Posted

Now I changed it to the code below:

 

While $i < 10
   MouseWheel('down', 15)
   $mouseXt = $mouseX + $mouseX_plus * $i

   ; Go to and click on the top profile
   MouseMove(1350, $mouseXt, 5)
   MouseClick("left")

   ; Go to and click on the top profile
   MouseMove(1350, 220, 5)
   MouseClick("left")

   ; Click back to profiles
   MouseMove(1270, 50, 5)
   MouseClick("left")

   $i = $i + 1

WEnd

The problem now is that the mousewheel scrolls down only one time in that loop (and one time outside of the loop). So just once weird enough...
 

Posted

here the code i use to test it and it is working fine, so I

opt ("MustDeclareVars",1)
opt ("WinTitleMatchMode",2)

WinActivate ("Mouse")

MouseWheel("down",5)

Local $i = 0

While $i < 2
 
   msgbox (0,"test","test")
   WinActivate ("Mouse")
   MouseWheel("down", 10)

   $i = $i + 1

WEnd

must assume that you are loosing control of the screen you are scrolling

 

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
×
×
  • Create New...