Jump to content

Help for link to command that have no example on AutoIT guide.


Recommended Posts

Hi, i'm new on this forum.
I'm writing my personal script using AutoIT 3.3.8.1 and i need
to know if mouse wheel UP or DOWN is used to know direction  and their

steps up or down to know how is the movement.
I have the function

#include <WinAPI.au3>
_WinAPI_Mouse_Event($iFlags [, $iX = 0 [, $iY = 0 [, $iData = 0 [,

$iExtraInfo = 0]]]])

and $IiFlags = $MOUSEEVENTF_WHEEL
and $iData that informs me of movement.

But i don't know how use it and in the guide there isn't example
to study and i found nothing on web
have you some WEB link to write me in order to see ho use this function

?

I thank you if you can give me some help.

Link to comment
Share on other sites

From helpfile:

$iData = [optional] If iFlags is $MOUSEEVENTF_WHEEL, then iData specifies the amount of wheel movement. A positive value indicates that the wheel was rotated forward away from the user. A negative value indicates that the wheel was rotated backward, toward the user. One wheel click is defined as $WHEEL_DELTA, which is 120. If iFlags is not $MOUSEEVENTF_WHEEL, then $iData should be zero.

Link to comment
Share on other sites

mercadantelaura,

What's your overall purpose for knowing this? Thanks.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Sorry but i have difficult to use this function, becasue if
i use if...then with variable $MOUSEEVENTF_WHEEL
The script answer me that variable is not declared.

Have you to give some link to a real example in order to know how must i

use this function and thei variables ?

Thank you very much and sorry for disturb.

Link to comment
Share on other sites

TO  Guinness:

 

The porpouse is to create a script to use it into background of my

client mail "FOXMAIL"
in order to have a menu to choose from lots category of
template and each category their models as IncrediMail do.
Now "FoxMail" don't permit to have preview, user must always
open menu Template ...chose category ...choose model.htm
(without remember me with preview how is it)
and then it is loaded.
If it not satisfy that i want i must close the window and i
do again all steps

For this reason i want realzie a script that
read Foxmail INI file and load their file template then show menu
with category and their SUB-NAME showing small preview.
Cliccking on small preview do the big preview and load them into
NEW POST of Foxmail.

Is very laborious and
I don't know if i have sufficient experience to do realize my project.
AutoIT have lots command and functions, but i'm studying the guide
and i hope to realize it.

Link to comment
Share on other sites

This may help - _WinAPI_Mouse_Event

See Remarks

They mentioned it in the first post.

Have a look at this...

#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>

Example()

Func Example()
    Local $hGUI = GUICreate('WM_MOUSEWHEEL')
    GUISetState(@SW_SHOW, $hGUI)

    GUIRegisterMsg($WM_MOUSEWHEEL, 'WM_MOUSEWHEEL')

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop

        EndSwitch
    WEnd
    
    GUIDelete($hGUI)
EndFunc   ;==>Example

Func WM_MOUSEWHEEL($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $lParam
    Local $iLength = _WinAPI_HiWord($wParam) / 120
    If $iLength > 0 Then
        ConsoleWrite('Scrolled Up ' & $iLength & @LF)
    Else
        ConsoleWrite('Scrolled Down ' & Abs($iLength) & @LF)
    EndIf
EndFunc   ;==>WM_MOUSEWHEEL

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

i have already readed this page but i continue to don't understand how
use the function.

The is no link to an example on WEB ??
An example explain me better the function !

Ok thanks for example i will prove & study it

Edited by mercadantelaura
Link to comment
Share on other sites

Sorry but i have difficult to use this function, becasue if

i use if...then with variable $MOUSEEVENTF_WHEEL

The script answer me that variable is not declared.

Have you to give some link to a real example in order to know how must i

use this function and thei variables ?

Thank you very much and sorry for disturb.

 

 

This may help - _WinAPI_Mouse_Event

See Remarks

 

 

They mentioned it in the first post.

I thought the issue would be related to constants.au3 needing to be included, hence "See Remarks". Just another of my feeble and probably useless help attempts. :)

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

Sorry, but i continue to don't undestand how use the function.
I have proved your example but i see always the GUI.
I use wheel in any direction but no message is showed.

Please can you correct my example in the exact way in order to understand where i'm wronging ?
Varible used without declaring is the error message always showed and dont' appear MsgBox !


#NoTrayIcon
#include <WinAPI.au3>
#include <constants.au3>    ;  included as suggested "SomdComputerguy" but always error !


HotKeySet ("{ESC}", "GoOUT")

While 1
    $valueOfData = _WinAPI_Mouse_Event($MOUSEEVENTF_WHEEL, 0, 0, $iData)
    $Step = $valueOfData/120
    Select
        case $ValueData=0
            MsgBox(48, "Info", "No movemenet of mouse")
        case $ValueData<1
            MsgBox(48, "Info", "The movement is backword" & @LF & "The wheel click done are: " & $Step)
        case $ValueData>1
            MsgBox(48, "Info", "The movement is forward" & @LF & "The wheel click done are: " & $Step)
    EndSelect
Wend


Func GoOUT()
    Exit
EndFunc

Link to comment
Share on other sites

In your code, you define $valueOfData, but in the Select, you are checking the value of $ValueData.

 

Infact I want check how is the movement and how is the direction.

How is the correction to do to my script in order to know the wheel direction and its steps ?

Edited by mercadantelaura
Link to comment
Share on other sites

Sorry for disturb and my insistance, but i'm studying AutoIT from only some weeks and for this function i have difficult to comprehension of it.

Some member of this forum please Corrects in correct way my script in order to compare my wrong script with your exact code and learn from my errors.

Thanks, i hope that you may satisfy my request.

Link to comment
Share on other sites

In your code, you define $valueOfData, but in the Select, you are checking the value of $ValueData.

 

I'm looking for to know how is value of flag $iData that function _WinAPI_Mouse_Event($MOUSEEVENTF... use inside

because in guide are wrote that this flag is positive or negative for forward or backword and is zero if don't exist Mousevent

But how i can test value of $iData when i move wheel mouse i??

Link to comment
Share on other sites

In your code, you define $valueOfData, but in the Select, you are checking the value of $ValueData.

$valueOfData and $ValueData are two different variables. Perhaps you haven't shown all of your code, or the second variable is defined in one of the #includes. I have no desire to explore and find if this is the case. $valueOfData and $ValueData are two different variables.

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

Ops, i have'nt saw this error.
I have wrote two different variable, but my intention was

write always "$valueOfData"  and not "$valueData"

The script is only this, that i wrote as example  to know how is the

direction and step of wheel.
If i correct wrong name of variable, is correct the script

to show me on msgbox the dierction and step ?

Link to comment
Share on other sites

_WinAPI_Mouse_Event doesn't READ the mouse, it moves the mouse from what I'm reading in the header information of the function.


Synthesizes mouse motion and button clicks

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

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...