Sign in to follow this  
Followers 0
tuanoooo

question for function on right click

6 posts in this topic

http://www.autoitscript.com/forum/index.php?showtopic=64738

ok so i was told to check out the above link above but i still have no idea which is the "right click function code" and what i do to enable it.

basically i want this function to happen when i hit the "right click button" on my mouse. can someone help please

Func hi()

Sleep(50)

Send("{ENTER}")

Send(" hi hi hi")

Send("{ENTER}")

Sleep(50)

Endfunc

Share this post


Link to post
Share on other sites



can anyonee helpppppp? :blink:

Share this post


Link to post
Share on other sites

Be patient pls. no bumps within 24 hours.

Why didn't you stick with that one topic to make it clear what you are doing?

What is it you do not understand?


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Hi,

Just add the contents of the zip file in the link to C:\Program Files\AutoIt3\Include

then use this :-

#include <MouseOnEvent.au3>

;Disable Secondary mouse button *up*, and call our function when mouse button *up* event is recieved
_MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT, "MouseSecondaryUp_Event")
Sleep(5000)
_MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT) ;Enable mouse button back.


Func MouseSecondaryUp_Event()

Sleep(50)
Send("{ENTER}")
Send(" hi hi hi")
Send("{ENTER}")
Sleep(50)

EndFunc

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

nvm i found the zipfile so i just extract it to include folder. and then copy that script to a autoit file and it should work?

Edited by tuanoooo

Share this post


Link to post
Share on other sites

tuanoooo,

Short answer: Yes.

Longer answer: As you obviously have no idea about coding in AutoIt (and that is not a problem because we all started at that point! :P ) you need to get a grip of the basics.

Reading the Help file (at least the first few sections - Using AutoIt, Tutorials and the first couple of References) will help you enormously. You should also look at the excellent tutorials that you will find here and here - you will find other tutorials in the Wiki (the link is at the top of the page). There are even video tutorials on YouTube if you prefer watching to reading.

I know you want to start coding NOW, but a little study will save you a lot of trouble later on, believe me. :blink:

M23

P.S. If you look at the Help file page for #include it tells you how to get a personal include folder so you do not have to copy UDFs into the main AutoIt include folder. That way they do not get overwritten each time you upgrade. ;)


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0